thermal: Enhance thermal_zone_device_update for events

Added one additional parameter to thermal_zone_device_update() to provide
caller with an optional capability to specify reason.
Currently this event is used by user space governor to trigger different
processing based on event code. Also it saves an additional call to read
temperature when the event is received.
The following events are cuurently defined:
- Unspecified event
- New temperature sample
- Trip point violated
- Trip point changed
- thermal device up and down
- thermal device power capability changed

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Bu işleme şunda yer alıyor:
Srinivas Pandruvada
2016-08-26 16:21:16 -07:00
işlemeyi yapan: Zhang Rui
ebeveyn 040a3eadf0
işleme 0e70f466fb
20 değiştirilmiş dosya ile 60 ekleme ve 30 silme

Dosyayı Görüntüle

@@ -286,7 +286,7 @@ static int of_thermal_set_mode(struct thermal_zone_device *tz,
mutex_unlock(&tz->lock);
data->mode = mode;
thermal_zone_device_update(tz);
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
return 0;
}