Commit 646274dd authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Daniel Lezcano

thermal/of: Move thermal_trip structure to thermal.h

The structure thermal_trip is now generic and will be usable by the
different sensor drivers in place of their own structure.

Move its definition to thermal.h to make it accessible.

Cc: Alexandre Bailon <abailon@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linexp.org>
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20220722200007.1839356-5-daniel.lezcano@linexp.orgSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent af9f251b
...@@ -68,18 +68,6 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) ...@@ -68,18 +68,6 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
void thermal_cdev_update(struct thermal_cooling_device *); void thermal_cdev_update(struct thermal_cooling_device *);
void __thermal_cdev_update(struct thermal_cooling_device *cdev); void __thermal_cdev_update(struct thermal_cooling_device *cdev);
/**
* struct thermal_trip - representation of a point in temperature domain
* @temperature: temperature value in miliCelsius
* @hysteresis: relative hysteresis in miliCelsius
* @type: trip point type
*/
struct thermal_trip {
int temperature;
int hysteresis;
enum thermal_trip_type type;
};
int get_tz_trend(struct thermal_zone_device *tz, int trip); int get_tz_trend(struct thermal_zone_device *tz, int trip);
struct thermal_instance * struct thermal_instance *
......
...@@ -78,6 +78,18 @@ struct thermal_zone_device_ops { ...@@ -78,6 +78,18 @@ struct thermal_zone_device_ops {
void (*critical)(struct thermal_zone_device *); void (*critical)(struct thermal_zone_device *);
}; };
/**
* struct thermal_trip - representation of a point in temperature domain
* @temperature: temperature value in miliCelsius
* @hysteresis: relative hysteresis in miliCelsius
* @type: trip point type
*/
struct thermal_trip {
int temperature;
int hysteresis;
enum thermal_trip_type type;
};
struct thermal_cooling_device_ops { struct thermal_cooling_device_ops {
int (*get_max_state) (struct thermal_cooling_device *, unsigned long *); int (*get_max_state) (struct thermal_cooling_device *, unsigned long *);
int (*get_cur_state) (struct thermal_cooling_device *, unsigned long *); int (*get_cur_state) (struct thermal_cooling_device *, unsigned long *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment