diff options
author | Rafael J. Wysocki <rjw@rjwysocki.net> | 2023-03-08 14:03:56 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@rjwysocki.net> | 2023-03-08 14:03:56 +0100 |
commit | 2b6db9efa50799fa75ce609f24b355f29504bd9a (patch) | |
tree | bb729b6ff9b79dfa713705f7c801349fc528b5c5 /include/linux | |
parent | 52f04f10b9005ac4ce640da14a52ed7a146432fa (diff) | |
parent | 20918ccacd06eea4a4ff457bd86cae62859461a2 (diff) | |
download | lwn-2b6db9efa50799fa75ce609f24b355f29504bd9a.tar.gz lwn-2b6db9efa50799fa75ce609f24b355f29504bd9a.zip |
Merge branch 'thermal-core' into thermal
Merge thermal control updates for 6.4-rc1:
- Add a thermal zone 'devdata' accessor and modify several drivers to
use it (Daniel Lezcano).
- Prevent drivers from using the 'device' internal thermal zone
structure field directly (Daniel Lezcano).
- Clean up the hwmon thermal driver (Daniel Lezcano).
- Add thermal zone id accessor and thermal zone type accessor
and prevent drivers from using thermal zone fields directly (Daniel
Lezcano).
- Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano).
* thermal-core:
thermal/drivers/acerhdf: Remove pointless governor test
thermal/drivers/acerhdf: Make interval setting only at module load time
thermal/drivers/tegra: Remove unneeded lock when setting a trip point
thermal/hwmon: Use the thermal_core.h header
thermal/drivers/da9062: Don't access the thermal zone device fields
thermal: Use thermal_zone_device_type() accessor
thermal: Add a thermal zone id accessor
thermal/drivers/spear: Don't use tz->device but pdev->dev
thermal/core: Add thermal_zone_device structure 'type' accessor
thermal: Don't use 'device' internal thermal zone structure field
thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs()
thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs()
thermal: Remove debug or error messages in get_temp() ops
thermal/core: Show a debug message when get_temp() fails
thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers
thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers
thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers
thermal/core: Add a thermal zone 'devdata' accessor
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/thermal.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 2bb4bf33f4f3..eb80cee4f64f 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -365,6 +365,10 @@ thermal_zone_device_register_with_trips(const char *, struct thermal_trip *, int void *, struct thermal_zone_device_ops *, struct thermal_zone_params *, int, int); +void *thermal_zone_device_priv(struct thermal_zone_device *tzd); +const char *thermal_zone_device_type(struct thermal_zone_device *tzd); +int thermal_zone_device_id(struct thermal_zone_device *tzd); + int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *, unsigned long, unsigned long, @@ -436,6 +440,21 @@ static inline int thermal_zone_get_offset( struct thermal_zone_device *tz) { return -ENODEV; } +static inline void *thermal_zone_device_priv(struct thermal_zone_device *tz) +{ + return NULL; +} + +static inline const char *thermal_zone_device_type(struct thermal_zone_device *tzd) +{ + return NULL; +} + +static inline int thermal_zone_device_id(struct thermal_zone_device *tzd) +{ + return -ENODEV; +} + static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) { return -ENODEV; } |