diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-04-13 09:51:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-15 11:20:56 +0200 |
commit | e7048cdc6a46a8b824438a941a74d83a9a5fa3cf (patch) | |
tree | 44dc17dd1003e23108fe408eebd81319918ecda6 /include/mfd/syscon.h | |
parent | a2d50d5cf7c301156d1345bcef76a517ec7ba40d (diff) | |
download | barebox-e7048cdc6a46a8b824438a941a74d83a9a5fa3cf.tar.gz barebox-e7048cdc6a46a8b824438a941a74d83a9a5fa3cf.tar.xz |
mfd: syscon: implement device_node_to_regmap
Extend our syscon API with a device_node_to_regmap function that has the
same semantics as upstream:
__________________________________________________________________________
| Linux commit 39233b7c611248c0d05209b4854bc63e26485655
| CommitDate: Thu Aug 8 15:30:07 2019 -0700
|
| mfd/syscon: Add device_node_to_regmap()
|
| device_node_to_regmap() is exactly like syscon_node_to_regmap(), but it
| does not check that the node is compatible with "syscon", and won't
| attach the first clock it finds to the regmap.
|
| The rationale behind this, is that one device node with a standard
| compatible string "foo,bar" can be covered by multiple drivers sharing a
| regmap, or by a single driver doing all the job without a regmap, but
| these are implementation details which shouldn't reflect on the
| devicetree.
|
| Signed-off-by: Paul Cercueil <paul@crapouillou.net>
| Acked-by: Arnd Bergmann <arnd@arndb.de>
| Signed-off-by: Paul Burton <paul.burton@mips.com>
|__________________________________________________________________________
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/mfd/syscon.h')
-rw-r--r-- | include/mfd/syscon.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h index ac33f2d347..b47aa1e160 100644 --- a/include/mfd/syscon.h +++ b/include/mfd/syscon.h @@ -21,6 +21,7 @@ void __iomem *syscon_base_lookup_by_pdevname(const char *s); 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 *device_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, @@ -41,6 +42,10 @@ static inline struct regmap *syscon_node_to_regmap(struct device_node *np) { return ERR_PTR(-ENOSYS); } +static inline struct regmap *device_node_to_regmap(struct device_node *np) +{ + return ERR_PTR(-ENOSYS); +} static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s) { return ERR_PTR(-ENOSYS); |