blob: 8789fa3c7fd9d75dbc7fef3a0217ed3700112a35 [file] [log] [blame]
Dong Aisheng87d68732012-09-05 10:57:13 +08001/*
2 * System Control Driver
3 *
4 * Copyright (C) 2012 Freescale Semiconductor, Inc.
5 * Copyright (C) 2012 Linaro Ltd.
6 *
7 * Author: Dong Aisheng <dong.aisheng@linaro.org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef __LINUX_MFD_SYSCON_H__
16#define __LINUX_MFD_SYSCON_H__
17
Sylwester Nawrocki5fb1c2d2013-03-25 17:56:23 +010018struct device_node;
19
Peter Chendf73de92013-10-22 16:46:25 +080020#ifdef CONFIG_MFD_SYSCON
Dong Aisheng87d68732012-09-05 10:57:13 +080021extern struct regmap *syscon_node_to_regmap(struct device_node *np);
22extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
Alexander Shiyan5ab3a892013-03-13 21:34:20 +040023extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
Dong Aisheng87d68732012-09-05 10:57:13 +080024extern struct regmap *syscon_regmap_lookup_by_phandle(
25 struct device_node *np,
26 const char *property);
Peter Chendf73de92013-10-22 16:46:25 +080027#else
28static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
29{
30 return ERR_PTR(-ENOSYS);
31}
32
33static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
34{
35 return ERR_PTR(-ENOSYS);
36}
37
38static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
39{
40 return ERR_PTR(-ENOSYS);
41}
42
43static inline struct regmap *syscon_regmap_lookup_by_phandle(
44 struct device_node *np,
45 const char *property)
46{
47 return ERR_PTR(-ENOSYS);
48}
49#endif
50
Dong Aisheng87d68732012-09-05 10:57:13 +080051#endif /* __LINUX_MFD_SYSCON_H__ */