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
63struct cpuidle_driver;63struct cpuidle_driver;
64 64
65#ifdef CONFIG_CPU_IDLE_THERMAL65#ifdef CONFIG_CPU_IDLE_THERMAL
66int cpuidle_cooling_register(struct cpuidle_driver *drv);66void cpuidle_cooling_register(struct cpuidle_driver *drv);
67int cpuidle_of_cooling_register(struct device_node *np,
68 struct cpuidle_driver *drv);
69#else /* CONFIG_CPU_IDLE_THERMAL */67#else /* CONFIG_CPU_IDLE_THERMAL */
70static inline int cpuidle_cooling_register(struct cpuidle_driver *drv)68static inline void cpuidle_cooling_register(struct cpuidle_driver *drv)
71{69{
72 return 0;
73}
74static inline int cpuidle_of_cooling_register(struct device_node *np,
75 struct cpuidle_driver *drv)
76{
77 return 0;
78}70}
79#endif /* CONFIG_CPU_IDLE_THERMAL */71#endif /* CONFIG_CPU_IDLE_THERMAL */
80 72
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
26void idle_inject_get_duration(struct idle_inject_device *ii_dev,26void idle_inject_get_duration(struct idle_inject_device *ii_dev,
27 unsigned int *run_duration_us,27 unsigned int *run_duration_us,
28 unsigned int *idle_duration_us);28 unsigned int *idle_duration_us);
29
30void idle_inject_set_latency(struct idle_inject_device *ii_dev,
31 unsigned int latency_ns);
32
29#endif /* __IDLE_INJECT_H__ */33#endif /* __IDLE_INJECT_H__ */
include/linux/thermal.h+3−81
@@ -32,20 +32,10 @@ · 31 unmodified lines
32/* use value, which < 0K, to indicate an invalid/uninitialized temperature */32/* use value, which < 0K, to indicate an invalid/uninitialized temperature */
33#define THERMAL_TEMP_INVALID -27400033#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
46struct thermal_zone_device;35struct thermal_zone_device;
47struct thermal_cooling_device;36struct thermal_cooling_device;
48struct thermal_instance;37struct thermal_instance;
38struct thermal_attr;
49 39
50enum thermal_device_mode {40enum thermal_device_mode {
51 THERMAL_DEVICE_DISABLED = 0,41 THERMAL_DEVICE_DISABLED = 0,
@@ -130,11 +120,6 @@ struct thermal_cooling_device { · 78 unmodified lines
130 struct list_head node;120 struct list_head node;
131};121};
132 122
133struct thermal_attr {
134 struct device_attribute attr;
135 char name[THERMAL_NAME_LENGTH];
136};
137
138/**123/**
139 * struct thermal_zone_device - structure for a thermal zone124 * struct thermal_zone_device - structure for a thermal zone
140 * @id: unique id number for each thermal zone125 * @id: unique id number for each thermal zone
@@ -347,21 +332,6 @@ struct thermal_zone_of_device_ops { · 206 unmodified lines
347 int (*set_trip_temp)(void *, int, int);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
358struct thermal_trip {
359 struct device_node *np;
360 int temperature;
361 int hysteresis;
362 enum thermal_trip_type type;
363};
364
365/* Function declarations */335/* Function declarations */
366#ifdef CONFIG_THERMAL_OF336#ifdef CONFIG_THERMAL_OF
367int thermal_zone_of_get_sensor_id(struct device_node *tz_np,337int 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#endif384#endif
415 385
416#if IS_ENABLED(CONFIG_THERMAL)386#ifdef CONFIG_THERMAL
417static 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
423int power_actor_get_max_power(struct thermal_cooling_device *,
424 struct thermal_zone_device *tz, u32 *max_power);
425int power_actor_get_min_power(struct thermal_cooling_device *,
426 struct thermal_zone_device *tz, u32 *min_power);
427int power_actor_set_power(struct thermal_cooling_device *,
428 struct thermal_instance *, u32);
429struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,387struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
430 void *, struct thermal_zone_device_ops *,388 void *, struct thermal_zone_device_ops *,
431 struct thermal_zone_params *, int, int);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 struct thermal_cooling_device *);397 struct thermal_cooling_device *);
440void thermal_zone_device_update(struct thermal_zone_device *,398void thermal_zone_device_update(struct thermal_zone_device *,
441 enum thermal_notify_event);399 enum thermal_notify_event);
442void thermal_zone_set_trips(struct thermal_zone_device *);
443 400
444struct thermal_cooling_device *thermal_cooling_device_register(const char *,401struct thermal_cooling_device *thermal_cooling_device_register(const char *,
445 void *, const struct thermal_cooling_device_ops *);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
457int thermal_zone_get_slope(struct thermal_zone_device *tz);414int thermal_zone_get_slope(struct thermal_zone_device *tz);
458int thermal_zone_get_offset(struct thermal_zone_device *tz);415int thermal_zone_get_offset(struct thermal_zone_device *tz);
459 416
460int get_tz_trend(struct thermal_zone_device *, int);
461struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
462 struct thermal_cooling_device *, int);
463void thermal_cdev_update(struct thermal_cooling_device *);417void thermal_cdev_update(struct thermal_cooling_device *);
464void thermal_notify_framework(struct thermal_zone_device *, int);418void thermal_notify_framework(struct thermal_zone_device *, int);
465#else419#else
466static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
467{ return false; }
468static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev,
469 struct thermal_zone_device *tz, u32 *max_power)
470{ return 0; }
471static 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; }
475static inline int power_actor_set_power(struct thermal_cooling_device *cdev,
476 struct thermal_instance *tz, u32 power)
477{ return 0; }
478static inline struct thermal_zone_device *thermal_zone_device_register(420static inline struct thermal_zone_device *thermal_zone_device_register(
479 const char *type, int trips, int mask, void *devdata,421 const char *type, int trips, int mask, void *devdata,
480 struct thermal_zone_device_ops *ops,422 struct thermal_zone_device_ops *ops,
@@ -484,21 +426,6 @@ static inline struct thermal_zone_device *thermal_zone_device_register( · 3 unmodified lines
484static inline void thermal_zone_device_unregister(426static inline void thermal_zone_device_unregister(
485 struct thermal_zone_device *tz)427 struct thermal_zone_device *tz)
486{ }428{ }
487static 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; }
493static inline int thermal_zone_unbind_cooling_device(
494 struct thermal_zone_device *tz, int trip,
495 struct thermal_cooling_device *cdev)
496{ return -ENODEV; }
497static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
498 enum thermal_notify_event event)
499{ }
500static inline void thermal_zone_set_trips(struct thermal_zone_device *tz)
501{ }
502static inline struct thermal_cooling_device *429static inline struct thermal_cooling_device *
503thermal_cooling_device_register(char *type, void *devdata,430thermal_cooling_device_register(char *type, void *devdata,
504 const struct thermal_cooling_device_ops *ops)431 const struct thermal_cooling_device_ops *ops)
@@ -530,12 +457,7 @@ static inline int thermal_zone_get_slope( · 25 unmodified lines
530static inline int thermal_zone_get_offset(457static inline int thermal_zone_get_offset(
531 struct thermal_zone_device *tz)458 struct thermal_zone_device *tz)
532{ return -ENODEV; }459{ return -ENODEV; }
533static inline int get_tz_trend(struct thermal_zone_device *tz, int trip)460
534{ return -ENODEV; }
535static inline struct thermal_instance *
536get_thermal_instance(struct thermal_zone_device *tz,
537 struct thermal_cooling_device *cdev, int trip)
538{ return ERR_PTR(-ENODEV); }
539static inline void thermal_cdev_update(struct thermal_cooling_device *cdev)461static inline void thermal_cdev_update(struct thermal_cooling_device *cdev)
540{ }462{ }
541static inline void thermal_notify_framework(struct thermal_zone_device *tz,463static 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