History

Merge tag 'thermal-v5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux

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 ...

Linus Torvalds committed 6 years ago

Commit df2fbf52 parents 44ebe01 8d485da42 files · +2303 −1068Browse files

Showing the changes to include/linux (3 of 42 files). Show all

Unified · Split

3 files
  1. include/linux/cpu_cooling.h +2 −10
  2. include/linux/idle_inject.h +4 −0
  3. include/linux/thermal.h +3 −81
include/linux/cpu_cooling.h+2−10
@@ -63,18 +63,10 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy) · 62 unmodified lines
6363 struct cpuidle_driver;
6464
6565 #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);
6967 #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)
7169 {
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;
7870 }
7971 #endif /* CONFIG_CPU_IDLE_THERMAL */
8072
include/linux/idle_inject.h+4−0
@@ -26,4 +26,8 @@ void idle_inject_set_duration(struct idle_inject_device *ii_dev, · 25 unmodified lines
2626 void idle_inject_get_duration(struct idle_inject_device *ii_dev,
2727 unsigned int *run_duration_us,
2828 unsigned int *idle_duration_us);
29+
30+void idle_inject_set_latency(struct idle_inject_device *ii_dev,
31+ unsigned int latency_ns);
32+
2933 #endif /* __IDLE_INJECT_H__ */
include/linux/thermal.h+3−81
@@ -32,20 +32,10 @@ · 31 unmodified lines
3232 /* use value, which < 0K, to indicate an invalid/uninitialized temperature */
3333 #define THERMAL_TEMP_INVALID -274000
3434
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−
4635 struct thermal_zone_device;
4736 struct thermal_cooling_device;
4837 struct thermal_instance;
38+struct thermal_attr;
4939
5040 enum thermal_device_mode {
5141 THERMAL_DEVICE_DISABLED = 0,
@@ -130,11 +120,6 @@ struct thermal_cooling_device { · 78 unmodified lines
130120 struct list_head node;
131121 };
132122
133−struct thermal_attr {
134− struct device_attribute attr;
135− char name[THERMAL_NAME_LENGTH];
136−};
137−
138123 /**
139124 * struct thermal_zone_device - structure for a thermal zone
140125 * @id: unique id number for each thermal zone
@@ -347,21 +332,6 @@ struct thermal_zone_of_device_ops { · 206 unmodified lines
347332 int (*set_trip_temp)(void *, int, int);
348333 };
349334
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−
365335 /* Function declarations */
366336 #ifdef CONFIG_THERMAL_OF
367337 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
413383
414384 #endif
415385
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
429387 struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
430388 void *, struct thermal_zone_device_ops *,
431389 struct thermal_zone_params *, int, int);
@@ -439,7 +397,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, · 7 unmodified lines
439397 struct thermal_cooling_device *);
440398 void thermal_zone_device_update(struct thermal_zone_device *,
441399 enum thermal_notify_event);
442−void thermal_zone_set_trips(struct thermal_zone_device *);
443400
444401 struct thermal_cooling_device *thermal_cooling_device_register(const char *,
445402 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
457414 int thermal_zone_get_slope(struct thermal_zone_device *tz);
458415 int thermal_zone_get_offset(struct thermal_zone_device *tz);
459416
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);
463417 void thermal_cdev_update(struct thermal_cooling_device *);
464418 void thermal_notify_framework(struct thermal_zone_device *, int);
465419 #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; }
478420 static inline struct thermal_zone_device *thermal_zone_device_register(
479421 const char *type, int trips, int mask, void *devdata,
480422 struct thermal_zone_device_ops *ops,
@@ -484,21 +426,6 @@ static inline struct thermal_zone_device *thermal_zone_device_register( · 3 unmodified lines
484426 static inline void thermal_zone_device_unregister(
485427 struct thermal_zone_device *tz)
486428 { }
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−{ }
502429 static inline struct thermal_cooling_device *
503430 thermal_cooling_device_register(char *type, void *devdata,
504431 const struct thermal_cooling_device_ops *ops)
@@ -530,12 +457,7 @@ static inline int thermal_zone_get_slope( · 25 unmodified lines
530457 static inline int thermal_zone_get_offset(
531458 struct thermal_zone_device *tz)
532459 { 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+
539461 static inline void thermal_cdev_update(struct thermal_cooling_device *cdev)
540462 { }
541463 static inline void thermal_notify_framework(struct thermal_zone_device *tz,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t