Pull thermal updates from Daniel Lezcano: - Add the hwmon support on the i.MX SC (Anson Huang) - Thermal framework cleanups (self-encapsulation, pointless stubs, private structures) (Daniel Lezcano) - Use the PM QoS frequency changes for the devfreq cooling device (Matthias Kaehlcke) - Remove duplicate error messages from platform_get_irq() error handling (Markus Elfring) - Add support for the bandgap sensors (Keerthy) - Statically initialize .get_mode/.set_mode ops (Andrzej Pietrasiewicz) - Add Renesas R-Car maintainer entry (Niklas Söderlund) - Fix error checking after calling ti_bandgap_get_sensor_data() for the TI SoC thermal (Sudip Mukherjee) - Add latency constraint for the idle injection, the DT binding and the change the registering function (Daniel Lezcano) - Convert the thermal framework binding to the Yaml schema (Amit Kucheria) - Replace zero-length array with flexible-array on i.MX 8MM (Gustavo A. R. Silva) - Thermal framework cleanups (alphabetic order for heads, replace module.h by export.h, make file naming consistent) (Amit Kucheria) - Merge tsens-common into the tsens driver (Amit Kucheria) - Fix platform dependency for the Qoriq driver (Geert Uytterhoeven) - Clean up the rcar_thermal_update_temp() function in the rcar thermal driver (Niklas Söderlund) - Fix the TMSAR register for the TMUv2 on the Qoriq platform (Yuantian Tang) - Export GDDV, OEM vendor variables, and don't require IDSP for the int340x thermal driver - trivial conflicts fixed (Matthew Garrett) * tag 'thermal-v5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (48 commits) thermal/int340x_thermal: Don't require IDSP to exist thermal/int340x_thermal: Export OEM vendor variables thermal/int340x_thermal: Export GDDV thermal: qoriq: Update the settings for TMUv2 thermal: rcar_thermal: Clean up rcar_thermal_update_temp() thermal: qoriq: Add platform dependencies drivers: thermal: tsens: Merge tsens-common.c into tsens.c thermal/of: Rename of-thermal.c thermal/governors: Prefix all source files with gov_ thermal/drivers/user_space: Sort headers alphabetically thermal/drivers/of-thermal: Sort headers alphabetically thermal/drivers/cpufreq_cooling: Replace module.h with export.h thermal/drivers/cpufreq_cooling: Sort headers alphabetically thermal/drivers/clock_cooling: Include export.h thermal/drivers/clock_cooling: Sort headers alphabetically thermal/drivers/thermal_hwmon: Include export.h thermal/drivers/thermal_hwmon: Sort headers alphabetically thermal/drivers/thermal_helpers: Include export.h thermal/drivers/thermal_helpers: Sort headers alphabetically thermal/core: Replace module.h with export.h ...
Showing the changes to include/linux (3 of 42 files). Show all
Unified · Split
| @@ -63,18 +63,10 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy) · 62 unmodified lines | ||
| 63 | 63 | struct cpuidle_driver; |
| 64 | 64 | |
| 65 | 65 | #ifdef CONFIG_CPU_IDLE_THERMAL |
| 66 | −int cpuidle_cooling_register(struct cpuidle_driver *drv); | |
| 67 | −int cpuidle_of_cooling_register(struct device_node *np, | |
| 68 | − struct cpuidle_driver *drv); | |
| 66 | +void cpuidle_cooling_register(struct cpuidle_driver *drv); | |
| 69 | 67 | #else /* CONFIG_CPU_IDLE_THERMAL */ |
| 70 | −static inline int cpuidle_cooling_register(struct cpuidle_driver *drv) | |
| 68 | +static inline void cpuidle_cooling_register(struct cpuidle_driver *drv) | |
| 71 | 69 | { |
| 72 | − return 0; | |
| 73 | −} | |
| 74 | −static inline int cpuidle_of_cooling_register(struct device_node *np, | |
| 75 | − struct cpuidle_driver *drv) | |
| 76 | −{ | |
| 77 | − return 0; | |
| 78 | 70 | } |
| 79 | 71 | #endif /* CONFIG_CPU_IDLE_THERMAL */ |
| 80 | 72 | |
| @@ -26,4 +26,8 @@ void idle_inject_set_duration(struct idle_inject_device *ii_dev, · 25 unmodified lines | ||
| 26 | 26 | void idle_inject_get_duration(struct idle_inject_device *ii_dev, |
| 27 | 27 | unsigned int *run_duration_us, |
| 28 | 28 | unsigned int *idle_duration_us); |
| 29 | + | |
| 30 | +void idle_inject_set_latency(struct idle_inject_device *ii_dev, | |
| 31 | + unsigned int latency_ns); | |
| 32 | + | |
| 29 | 33 | #endif /* __IDLE_INJECT_H__ */ |
| @@ -32,20 +32,10 @@ · 31 unmodified lines | ||
| 32 | 32 | /* use value, which < 0K, to indicate an invalid/uninitialized temperature */ |
| 33 | 33 | #define THERMAL_TEMP_INVALID -274000 |
| 34 | 34 | |
| 35 | −/* Default Thermal Governor */ | |
| 36 | −#if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) | |
| 37 | −#define DEFAULT_THERMAL_GOVERNOR "step_wise" | |
| 38 | −#elif defined(CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE) | |
| 39 | −#define DEFAULT_THERMAL_GOVERNOR "fair_share" | |
| 40 | −#elif defined(CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE) | |
| 41 | −#define DEFAULT_THERMAL_GOVERNOR "user_space" | |
| 42 | −#elif defined(CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR) | |
| 43 | −#define DEFAULT_THERMAL_GOVERNOR "power_allocator" | |
| 44 | −#endif | |
| 45 | − | |
| 46 | 35 | struct thermal_zone_device; |
| 47 | 36 | struct thermal_cooling_device; |
| 48 | 37 | struct thermal_instance; |
| 38 | +struct thermal_attr; | |
| 49 | 39 | |
| 50 | 40 | enum thermal_device_mode { |
| 51 | 41 | THERMAL_DEVICE_DISABLED = 0, |
| @@ -130,11 +120,6 @@ struct thermal_cooling_device { · 78 unmodified lines | ||
| 130 | 120 | struct list_head node; |
| 131 | 121 | }; |
| 132 | 122 | |
| 133 | −struct thermal_attr { | |
| 134 | − struct device_attribute attr; | |
| 135 | − char name[THERMAL_NAME_LENGTH]; | |
| 136 | −}; | |
| 137 | − | |
| 138 | 123 | /** |
| 139 | 124 | * struct thermal_zone_device - structure for a thermal zone |
| 140 | 125 | * @id: unique id number for each thermal zone |
| @@ -347,21 +332,6 @@ struct thermal_zone_of_device_ops { · 206 unmodified lines | ||
| 347 | 332 | int (*set_trip_temp)(void *, int, int); |
| 348 | 333 | }; |
| 349 | 334 | |
| 350 | −/** | |
| 351 | − * struct thermal_trip - representation of a point in temperature domain | |
| 352 | − * @np: pointer to struct device_node that this trip point was created from | |
| 353 | − * @temperature: temperature value in miliCelsius | |
| 354 | − * @hysteresis: relative hysteresis in miliCelsius | |
| 355 | − * @type: trip point type | |
| 356 | − */ | |
| 357 | − | |
| 358 | −struct thermal_trip { | |
| 359 | − struct device_node *np; | |
| 360 | − int temperature; | |
| 361 | − int hysteresis; | |
| 362 | − enum thermal_trip_type type; | |
| 363 | −}; | |
| 364 | − | |
| 365 | 335 | /* Function declarations */ |
| 366 | 336 | #ifdef CONFIG_THERMAL_OF |
| 367 | 337 | int thermal_zone_of_get_sensor_id(struct device_node *tz_np, |
| @@ -413,19 +383,7 @@ void devm_thermal_zone_of_sensor_unregister(struct device *dev, · 45 unmodified lines | ||
| 413 | 383 | |
| 414 | 384 | #endif |
| 415 | 385 | |
| 416 | −#if IS_ENABLED(CONFIG_THERMAL) | |
| 417 | −static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) | |
| 418 | −{ | |
| 419 | − return cdev->ops->get_requested_power && cdev->ops->state2power && | |
| 420 | − cdev->ops->power2state; | |
| 421 | −} | |
| 422 | − | |
| 423 | −int power_actor_get_max_power(struct thermal_cooling_device *, | |
| 424 | − struct thermal_zone_device *tz, u32 *max_power); | |
| 425 | −int power_actor_get_min_power(struct thermal_cooling_device *, | |
| 426 | − struct thermal_zone_device *tz, u32 *min_power); | |
| 427 | −int power_actor_set_power(struct thermal_cooling_device *, | |
| 428 | − struct thermal_instance *, u32); | |
| 386 | +#ifdef CONFIG_THERMAL | |
| 429 | 387 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, |
| 430 | 388 | void *, struct thermal_zone_device_ops *, |
| 431 | 389 | struct thermal_zone_params *, int, int); |
| @@ -439,7 +397,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, · 7 unmodified lines | ||
| 439 | 397 | struct thermal_cooling_device *); |
| 440 | 398 | void thermal_zone_device_update(struct thermal_zone_device *, |
| 441 | 399 | enum thermal_notify_event); |
| 442 | −void thermal_zone_set_trips(struct thermal_zone_device *); | |
| 443 | 400 | |
| 444 | 401 | struct thermal_cooling_device *thermal_cooling_device_register(const char *, |
| 445 | 402 | void *, const struct thermal_cooling_device_ops *); |
| @@ -457,24 +414,9 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); · 11 unmodified lines | ||
| 457 | 414 | int thermal_zone_get_slope(struct thermal_zone_device *tz); |
| 458 | 415 | int thermal_zone_get_offset(struct thermal_zone_device *tz); |
| 459 | 416 | |
| 460 | −int get_tz_trend(struct thermal_zone_device *, int); | |
| 461 | −struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, | |
| 462 | − struct thermal_cooling_device *, int); | |
| 463 | 417 | void thermal_cdev_update(struct thermal_cooling_device *); |
| 464 | 418 | void thermal_notify_framework(struct thermal_zone_device *, int); |
| 465 | 419 | #else |
| 466 | −static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) | |
| 467 | −{ return false; } | |
| 468 | −static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev, | |
| 469 | − struct thermal_zone_device *tz, u32 *max_power) | |
| 470 | −{ return 0; } | |
| 471 | −static inline int power_actor_get_min_power(struct thermal_cooling_device *cdev, | |
| 472 | − struct thermal_zone_device *tz, | |
| 473 | − u32 *min_power) | |
| 474 | −{ return -ENODEV; } | |
| 475 | −static inline int power_actor_set_power(struct thermal_cooling_device *cdev, | |
| 476 | − struct thermal_instance *tz, u32 power) | |
| 477 | −{ return 0; } | |
| 478 | 420 | static inline struct thermal_zone_device *thermal_zone_device_register( |
| 479 | 421 | const char *type, int trips, int mask, void *devdata, |
| 480 | 422 | struct thermal_zone_device_ops *ops, |
| @@ -484,21 +426,6 @@ static inline struct thermal_zone_device *thermal_zone_device_register( · 3 unmodified lines | ||
| 484 | 426 | static inline void thermal_zone_device_unregister( |
| 485 | 427 | struct thermal_zone_device *tz) |
| 486 | 428 | { } |
| 487 | −static inline int thermal_zone_bind_cooling_device( | |
| 488 | − struct thermal_zone_device *tz, int trip, | |
| 489 | − struct thermal_cooling_device *cdev, | |
| 490 | − unsigned long upper, unsigned long lower, | |
| 491 | − unsigned int weight) | |
| 492 | −{ return -ENODEV; } | |
| 493 | −static inline int thermal_zone_unbind_cooling_device( | |
| 494 | − struct thermal_zone_device *tz, int trip, | |
| 495 | − struct thermal_cooling_device *cdev) | |
| 496 | −{ return -ENODEV; } | |
| 497 | −static inline void thermal_zone_device_update(struct thermal_zone_device *tz, | |
| 498 | − enum thermal_notify_event event) | |
| 499 | −{ } | |
| 500 | −static inline void thermal_zone_set_trips(struct thermal_zone_device *tz) | |
| 501 | −{ } | |
| 502 | 429 | static inline struct thermal_cooling_device * |
| 503 | 430 | thermal_cooling_device_register(char *type, void *devdata, |
| 504 | 431 | const struct thermal_cooling_device_ops *ops) |
| @@ -530,12 +457,7 @@ static inline int thermal_zone_get_slope( · 25 unmodified lines | ||
| 530 | 457 | static inline int thermal_zone_get_offset( |
| 531 | 458 | struct thermal_zone_device *tz) |
| 532 | 459 | { return -ENODEV; } |
| 533 | −static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) | |
| 534 | −{ return -ENODEV; } | |
| 535 | −static inline struct thermal_instance * | |
| 536 | −get_thermal_instance(struct thermal_zone_device *tz, | |
| 537 | − struct thermal_cooling_device *cdev, int trip) | |
| 538 | −{ return ERR_PTR(-ENODEV); } | |
| 460 | + | |
| 539 | 461 | static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) |
| 540 | 462 | { } |
| 541 | 463 | static inline void thermal_notify_framework(struct thermal_zone_device *tz, |