On Mon, 06 Apr 2020, Dilip Kota wrote:Yes, i missed to check in other perspective. Thanks for pointing it.
Traverse regmap handle entry from firmware node handle.You are assuming that the fwnode was Device Tree pointer.
Signed-off-by: Dilip Kota <eswara.kota@xxxxxxxxxxxxxxx>
---
Changes on v5:
No changes
Changes on v5:
No changes
Changes on v4:
No changes
drivers/mfd/syscon.c | 8 ++++++++
include/linux/mfd/syscon.h | 6 ++++++
2 files changed, 14 insertions(+)
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 3a97816d0cba..e085c50816b9 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -178,6 +178,14 @@ struct regmap *device_node_to_regmap(struct device_node *np)
}
EXPORT_SYMBOL_GPL(device_node_to_regmap);
+struct regmap *fwnode_to_regmap(struct fwnode_handle *fwnode)
+{
+ struct device_node *np = to_of_node(fwnode);
The point of a fwnode is that it could be one of multiple types.
What if it was a pointer to an ACPI property?