Loading Documentation/devicetree/bindings/thermal/thermal.txt +4 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,10 @@ Optional property: 2000mW, while on a 10'' tablet is around 4500mW. - disable-thermal-zone: Disable the thermal zone monitoring by default. These Type:bool thermal zones will be enabled by userspace daemons based on usecase. - tracks-low: Indicates that the temperature sensor tracks the low Type: bool thresholds, so the governors may mitigate by ensuring timing closures and other low temperature operating Loading drivers/thermal/of-thermal.c +11 −2 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ struct __sensor_param { * @polling_delay: zone polling interval * @slope: slope of the temperature adjustment curve * @offset: offset of the temperature adjustment curve * @default_disable: Keep the thermal zone disabled by default * @tzd: thermal zone device pointer for this sensor * @ntrips: number of trip points * @trips: an array of trip points (0..ntrips - 1) Loading @@ -96,6 +97,7 @@ struct __thermal_zone { int slope; int offset; struct thermal_zone_device *tzd; bool default_disable; /* trip data */ int ntrips; Loading Loading @@ -710,6 +712,7 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, for_each_available_child_of_node(np, child) { struct of_phandle_args sensor_specs; int ret, id; struct __thermal_zone *tz; /* For now, thermal framework supports only 1 sensor per zone */ ret = of_parse_phandle_with_args(child, "thermal-sensors", Loading @@ -733,7 +736,10 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, if (!IS_ERR(tzd)) { if (!first_tzd) first_tzd = tzd; tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); tz = tzd->devdata; if (!tz->default_disable) tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); } } of_node_put(sensor_specs.np); Loading Loading @@ -937,6 +943,7 @@ struct thermal_zone_device *devm_thermal_of_virtual_sensor_register( *ptr = tzd; devres_add(dev, ptr); if (!tz->default_disable) tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); return tzd; Loading Loading @@ -1206,6 +1213,8 @@ __init *thermal_of_build_thermal_zone(struct device_node *np) } tz->polling_delay = prop; tz->default_disable = of_property_read_bool(np, "disable-thermal-zone"); /* * REVIST: for now, the thermal framework supports only * one sensor per thermal zone. Thus, we are considering Loading Loading
Documentation/devicetree/bindings/thermal/thermal.txt +4 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,10 @@ Optional property: 2000mW, while on a 10'' tablet is around 4500mW. - disable-thermal-zone: Disable the thermal zone monitoring by default. These Type:bool thermal zones will be enabled by userspace daemons based on usecase. - tracks-low: Indicates that the temperature sensor tracks the low Type: bool thresholds, so the governors may mitigate by ensuring timing closures and other low temperature operating Loading
drivers/thermal/of-thermal.c +11 −2 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ struct __sensor_param { * @polling_delay: zone polling interval * @slope: slope of the temperature adjustment curve * @offset: offset of the temperature adjustment curve * @default_disable: Keep the thermal zone disabled by default * @tzd: thermal zone device pointer for this sensor * @ntrips: number of trip points * @trips: an array of trip points (0..ntrips - 1) Loading @@ -96,6 +97,7 @@ struct __thermal_zone { int slope; int offset; struct thermal_zone_device *tzd; bool default_disable; /* trip data */ int ntrips; Loading Loading @@ -710,6 +712,7 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, for_each_available_child_of_node(np, child) { struct of_phandle_args sensor_specs; int ret, id; struct __thermal_zone *tz; /* For now, thermal framework supports only 1 sensor per zone */ ret = of_parse_phandle_with_args(child, "thermal-sensors", Loading @@ -733,7 +736,10 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, if (!IS_ERR(tzd)) { if (!first_tzd) first_tzd = tzd; tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); tz = tzd->devdata; if (!tz->default_disable) tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); } } of_node_put(sensor_specs.np); Loading Loading @@ -937,6 +943,7 @@ struct thermal_zone_device *devm_thermal_of_virtual_sensor_register( *ptr = tzd; devres_add(dev, ptr); if (!tz->default_disable) tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); return tzd; Loading Loading @@ -1206,6 +1213,8 @@ __init *thermal_of_build_thermal_zone(struct device_node *np) } tz->polling_delay = prop; tz->default_disable = of_property_read_bool(np, "disable-thermal-zone"); /* * REVIST: for now, the thermal framework supports only * one sensor per thermal zone. Thus, we are considering Loading