From 184a4bf623fa587067851d25435fcb2f41de445b Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 8 Dec 2014 18:04:21 +0100 Subject: thermal: of: Extend current of-thermal.c code to allow setting emulated temp Before this change it was only possible to set get_temp() and get_trend() methods to be used in the common code handling passing parameters via device tree to "cpu-thermal" CPU thermal zone device. Now it is possible to also set emulated value of temperature for debug purposes. Signed-off-by: Lukasz Majewski Acked-by: Eduardo Valentin Signed-off-by: Eduardo Valentin --- include/linux/thermal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux') diff --git a/include/linux/thermal.h b/include/linux/thermal.h index b8d91efa854e..99be7fc79c3b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -297,10 +297,13 @@ struct thermal_genl_event { * * Optional: * @get_trend: a pointer to a function that reads the sensor temperature trend. + * @set_emul_temp: a pointer to a function that sets sensor emulated + * temperature. */ struct thermal_zone_of_device_ops { int (*get_temp)(void *, long *); int (*get_trend)(void *, long *); + int (*set_emul_temp)(void *, unsigned long); }; /** -- cgit v1.2.3-59-g8ed1b