Subject: [PATCH] [acpi thermal] Add helper for setting the polling frequency Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/thermal/device.c | 11 +++++++++++ drivers/acpi/drivers/thermal/thermal.h | 1 + 2 files changed, 12 insertions(+), 0 deletions(-) applies-to: 93becd8af0c6edace7dd841e1946662e9952b0b8 f7b117ec10b72265d06994582420384fbe197c5a diff --git a/drivers/acpi/drivers/thermal/device.c b/drivers/acpi/drivers/thermal/device.c index 132b4aa..94f8a85 100644 --- a/drivers/acpi/drivers/thermal/device.c +++ b/drivers/acpi/drivers/thermal/device.c @@ -205,6 +205,17 @@ int thermal_get_poll_freq(struct acpi_th return ret; } +int thermal_set_poll_freq(struct acpi_thermal * at, unsigned int seconds) +{ + /* + * Convert to deci-seconds + */ + at->t_poll_freq = seconds * 10; + dbg("polling frequency set to %lu seconds", at->t_poll_freq); + return 0; +} + + int thermal_get_devices(struct acpi_thermal * at) { return get_devices(at, "_TZD", &at->t_devices); diff --git a/drivers/acpi/drivers/thermal/thermal.h b/drivers/acpi/drivers/thermal/thermal.h index 0128009..16bea05 100644 --- a/drivers/acpi/drivers/thermal/thermal.h +++ b/drivers/acpi/drivers/thermal/thermal.h @@ -78,6 +78,7 @@ extern int thermal_get_trips(struct acpi extern int thermal_get_poll_freq(struct acpi_thermal *); extern int thermal_get_devices(struct acpi_thermal * at); +extern int thermal_set_poll_freq(struct acpi_thermal *, unsigned int); extern int thermal_set_cooling_mode(struct acpi_thermal *, int); extern void thermal_check(struct acpi_thermal * at); --- 0.99.9.GIT