Skip to content

Commit

Permalink
thermal: int3403: Process trip change notification
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Srinivas Pandruvada authored and Zhang Rui committed Sep 27, 2016
1 parent 9176ae8 commit 43720df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/thermal/int340x_thermal/int3403_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define INT3403_TYPE_CHARGER 0x0B
#define INT3403_TYPE_BATTERY 0x0C
#define INT3403_PERF_CHANGED_EVENT 0x80
#define INT3403_PERF_TRIP_POINT_CHANGED 0x81
#define INT3403_THERMAL_EVENT 0x90

/* Preserved structure for future expandbility */
Expand Down Expand Up @@ -75,6 +76,11 @@ static void int3403_notify(acpi_handle handle,
int340x_thermal_zone_device_update(obj->int340x_zone,
THERMAL_TRIP_VIOLATED);
break;
case INT3403_PERF_TRIP_POINT_CHANGED:
int340x_thermal_read_trips(obj->int340x_zone);
int340x_thermal_zone_device_update(obj->int340x_zone,
THERMAL_TRIP_CHANGED);
break;
default:
dev_err(&priv->pdev->dev, "Unsupported event [0x%x]\n", event);
break;
Expand Down

0 comments on commit 43720df

Please sign in to comment.