Skip to content

Commit e30fc09

Browse files
committed
Merge tag 'thermal-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki: "These update the thermal control sysfs interface and multiple thermal control drivers: - Convert EAGAIN into ENODATA in temp_show() to prevent user space from polling the sysfs file in vain after a failing O_NONBLOCK read under the assumption that the read would have blocked (Hsin-Te Yuan) - Add Wildcat Lake PCI ID to the int340x Intel processor thermal driver (Srinivas Pandruvada) - Add debugfs interface to override the temperature set by the firmware in the Intel platform temperature control (PTC) interface and add a new sysfs control attribute called thermal_tolerance to it (Srinivas Pandruvada) - Enable the stage 2 shutdown in the qcom-spmi-temp-alarm thermal driver and add support for more SPMI variants to it (Anjelique Melendez) - Constify the thermal_zone_device_ops structure where possible in several assorted thermal drivers (Christophe Jaillet) - Use the dev_fwnode() helper instead of of_fwnode_handle(), as it is more adequate, wherever possible in thermal drivers (Jiri Slaby) - Implement and document One-Time Programmable fuse support in the Rockchip thermal driver in order to increase the precision of the measurements (Nicolas Frattaroli) - Change the way the Mediatek LTVS thermal driver stores the initialization data sequence to support different sequences matching different platforms. Introduce mt7988 support with a new initialization sequence (Mason Chang) - Document the QCom TSens Milos Temperature Sensor DT bindings (Luca Weiss) - Add the fallback compatible string for MT7981 and MT8516 DT bindings (Aleksander Jan Bajkowski) - Add the compatible string for the Tegra210B01 SOC_THERM driver (Aaron Kling)" * tag 'thermal-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits) dt-bindings: thermal: tegra: Document Tegra210B01 dt-bindings: thermal: mediatek: Add fallback compatible string for MT7981 and MT8516 dt-bindings: thermal: qcom-tsens: document the Milos Temperature Sensor thermal/drivers/mediatek/lvts_thermal: Add mt7988 lvts commands thermal/drivers/mediatek/lvts_thermal: Add lvts commands and their sizes to driver data thermal/drivers/mediatek/lvts_thermal: Change lvts commands array to static const thermal/drivers/rockchip: Support reading trim values from OTP dt-bindings: thermal: rockchip: document otp thermal trim thermal/drivers/rockchip: Support RK3576 SoC in the thermal driver dt-bindings: rockchip-thermal: Add RK3576 compatible thermal/drivers/rockchip: Rename rk_tsadcv3_tshut_mode thermal: Use dev_fwnode() thermal: Constify struct thermal_zone_device_ops thermal/drivers/loongson2: Constify struct thermal_zone_device_ops thermal/drivers/qcom-spmi-temp-alarm: Add support for LITE PMIC peripherals thermal/drivers/qcom-spmi-temp-alarm: Add support for GEN2 rev 2 PMIC peripherals thermal/drivers/qcom-spmi-temp-alarm: Prepare to support additional Temp Alarm subtypes thermal/drivers/qcom-spmi-temp-alarm: Add temp alarm data struct based on HW subtype thermal/drivers/qcom-spmi-temp-alarm: Enable stage 2 shutdown when required thermal: sysfs: Return ENODATA instead of EAGAIN for reads ...
2 parents 9bbf8e1 + 1e94cb6 commit e30fc09

26 files changed

+1013
-149
lines changed

Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,23 @@ allOf:
2020

2121
properties:
2222
compatible:
23-
enum:
24-
- mediatek,mt2701-thermal
25-
- mediatek,mt2712-thermal
26-
- mediatek,mt7622-thermal
27-
- mediatek,mt7981-thermal
28-
- mediatek,mt7986-thermal
29-
- mediatek,mt8173-thermal
30-
- mediatek,mt8183-thermal
31-
- mediatek,mt8365-thermal
32-
- mediatek,mt8516-thermal
23+
oneOf:
24+
- enum:
25+
- mediatek,mt2701-thermal
26+
- mediatek,mt2712-thermal
27+
- mediatek,mt7622-thermal
28+
- mediatek,mt7986-thermal
29+
- mediatek,mt8173-thermal
30+
- mediatek,mt8183-thermal
31+
- mediatek,mt8365-thermal
32+
- items:
33+
- enum:
34+
- mediatek,mt8516-thermal
35+
- const: mediatek,mt2701-thermal
36+
- items:
37+
- enum:
38+
- mediatek,mt7981-thermal
39+
- const: mediatek,mt7986-thermal
3340

3441
reg:
3542
maxItems: 1

Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ properties:
2121
- nvidia,tegra124-soctherm
2222
- nvidia,tegra132-soctherm
2323
- nvidia,tegra210-soctherm
24+
- nvidia,tegra210b01-soctherm
2425

2526
reg:
2627
maxItems: 2
@@ -207,6 +208,7 @@ allOf:
207208
enum:
208209
- nvidia,tegra124-soctherm
209210
- nvidia,tegra210-soctherm
211+
- nvidia,tegra210b01-soctherm
210212
then:
211213
properties:
212214
reg:

Documentation/devicetree/bindings/thermal/qcom-tsens.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ properties:
4949
- description: v2 of TSENS
5050
items:
5151
- enum:
52+
- qcom,milos-tsens
5253
- qcom,msm8953-tsens
5354
- qcom,msm8996-tsens
5455
- qcom,msm8998-tsens

Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ properties:
2121
- rockchip,rk3368-tsadc
2222
- rockchip,rk3399-tsadc
2323
- rockchip,rk3568-tsadc
24+
- rockchip,rk3576-tsadc
2425
- rockchip,rk3588-tsadc
2526
- rockchip,rv1108-tsadc
2627

@@ -39,6 +40,17 @@ properties:
3940
- const: tsadc
4041
- const: apb_pclk
4142

43+
nvmem-cells:
44+
items:
45+
- description: cell handle to where the trim's base temperature is stored
46+
- description:
47+
cell handle to where the trim's tenths of Celsius base value is stored
48+
49+
nvmem-cell-names:
50+
items:
51+
- const: trim_base
52+
- const: trim_base_frac
53+
4254
resets:
4355
minItems: 1
4456
maxItems: 3
@@ -50,6 +62,12 @@ properties:
5062
- const: tsadc
5163
- const: tsadc-phy
5264

65+
"#address-cells":
66+
const: 1
67+
68+
"#size-cells":
69+
const: 0
70+
5371
"#thermal-sensor-cells":
5472
const: 1
5573

@@ -71,6 +89,27 @@ properties:
7189
$ref: /schemas/types.yaml#/definitions/uint32
7290
enum: [0, 1]
7391

92+
patternProperties:
93+
"@[0-9a-f]+$":
94+
type: object
95+
properties:
96+
reg:
97+
maxItems: 1
98+
description: sensor ID, a.k.a. channel number
99+
100+
nvmem-cells:
101+
items:
102+
- description: handle of cell containing calibration data
103+
104+
nvmem-cell-names:
105+
items:
106+
- const: trim
107+
108+
required:
109+
- reg
110+
111+
unevaluatedProperties: false
112+
74113
required:
75114
- compatible
76115
- reg
@@ -79,6 +118,29 @@ required:
79118
- clock-names
80119
- resets
81120

121+
allOf:
122+
- if:
123+
not:
124+
properties:
125+
compatible:
126+
contains:
127+
const: rockchip,rk3568-tsadc
128+
then:
129+
properties:
130+
nvmem-cells: false
131+
nvmem-cell-names: false
132+
- if:
133+
not:
134+
properties:
135+
compatible:
136+
contains:
137+
enum:
138+
- rockchip,rk3568-tsadc
139+
- rockchip,rk3576-tsadc
140+
then:
141+
patternProperties:
142+
"@[0-9a-f]+$": false
143+
82144
unevaluatedProperties: false
83145

84146
examples:

Documentation/driver-api/thermal/intel_dptf.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,15 @@ All these controls needs admin privilege to update.
206206
Update a new temperature target in milli degree celsius for hardware to
207207
use for the temperature control.
208208

209+
``thermal_tolerance`` (RW)
210+
This attribute ranges from 0 to 7, where 0 represents
211+
the most aggressive control to avoid any temperature overshoots, and
212+
7 represents a more graceful approach, favoring performance even at
213+
the expense of temperature overshoots.
214+
Note: This level may not scale linearly. For example, a value of 3 does
215+
not necessarily imply a 50% improvement in performance compared to a
216+
value of 0.
217+
209218
Given that this is platform temperature control, it is expected that a
210219
single user-level manager owns and manages the controls. If multiple
211220
user-level software applications attempt to write different targets, it

drivers/thermal/armada_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ static int armada_get_temp_legacy(struct thermal_zone_device *thermal,
408408
return ret;
409409
}
410410

411-
static struct thermal_zone_device_ops legacy_ops = {
411+
static const struct thermal_zone_device_ops legacy_ops = {
412412
.get_temp = armada_get_temp_legacy,
413413
};
414414

drivers/thermal/da9062-thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static int da9062_thermal_get_temp(struct thermal_zone_device *z,
137137
return 0;
138138
}
139139

140-
static struct thermal_zone_device_ops da9062_thermal_ops = {
140+
static const struct thermal_zone_device_ops da9062_thermal_ops = {
141141
.get_temp = da9062_thermal_get_temp,
142142
};
143143

drivers/thermal/dove_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static int dove_get_temp(struct thermal_zone_device *thermal,
106106
return 0;
107107
}
108108

109-
static struct thermal_zone_device_ops ops = {
109+
static const struct thermal_zone_device_ops ops = {
110110
.get_temp = dove_get_temp,
111111
};
112112

drivers/thermal/imx_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static bool imx_should_bind(struct thermal_zone_device *tz,
361361
return trip->type == THERMAL_TRIP_PASSIVE;
362362
}
363363

364-
static struct thermal_zone_device_ops imx_tz_ops = {
364+
static const struct thermal_zone_device_ops imx_tz_ops = {
365365
.should_bind = imx_should_bind,
366366
.get_temp = imx_get_temp,
367367
.change_mode = imx_change_mode,

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ static int int3400_thermal_change_mode(struct thermal_zone_device *thermal,
515515
return result;
516516
}
517517

518-
static struct thermal_zone_device_ops int3400_thermal_ops = {
518+
static const struct thermal_zone_device_ops int3400_thermal_ops = {
519519
.get_temp = int3400_thermal_get_temp,
520520
.change_mode = int3400_thermal_change_mode,
521521
};

0 commit comments

Comments
 (0)