diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2016-08-26 19:21:19 -0400 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2016-09-27 02:37:17 -0400 |
commit | 43720df96023b762843e7ddcc319fc99989ba3c2 (patch) | |
tree | 074fed623fcb7548e1888104b49dc9f2b929c711 /drivers/thermal/int340x_thermal | |
parent | 9176ae8668a005b5441604bd1b47eeec07c27d94 (diff) |
thermal: int3403: Process trip change notification
When ACPI sends notification for trip point change re-read trips and
notify thermal core, so that this can be passed to user space thermal
controller.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/int340x_thermal')
-rw-r--r-- | drivers/thermal/int340x_thermal/int3403_thermal.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/thermal/int340x_thermal/int3403_thermal.c b/drivers/thermal/int340x_thermal/int3403_thermal.c index 7643489f207c..c4890c9437eb 100644 --- a/drivers/thermal/int340x_thermal/int3403_thermal.c +++ b/drivers/thermal/int340x_thermal/int3403_thermal.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #define INT3403_TYPE_CHARGER 0x0B | 25 | #define INT3403_TYPE_CHARGER 0x0B |
26 | #define INT3403_TYPE_BATTERY 0x0C | 26 | #define INT3403_TYPE_BATTERY 0x0C |
27 | #define INT3403_PERF_CHANGED_EVENT 0x80 | 27 | #define INT3403_PERF_CHANGED_EVENT 0x80 |
28 | #define INT3403_PERF_TRIP_POINT_CHANGED 0x81 | ||
28 | #define INT3403_THERMAL_EVENT 0x90 | 29 | #define INT3403_THERMAL_EVENT 0x90 |
29 | 30 | ||
30 | /* Preserved structure for future expandbility */ | 31 | /* Preserved structure for future expandbility */ |
@@ -75,6 +76,11 @@ static void int3403_notify(acpi_handle handle, | |||
75 | int340x_thermal_zone_device_update(obj->int340x_zone, | 76 | int340x_thermal_zone_device_update(obj->int340x_zone, |
76 | THERMAL_TRIP_VIOLATED); | 77 | THERMAL_TRIP_VIOLATED); |
77 | break; | 78 | break; |
79 | case INT3403_PERF_TRIP_POINT_CHANGED: | ||
80 | int340x_thermal_read_trips(obj->int340x_zone); | ||
81 | int340x_thermal_zone_device_update(obj->int340x_zone, | ||
82 | THERMAL_TRIP_CHANGED); | ||
83 | break; | ||
78 | default: | 84 | default: |
79 | dev_err(&priv->pdev->dev, "Unsupported event [0x%x]\n", event); | 85 | dev_err(&priv->pdev->dev, "Unsupported event [0x%x]\n", event); |
80 | break; | 86 | break; |