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 <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
Lukasz Majewski 2014-12-08 18:04:21 +01:00 committed by Eduardo Valentin
parent ce8be77859
commit 184a4bf623
2 changed files with 27 additions and 0 deletions

View file

@ -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);
};
/**