mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge back thermal core material for 7.4
This commit is contained in:
commit
bc967622c2
|
|
@ -660,10 +660,15 @@ static void power_allocator_update_tz(struct thermal_zone_device *tz,
|
|||
enum thermal_notify_event reason)
|
||||
{
|
||||
struct power_allocator_params *params = tz->governor_data;
|
||||
const struct thermal_trip_desc *td = trip_to_trip_desc(params->trip_max);
|
||||
const struct thermal_trip_desc *td;
|
||||
struct thermal_instance *instance;
|
||||
int num_actors = 0;
|
||||
|
||||
if (!params->trip_max)
|
||||
return;
|
||||
|
||||
td = trip_to_trip_desc(params->trip_max);
|
||||
|
||||
switch (reason) {
|
||||
case THERMAL_TZ_BIND_CDEV:
|
||||
case THERMAL_TZ_UNBIND_CDEV:
|
||||
|
|
|
|||
|
|
@ -63,22 +63,23 @@ static int thermal_of_get_trip_type(struct device_node *np,
|
|||
static int thermal_of_populate_trip(struct device_node *np,
|
||||
struct thermal_trip *trip)
|
||||
{
|
||||
int prop;
|
||||
u32 hysteresis;
|
||||
s32 temperature;
|
||||
int ret;
|
||||
|
||||
ret = of_property_read_u32(np, "temperature", &prop);
|
||||
ret = of_property_read_s32(np, "temperature", &temperature);
|
||||
if (ret < 0) {
|
||||
pr_err("missing temperature property\n");
|
||||
return ret;
|
||||
}
|
||||
trip->temperature = prop;
|
||||
trip->temperature = temperature;
|
||||
|
||||
ret = of_property_read_u32(np, "hysteresis", &prop);
|
||||
ret = of_property_read_u32(np, "hysteresis", &hysteresis);
|
||||
if (ret < 0) {
|
||||
pr_err("missing hysteresis property\n");
|
||||
return ret;
|
||||
}
|
||||
trip->hysteresis = prop;
|
||||
trip->hysteresis = hysteresis;
|
||||
|
||||
ret = thermal_of_get_trip_type(np, &trip->type);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user