summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-16 15:47:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-16 15:47:19 -0700
commit15114e8fb58ffd574da83951e89cb5ab0055cc1e (patch)
tree9f0ca1563240e6f6fbd01d348bfaed48af8c3350 /include
parent42b5a01596f1f9471b58a2f59e1fceeb8db79ffc (diff)
parent281cfec53b4484ce2092c89b6909f5573cb23443 (diff)
Merge tag 'thermal-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki: "These add some new hardware support (notably, the Lunar Lake platform support in int340x and X1E80100 temperature sensor), continue to rework the thermal driver interface to eliminate trip point IDs from it, update DT bindings for a number of platforms and simplify probe in a number of thermal drivers, address issues and clean up code. Specifics: - Add DLVR and MSI interrupt support for the Lunar Lake platform to the int340x thermal driver (Srinivas Pandruvada) - Enable workload type hints (WLT) support and power floor interrupt support for the Lunar Lake platform in int340x ((Srinivas Pandruvada) - Switch Intel thermal drivers to new Intel CPU model defines (Tony Luck) - Clean up the int3400 and int3403 drivers (Erick Archer and David Alan Gilbert) - Improve intel_pch_thermal kernel log messages printed during suspend to idle (Zhang Rui) - Make the intel_tcc_cooling driver use a model-specific bitmask for TCC offset (Ricardo Neri) - Redesign the .set_trip_temp() thermal zone callback to take a trip pointer instead of a trip ID and update its users (Rafael Wysocki) - Avoid using invalid combinations of polling_delay and passive_delay thermal zone parameters (Rafael Wysocki) - Update a cooling device registration function to take a const argument (Krzysztof Kozlowski) - Make the uniphier thermal driver use thermal_zone_for_each_trip() for walking trip points (Rafael Wysocki) - Fix and clean up several minor shortcomings in thermal debug (Rafael Wysocki) - Rename __thermal_zone_set_trips() to thermal_zone_set_trips() and make it use trip thresholds (Rafael Wysocki) - Use READ_ONCE() for lockless access to trip temperature and hysteresis (Rafael Wysocki) - Drop unnecessary cooling device target state checks from the Bang-Bang thermal governor (Rafael Wysocki) - Avoid invoking thermal governor .trip_crossed() callback for critical and hot trip points (Rafael Wysocki) - Group all Renesas drivers inside a dedicated sub directory and add the missing dependency to OF (Niklas Söderlund) - Add suspend/resume support on k3_j72xx_bandgap and take the opportunity to remove an unneeded delay in the init time code path (Théo Lebrun) - Fix thermal zone definition for MT8186 and MT8188 (Julien Panis) - Convert hisilicon-thermal.txt to dt-schema (Abdulrasaq Lawani) - Add DT bindings for the X1E80100 temperature sensor (Abel Vesa) - Fix the thermal zone node name regular expression in the DT schema (Krzysztof Kozlowski) - Avoid failing thermal control initialization by using default values on some platforms where calibration data is missing (Chen-Yu Tsai) - Fix the sensor cell size in DT for the Exynos platform (Krzysztof Kozlowski) - Bring the common definition of '#thermal-sensor-cells' property in order to simplify the bindings on all the platforms where this change makes sense and do some minor cleanups (Krzysztof Kozlowski) - Fix a race between removal and clock disable in the broadcom thermal driver (Krzysztof Kozlowski) - Drop 'trips' DT node as required from the thermal zone bindings in order to fix the remaining warnings appearing for thermal zones without trip points (Rob Herring) - Simplify all the drivers where dev_err_probe() can apply (Krzysztof Kozlowski) - Clean up code related to stih416 as this platform is not described anywhere (Raphael Gallais-Pou)" * tag 'thermal-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (81 commits) thermal/drivers/sti: Cleanup code related to stih416 thermal/drivers/generic-adc: Simplify with dev_err_probe() thermal/drivers/generic-adc: Simplify probe() with local dev variable thermal/drivers/qcom-tsens: Simplify with dev_err_probe() thermal/drivers/qcom-spmi-adc-tm5: Simplify with dev_err_probe() thermal/drivers/imx: Simplify with dev_err_probe() thermal/drivers/imx: Simplify probe() with local dev variable thermal/drivers/hisi: Simplify with dev_err_probe() thermal/drivers/exynos: Simplify with dev_err_probe() thermal/drivers/exynos: Simplify probe() with local dev variable thermal/drivers/broadcom: Simplify with dev_err_probe() thermal/drivers/broadcom: Simplify probe() with local dev variable thermal/drivers/broadcom: Fix race between removal and clock disable dt-bindings: thermal: Drop 'trips' node as required dt-bindings: thermal: qoriq: reference thermal-sensor schema dt-bindings: thermal: cleanup examples indentation dt-bindings: thermal: simplify few bindings dt-bindings: thermal: ti,j72xx: reference thermal-sensor schema dt-bindings: thermal: ti,am654: reference thermal-sensor schema dt-bindings: thermal: st,stm32: reference thermal-sensor schema ...
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/thermal/mediatek,lvts-thermal.h12
-rw-r--r--include/linux/intel_tcc.h1
-rw-r--r--include/linux/platform_data/x86/soc.h12
-rw-r--r--include/linux/thermal.h18
4 files changed, 25 insertions, 18 deletions
diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
index bf95309d2525..ddc7302a510a 100644
--- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h
+++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
@@ -24,7 +24,7 @@
#define MT8186_BIG_CPU1 5
#define MT8186_NNA 6
#define MT8186_ADSP 7
-#define MT8186_MFG 8
+#define MT8186_GPU 8
#define MT8188_MCU_LITTLE_CPU0 0
#define MT8188_MCU_LITTLE_CPU1 1
@@ -34,11 +34,11 @@
#define MT8188_MCU_BIG_CPU1 5
#define MT8188_AP_APU 0
-#define MT8188_AP_GPU1 1
-#define MT8188_AP_GPU2 2
-#define MT8188_AP_SOC1 3
-#define MT8188_AP_SOC2 4
-#define MT8188_AP_SOC3 5
+#define MT8188_AP_GPU0 1
+#define MT8188_AP_GPU1 2
+#define MT8188_AP_ADSP 3
+#define MT8188_AP_VDO 4
+#define MT8188_AP_INFRA 5
#define MT8188_AP_CAM1 6
#define MT8188_AP_CAM2 7
diff --git a/include/linux/intel_tcc.h b/include/linux/intel_tcc.h
index 8ff8eabb4a98..fa788817acfc 100644
--- a/include/linux/intel_tcc.h
+++ b/include/linux/intel_tcc.h
@@ -14,5 +14,6 @@ int intel_tcc_get_tjmax(int cpu);
int intel_tcc_get_offset(int cpu);
int intel_tcc_set_offset(int cpu, int offset);
int intel_tcc_get_temp(int cpu, int *temp, bool pkg);
+u32 intel_tcc_get_offset_mask(void);
#endif /* __INTEL_TCC_H__ */
diff --git a/include/linux/platform_data/x86/soc.h b/include/linux/platform_data/x86/soc.h
index a5705189e2ac..f981907a5cb0 100644
--- a/include/linux/platform_data/x86/soc.h
+++ b/include/linux/platform_data/x86/soc.h
@@ -20,7 +20,7 @@
static inline bool soc_intel_is_##soc(void) \
{ \
static const struct x86_cpu_id soc##_cpu_ids[] = { \
- X86_MATCH_INTEL_FAM6_MODEL(type, NULL), \
+ X86_MATCH_VFM(type, NULL), \
{} \
}; \
const struct x86_cpu_id *id; \
@@ -31,11 +31,11 @@ static inline bool soc_intel_is_##soc(void) \
return false; \
}
-SOC_INTEL_IS_CPU(byt, ATOM_SILVERMONT);
-SOC_INTEL_IS_CPU(cht, ATOM_AIRMONT);
-SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT);
-SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS);
-SOC_INTEL_IS_CPU(cml, KABYLAKE_L);
+SOC_INTEL_IS_CPU(byt, INTEL_ATOM_SILVERMONT);
+SOC_INTEL_IS_CPU(cht, INTEL_ATOM_AIRMONT);
+SOC_INTEL_IS_CPU(apl, INTEL_ATOM_GOLDMONT);
+SOC_INTEL_IS_CPU(glk, INTEL_ATOM_GOLDMONT_PLUS);
+SOC_INTEL_IS_CPU(cml, INTEL_KABYLAKE_L);
#undef SOC_INTEL_IS_CPU
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index f1155c0439c4..25fbf960b474 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -79,6 +79,9 @@ struct thermal_trip {
#define THERMAL_TRIP_FLAG_RW (THERMAL_TRIP_FLAG_RW_TEMP | \
THERMAL_TRIP_FLAG_RW_HYST)
+#define THERMAL_TRIP_PRIV_TO_INT(_val_) (uintptr_t)(_val_)
+#define THERMAL_INT_TO_TRIP_PRIV(_val_) (void *)(uintptr_t)(_val_)
+
struct thermal_zone_device;
struct thermal_zone_device_ops {
@@ -90,7 +93,8 @@ struct thermal_zone_device_ops {
int (*set_trips) (struct thermal_zone_device *, int, int);
int (*change_mode) (struct thermal_zone_device *,
enum thermal_device_mode);
- int (*set_trip_temp) (struct thermal_zone_device *, int, int);
+ int (*set_trip_temp) (struct thermal_zone_device *,
+ const struct thermal_trip *, int);
int (*get_crit_temp) (struct thermal_zone_device *, int *);
int (*set_emul_temp) (struct thermal_zone_device *, int);
int (*get_trend) (struct thermal_zone_device *,
@@ -198,8 +202,6 @@ static inline void devm_thermal_of_zone_unregister(struct device *dev,
}
#endif
-int __thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
- struct thermal_trip *trip);
int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
struct thermal_trip *trip);
int for_each_thermal_trip(struct thermal_zone_device *tz,
@@ -221,7 +223,8 @@ struct thermal_zone_device *thermal_zone_device_register_with_trips(
int num_trips, void *devdata,
const struct thermal_zone_device_ops *ops,
const struct thermal_zone_params *tzp,
- int passive_delay, int polling_delay);
+ unsigned int passive_delay,
+ unsigned int polling_delay);
struct thermal_zone_device *thermal_tripless_zone_device_register(
const char *type,
@@ -261,7 +264,7 @@ thermal_of_cooling_device_register(struct device_node *np, const char *, void *,
struct thermal_cooling_device *
devm_thermal_of_cooling_device_register(struct device *dev,
struct device_node *np,
- char *type, void *devdata,
+ const char *type, void *devdata,
const struct thermal_cooling_device_ops *ops);
void thermal_cooling_device_update(struct thermal_cooling_device *);
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
@@ -269,6 +272,9 @@ struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name);
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
int thermal_zone_get_slope(struct thermal_zone_device *tz);
int thermal_zone_get_offset(struct thermal_zone_device *tz);
+bool thermal_trip_is_bound_to_cdev(struct thermal_zone_device *tz,
+ const struct thermal_trip *trip,
+ struct thermal_cooling_device *cdev);
int thermal_zone_device_enable(struct thermal_zone_device *tz);
int thermal_zone_device_disable(struct thermal_zone_device *tz);
@@ -305,7 +311,7 @@ thermal_of_cooling_device_register(struct device_node *np,
static inline struct thermal_cooling_device *
devm_thermal_of_cooling_device_register(struct device *dev,
struct device_node *np,
- char *type, void *devdata,
+ const char *type, void *devdata,
const struct thermal_cooling_device_ops *ops)
{
return ERR_PTR(-ENODEV);