[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240711212514.2372780-1-yoann.congal@smile.fr>
Date: Thu, 11 Jul 2024 23:25:14 +0200
From: Yoann Congal <yoann.congal@...le.fr>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>,
linux-kernel@...r.kernel.org
Cc: Saravana Kannan <saravanak@...gle.com>,
Yoann Congal <yoann.congal@...le.fr>
Subject: [PATCH] regulator: core: Set the fwnode for regulator_dev
From: Yoann Congal <yoann.congal@...le.fr>
After commit 3fb16866b51d ("driver core: fw_devlink: Make cycle
detection more robust"), fw_devlink prints an error when consumer
devices don't have their fwnode set. This used to be ignored silently.
Set the fwnode in regulator_dev so fw_devlink can find them and properly
track their dependencies.
This fixes errors like this:
stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 2-0033
NB: This is similar to the commit a26cc2934331 ("drm/mipi-dsi: Set the
fwnode for mipi_dsi_device") applied to the regulator framework.
Cc: Saravana Kannan <saravanak@...gle.com>
Cc: stable@...r.kernel.org # 5.13.x
Fixes: 63c7c9e16c8e ("regulator: core: Get and put regulator of_node")
Signed-off-by: Yoann Congal <yoann.congal@...le.fr>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 844e9587a880..f05f873021d2 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -5656,7 +5656,7 @@ regulator_register(struct device *dev,
dangling_of_gpiod = true;
if (!init_data) {
init_data = config->init_data;
- rdev->dev.of_node = of_node_get(config->of_node);
+ device_set_node(&rdev->dev, of_fwnode_handle(config->of_node));
}
ww_mutex_init(&rdev->mutex, ®ulator_ww_class);
Powered by blists - more mailing lists