diff options
author | Marcin Niestroj <m.niestroj@grinn-global.com> | 2019-06-28 17:37:27 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-07-02 08:15:32 +0200 |
commit | 6e465b62125af759c9e90f86ece45f136242e72d (patch) | |
tree | 8c0b1ba0429223150d1daa616c003bd3242ada28 /include | |
parent | d71573a006a2fc2b83c076c556b88166f4e3dec3 (diff) | |
download | barebox-6e465b62125af759c9e90f86ece45f136242e72d.tar.gz barebox-6e465b62125af759c9e90f86ece45f136242e72d.tar.xz |
mfd: syscon: add syscon_regmap_lookup_by_phandle()
This function is handy when syscon is passed as phandle to device_node
property.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/mfd/syscon.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h index 902f9fa2f3..ac33f2d347 100644 --- a/include/mfd/syscon.h +++ b/include/mfd/syscon.h @@ -22,6 +22,9 @@ void __iomem *syscon_base_lookup_by_phandle (struct device_node *np, const char *property); struct regmap *syscon_node_to_regmap(struct device_node *np); struct regmap *syscon_regmap_lookup_by_compatible(const char *s); +extern struct regmap *syscon_regmap_lookup_by_phandle( + struct device_node *np, + const char *property); #else static inline void __iomem *syscon_base_lookup_by_pdevname(const char *s) { @@ -42,6 +45,12 @@ static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s) { return ERR_PTR(-ENOSYS); } +static inline struct regmap *syscon_regmap_lookup_by_phandle( + struct device_node *np, + const char *property) +{ + return ERR_PTR(-ENOSYS); +} #endif #endif |