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>
This commit is contained in:
Srinivas Pandruvada
2016-08-26 16:21:16 -07:00
committed by Zhang Rui
父節點 040a3eadf0
當前提交 0e70f466fb
共有 20 個文件被更改,包括 60 次插入30 次删除

查看文件

@@ -42,7 +42,8 @@ static irqreturn_t st_mmap_thermal_trip_handler(int irq, void *sdata)
{
struct st_thermal_sensor *sensor = sdata;
thermal_zone_device_update(sensor->thermal_dev);
thermal_zone_device_update(sensor->thermal_dev,
THERMAL_EVENT_UNSPECIFIED);
return IRQ_HANDLED;
}