Loading drivers/thermal/of-thermal.c +22 −0 Original line number Original line Diff line number Diff line Loading @@ -503,6 +503,26 @@ static bool of_thermal_is_wakeable(struct thermal_zone_device *tz) return data->is_wakeable; return data->is_wakeable; } } static int of_thermal_set_polling_delay(struct thermal_zone_device *tz, int delay) { struct __thermal_zone *data = tz->devdata; data->polling_delay = delay; return 0; } static int of_thermal_set_passive_delay(struct thermal_zone_device *tz, int delay) { struct __thermal_zone *data = tz->devdata; data->passive_delay = delay; return 0; } static int of_thermal_aggregate_trip_types(struct thermal_zone_device *tz, static int of_thermal_aggregate_trip_types(struct thermal_zone_device *tz, unsigned int trip_type_mask, int *low, int *high) unsigned int trip_type_mask, int *low, int *high) { { Loading Loading @@ -630,6 +650,8 @@ static struct thermal_zone_device_ops of_thermal_ops = { .unbind = of_thermal_unbind, .unbind = of_thermal_unbind, .is_wakeable = of_thermal_is_wakeable, .is_wakeable = of_thermal_is_wakeable, .set_polling_delay = of_thermal_set_polling_delay, .set_passive_delay = of_thermal_set_passive_delay, }; }; static struct thermal_zone_of_device_ops of_virt_ops = { static struct thermal_zone_of_device_ops of_virt_ops = { Loading drivers/thermal/thermal_sysfs.c +4 −0 Original line number Original line Diff line number Diff line Loading @@ -391,6 +391,8 @@ polling_delay_store(struct device *dev, struct device_attribute *attr, mutex_lock(&tz->lock); mutex_lock(&tz->lock); tz->polling_delay = delay; tz->polling_delay = delay; if (tz->ops->set_polling_delay) tz->ops->set_polling_delay(tz, delay); mutex_unlock(&tz->lock); mutex_unlock(&tz->lock); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); Loading Loading @@ -418,6 +420,8 @@ passive_delay_store(struct device *dev, struct device_attribute *attr, mutex_lock(&tz->lock); mutex_lock(&tz->lock); tz->passive_delay = delay; tz->passive_delay = delay; if (tz->ops->set_passive_delay) tz->ops->set_passive_delay(tz, delay); mutex_unlock(&tz->lock); mutex_unlock(&tz->lock); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); Loading include/linux/thermal.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -129,6 +129,8 @@ struct thermal_zone_device_ops { int (*notify) (struct thermal_zone_device *, int, int (*notify) (struct thermal_zone_device *, int, enum thermal_trip_type); enum thermal_trip_type); bool (*is_wakeable)(struct thermal_zone_device *); bool (*is_wakeable)(struct thermal_zone_device *); int (*set_polling_delay)(struct thermal_zone_device *, int); int (*set_passive_delay)(struct thermal_zone_device *, int); }; }; struct thermal_cooling_device_ops { struct thermal_cooling_device_ops { Loading Loading
drivers/thermal/of-thermal.c +22 −0 Original line number Original line Diff line number Diff line Loading @@ -503,6 +503,26 @@ static bool of_thermal_is_wakeable(struct thermal_zone_device *tz) return data->is_wakeable; return data->is_wakeable; } } static int of_thermal_set_polling_delay(struct thermal_zone_device *tz, int delay) { struct __thermal_zone *data = tz->devdata; data->polling_delay = delay; return 0; } static int of_thermal_set_passive_delay(struct thermal_zone_device *tz, int delay) { struct __thermal_zone *data = tz->devdata; data->passive_delay = delay; return 0; } static int of_thermal_aggregate_trip_types(struct thermal_zone_device *tz, static int of_thermal_aggregate_trip_types(struct thermal_zone_device *tz, unsigned int trip_type_mask, int *low, int *high) unsigned int trip_type_mask, int *low, int *high) { { Loading Loading @@ -630,6 +650,8 @@ static struct thermal_zone_device_ops of_thermal_ops = { .unbind = of_thermal_unbind, .unbind = of_thermal_unbind, .is_wakeable = of_thermal_is_wakeable, .is_wakeable = of_thermal_is_wakeable, .set_polling_delay = of_thermal_set_polling_delay, .set_passive_delay = of_thermal_set_passive_delay, }; }; static struct thermal_zone_of_device_ops of_virt_ops = { static struct thermal_zone_of_device_ops of_virt_ops = { Loading
drivers/thermal/thermal_sysfs.c +4 −0 Original line number Original line Diff line number Diff line Loading @@ -391,6 +391,8 @@ polling_delay_store(struct device *dev, struct device_attribute *attr, mutex_lock(&tz->lock); mutex_lock(&tz->lock); tz->polling_delay = delay; tz->polling_delay = delay; if (tz->ops->set_polling_delay) tz->ops->set_polling_delay(tz, delay); mutex_unlock(&tz->lock); mutex_unlock(&tz->lock); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); Loading Loading @@ -418,6 +420,8 @@ passive_delay_store(struct device *dev, struct device_attribute *attr, mutex_lock(&tz->lock); mutex_lock(&tz->lock); tz->passive_delay = delay; tz->passive_delay = delay; if (tz->ops->set_passive_delay) tz->ops->set_passive_delay(tz, delay); mutex_unlock(&tz->lock); mutex_unlock(&tz->lock); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); Loading
include/linux/thermal.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -129,6 +129,8 @@ struct thermal_zone_device_ops { int (*notify) (struct thermal_zone_device *, int, int (*notify) (struct thermal_zone_device *, int, enum thermal_trip_type); enum thermal_trip_type); bool (*is_wakeable)(struct thermal_zone_device *); bool (*is_wakeable)(struct thermal_zone_device *); int (*set_polling_delay)(struct thermal_zone_device *, int); int (*set_passive_delay)(struct thermal_zone_device *, int); }; }; struct thermal_cooling_device_ops { struct thermal_cooling_device_ops { Loading