Messages in this thread Patch in this message | | | From | Qibo Huang <> | Subject | [PATCH] thermal/of: Initialize the thermal governor for configuring thermal zones. | Date | Mon, 10 Oct 2022 18:17:08 +0800 |
| |
Configure the initial thermal governor of thermal zones on the device tree. Since the kernel provides a variety of thermal governors, to a certain extent,thermal governor is also a specific hardware property of thermal zones.
Signed-off-by: Qibo Huang <huangqibo.tech@gmail.com> --- drivers/thermal/thermal_of.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index fd2fb84bf246..617b5ac030b4 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -404,6 +404,11 @@ static struct thermal_zone_params *thermal_of_parameters_init(struct device_node if (!tzp) return ERR_PTR(-ENOMEM); + if (!of_property_read_string(child, "thermal-governor", + &governor_name)) + strscpy(tzp->governor_name, governor_name, + THERMAL_NAME_LENGTH); + tzp->no_hwmon = true; if (!of_property_read_u32(np, "sustainable-power", &prop)) -- 2.37.1
| |