|
@@ -98,6 +98,7 @@ struct thermal_zone_device_ops {
|
|
int (*unbind) (struct thermal_zone_device *,
|
|
int (*unbind) (struct thermal_zone_device *,
|
|
struct thermal_cooling_device *);
|
|
struct thermal_cooling_device *);
|
|
int (*get_temp) (struct thermal_zone_device *, int *);
|
|
int (*get_temp) (struct thermal_zone_device *, int *);
|
|
|
|
+ int (*set_trips) (struct thermal_zone_device *, int, int);
|
|
int (*get_mode) (struct thermal_zone_device *,
|
|
int (*get_mode) (struct thermal_zone_device *,
|
|
enum thermal_device_mode *);
|
|
enum thermal_device_mode *);
|
|
int (*set_mode) (struct thermal_zone_device *,
|
|
int (*set_mode) (struct thermal_zone_device *,
|
|
@@ -168,6 +169,10 @@ struct thermal_attr {
|
|
* @last_temperature: previous temperature read
|
|
* @last_temperature: previous temperature read
|
|
* @emul_temperature: emulated temperature when using CONFIG_THERMAL_EMULATION
|
|
* @emul_temperature: emulated temperature when using CONFIG_THERMAL_EMULATION
|
|
* @passive: 1 if you've crossed a passive trip point, 0 otherwise.
|
|
* @passive: 1 if you've crossed a passive trip point, 0 otherwise.
|
|
|
|
+ * @prev_low_trip: the low current temperature if you've crossed a passive
|
|
|
|
+ trip point.
|
|
|
|
+ * @prev_high_trip: the above current temperature if you've crossed a
|
|
|
|
+ passive trip point.
|
|
* @forced_passive: If > 0, temperature at which to switch on all ACPI
|
|
* @forced_passive: If > 0, temperature at which to switch on all ACPI
|
|
* processor cooling devices. Currently only used by the
|
|
* processor cooling devices. Currently only used by the
|
|
* step-wise governor.
|
|
* step-wise governor.
|
|
@@ -199,6 +204,8 @@ struct thermal_zone_device {
|
|
int last_temperature;
|
|
int last_temperature;
|
|
int emul_temperature;
|
|
int emul_temperature;
|
|
int passive;
|
|
int passive;
|
|
|
|
+ int prev_low_trip;
|
|
|
|
+ int prev_high_trip;
|
|
unsigned int forced_passive;
|
|
unsigned int forced_passive;
|
|
atomic_t need_update;
|
|
atomic_t need_update;
|
|
struct thermal_zone_device_ops *ops;
|
|
struct thermal_zone_device_ops *ops;
|
|
@@ -426,6 +433,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
|
|
int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
|
|
int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
|
|
struct thermal_cooling_device *);
|
|
struct thermal_cooling_device *);
|
|
void thermal_zone_device_update(struct thermal_zone_device *);
|
|
void thermal_zone_device_update(struct thermal_zone_device *);
|
|
|
|
+void thermal_zone_set_trips(struct thermal_zone_device *);
|
|
|
|
|
|
struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
|
|
struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
|
|
const struct thermal_cooling_device_ops *);
|
|
const struct thermal_cooling_device_ops *);
|
|
@@ -477,6 +485,8 @@ static inline int thermal_zone_unbind_cooling_device(
|
|
{ return -ENODEV; }
|
|
{ return -ENODEV; }
|
|
static inline void thermal_zone_device_update(struct thermal_zone_device *tz)
|
|
static inline void thermal_zone_device_update(struct thermal_zone_device *tz)
|
|
{ }
|
|
{ }
|
|
|
|
+static inline void thermal_zone_set_trips(struct thermal_zone_device *tz)
|
|
|
|
+{ }
|
|
static inline struct thermal_cooling_device *
|
|
static inline struct thermal_cooling_device *
|
|
thermal_cooling_device_register(char *type, void *devdata,
|
|
thermal_cooling_device_register(char *type, void *devdata,
|
|
const struct thermal_cooling_device_ops *ops)
|
|
const struct thermal_cooling_device_ops *ops)
|