Skip to content

Commit

Permalink
thermal/of: Initialize the thermal governor for configuring thermal z…
Browse files Browse the repository at this point in the history
…ones.

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>
  • Loading branch information
Qibo Huang authored and intel-lab-lkp committed Oct 10, 2022
1 parent 2e70ea7 commit 12bc487
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/thermal/thermal_of.c
Expand Up @@ -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))
Expand Down

0 comments on commit 12bc487

Please sign in to comment.