* [PATCH] PWM: core: fix deep probe for PWM backlight
@ 2025-05-06 6:19 Ahmad Fatoum
2025-05-06 7:18 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-05-06 6:19 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
In a deep probe system, resources are probed on demand. This requires
code that iterates over lists of resources to first call
of_device_ensure_probed to ensure that the device is probed and added to
the list.
This was missing for both PWM and backlights, so add them now.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/pwm/core.c | 2 ++
drivers/video/backlight.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 4dd18d9446aa..313f3eef6504 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -198,6 +198,8 @@ static struct pwm_device *of_node_to_pwm_device(struct device_node *np, int id)
{
struct pwm_device *pwm;
+ of_device_ensure_probed(np);
+
list_for_each_entry(pwm, &pwm_list, node) {
if (pwm->hwdev && pwm->hwdev->of_node == np &&
pwm->chip->id == id)
diff --git a/drivers/video/backlight.c b/drivers/video/backlight.c
index d171b0d960d2..523dd7e9f324 100644
--- a/drivers/video/backlight.c
+++ b/drivers/video/backlight.c
@@ -93,6 +93,8 @@ struct backlight_device *of_backlight_find(struct device_node *node)
{
struct backlight_device *bl;
+ of_device_ensure_probed(node);
+
list_for_each_entry(bl, &backlights, list)
if (bl->node == node)
return bl;
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-06 7:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-06 6:19 [PATCH] PWM: core: fix deep probe for PWM backlight Ahmad Fatoum
2025-05-06 7:18 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox