[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1675608745-2451-1-git-send-email-jianengchencool@gmail.com>
Date: Sun, 5 Feb 2023 22:52:25 +0800
From: Jianeng Chen <jianengchencool@...il.com>
To: linux-pm@...r.kernel.org
Cc: rafael@...nel.org, daniel.lezcano@...aro.org, amitk@...nel.org,
rui.zhang@...el.com, linux-kernel@...r.kernel.org,
Jianeng Chen <jianengchencool@...il.com>
Subject: [PATCH] thermal/core: associate device tree node to thermal_cooling_device::device
When adding a gpio property to a cooling device node in device tree, then in
thermal driver called gpiod_get(struct device *) to request this gpio will
fail, indicate cannot find gpio in device tree, because the of node do not
associate to struct device.
Signed-off-by: Jianeng Chen <jianengchencool@...il.com>
---
drivers/thermal/thermal_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 0675df5..4d77d8b 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -905,6 +905,7 @@ __thermal_cooling_device_register(struct device_node *np,
cdev->ops = ops;
cdev->updated = false;
cdev->device.class = thermal_class;
+ cdev->device.of_node = np;
cdev->devdata = devdata;
ret = cdev->ops->get_max_state(cdev, &cdev->max_state);
--
2.7.4
Powered by blists - more mailing lists