Skip to content

Commit e1242ff

Browse files
committed
Merge tag 'thermal-v6.10-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux into thermal
Merge updates of thermal drivers for v6.10 from Daniel Lezcano: "- Add QCM2290 compatible DT bindings for Lmh and fix a null pointer dereference in the lmh driver in case the SCM is not present (Konrad Dybcio) - Use the strreplace() function instead of doing it manually in the Armada driver (Rasmus Villemoes) - Convert st,stih407-thermal to DT schema and fix up missing properties (Raphael Gallais-Pou) - Add suspend/resume by restoring the context of the tsens sensor (Priyansh Jain) - Support A1 SoC family Thermal Sensor controller and add the DT bindings (Dmitry Rokosov) - Improve the temperature approximation calculation and consolidate the Tj constant into a shared area of the structure instead of duplicating it on the Rcar Gen3 (Niklas Söderlund) - Fix the Mediatek LVTS sensor coefficient for the MT8192 in order to support it correctly (Hsin-Te Yuan) - Fix a null pointer dereference on the tsens driver when the function compute_intercept_slope() is called with a null parameter (Aleksandr Mishin) - Remove some unused fields in struct qpnp_tm_chip and k3_bandgap (Christophe Jaillet) - Fixup calibration efuse data decoding, consolidate the code by checking boundaries and refactor some part of the LVTS Mediatek driver. After setting the scene, add MT8186 and MT8188 along with the DT bindings (Nicolas Pitre) - Add Loongson-2K2000 support after some minor code adjustements and providing the DT bindings definition (Binbin Zhou)" * tag 'thermal-v6.10-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (28 commits) thermal/drivers/loongson2: Add Loongson-2K2000 support dt-bindings: thermal: loongson,ls2k-thermal: Fix incorrect compatible definition dt-bindings: thermal: loongson,ls2k-thermal: Add Loongson-2K0500 compatible thermal/drivers/loongson2: Trivial code style adjustment thermal/drivers/mediatek/lvts_thermal: Add MT8188 support dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8188 thermal/drivers/mediatek/lvts_thermal: Allow early empty sensor slots thermal/drivers/mediatek/lvts_thermal: Provision for gt variable location thermal/drivers/mediatek/lvts_thermal: Add MT8186 support dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8186 thermal/drivers/mediatek/lvts_thermal: Guard against efuse data buffer overflow thermal/drivers/mediatek/lvts_thermal: Use offsets for every calibration byte thermal/drivers/mediatek/lvts_thermal: Remove .hw_tshut_temp thermal/drivers/mediatek/lvts_thermal: Move comment thermal/drivers/mediatek/lvts_thermal: Retrieve all calibration bytes thermal/drivers/k3_bandgap: Remove some unused fields in struct k3_bandgap thermal/drivers/qcom: Remove some unused fields in struct qpnp_tm_chip thermal/drivers/tsens: Fix null pointer dereference thermal/drivers/mediatek/lvts_thermal: Add coeff for mt8192 thermal/drivers/rcar_gen3: Update temperature approximation calculation ...
2 parents 5c897a9 + 734b5de commit e1242ff

18 files changed

+667
-286
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ description: Binding for Amlogic Thermal
1313

1414
properties:
1515
compatible:
16-
items:
17-
- enum:
18-
- amlogic,g12a-cpu-thermal
19-
- amlogic,g12a-ddr-thermal
20-
- const: amlogic,g12a-thermal
16+
oneOf:
17+
- items:
18+
- enum:
19+
- amlogic,g12a-cpu-thermal
20+
- amlogic,g12a-ddr-thermal
21+
- const: amlogic,g12a-thermal
22+
- const: amlogic,a1-cpu-thermal
2123

2224
reg:
2325
maxItems: 1

Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ properties:
1818
oneOf:
1919
- enum:
2020
- loongson,ls2k1000-thermal
21+
- loongson,ls2k2000-thermal
2122
- items:
2223
- enum:
23-
- loongson,ls2k2000-thermal
24+
- loongson,ls2k0500-thermal
2425
- const: loongson,ls2k1000-thermal
2526

2627
reg:
27-
maxItems: 1
28+
minItems: 1
29+
maxItems: 2
2830

2931
interrupts:
3032
maxItems: 1
@@ -38,6 +40,24 @@ required:
3840
- interrupts
3941
- '#thermal-sensor-cells'
4042

43+
if:
44+
properties:
45+
compatible:
46+
contains:
47+
enum:
48+
- loongson,ls2k2000-thermal
49+
50+
then:
51+
properties:
52+
reg:
53+
minItems: 2
54+
maxItems: 2
55+
56+
else:
57+
properties:
58+
reg:
59+
maxItems: 1
60+
4161
unevaluatedProperties: false
4262

4363
examples:

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ properties:
1919
compatible:
2020
enum:
2121
- mediatek,mt7988-lvts-ap
22+
- mediatek,mt8186-lvts
23+
- mediatek,mt8188-lvts-ap
24+
- mediatek,mt8188-lvts-mcu
2225
- mediatek,mt8192-lvts-ap
2326
- mediatek,mt8192-lvts-mcu
2427
- mediatek,mt8195-lvts-ap
@@ -60,6 +63,8 @@ allOf:
6063
compatible:
6164
contains:
6265
enum:
66+
- mediatek,mt8188-lvts-ap
67+
- mediatek,mt8188-lvts-mcu
6368
- mediatek,mt8192-lvts-ap
6469
- mediatek,mt8192-lvts-mcu
6570
then:
@@ -75,6 +80,7 @@ allOf:
7580
compatible:
7681
contains:
7782
enum:
83+
- mediatek,mt8186-lvts
7884
- mediatek,mt8195-lvts-ap
7985
- mediatek,mt8195-lvts-mcu
8086
then:

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ description:
1717

1818
properties:
1919
compatible:
20-
enum:
21-
- qcom,sc8180x-lmh
22-
- qcom,sdm845-lmh
23-
- qcom,sm8150-lmh
20+
oneOf:
21+
- enum:
22+
- qcom,sc8180x-lmh
23+
- qcom,sdm845-lmh
24+
- qcom,sm8150-lmh
25+
- items:
26+
- const: qcom,qcm2290-lmh
27+
- const: qcom,sm8150-lmh
2428

2529
reg:
2630
items:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/thermal/st,stih407-thermal.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: STMicroelectronics STi digital thermal sensor (DTS)
8+
9+
maintainers:
10+
- Patrice Chotard <patrice.chotard@foss.st.com>
11+
- Lee Jones <lee@kernel.org>
12+
13+
allOf:
14+
- $ref: thermal-sensor.yaml
15+
16+
properties:
17+
compatible:
18+
const: st,stih407-thermal
19+
20+
reg:
21+
maxItems: 1
22+
23+
clocks:
24+
maxItems: 1
25+
26+
clock-names:
27+
items:
28+
- const: thermal
29+
30+
interrupts:
31+
description:
32+
For thermal sensors for which no interrupt has been defined, a polling
33+
delay of 1000ms will be used to read the temperature from device.
34+
maxItems: 1
35+
36+
'#thermal-sensor-cells':
37+
const: 0
38+
39+
required:
40+
- compatible
41+
- reg
42+
- clocks
43+
- clock-names
44+
45+
unevaluatedProperties: false
46+
47+
examples:
48+
- |
49+
#include <dt-bindings/interrupt-controller/arm-gic.h>
50+
temperature-sensor@91a0000 {
51+
compatible = "st,stih407-thermal";
52+
reg = <0x91a0000 0x28>;
53+
clock-names = "thermal";
54+
clocks = <&CLK_SYSIN>;
55+
interrupts = <GIC_SPI 205 IRQ_TYPE_EDGE_RISING>;
56+
#thermal-sensor-cells = <0>;
57+
};
58+
...

Documentation/devicetree/bindings/thermal/st-thermal.txt

Lines changed: 0 additions & 32 deletions
This file was deleted.

drivers/thermal/amlogic_thermal.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
220220
.regmap_config = &amlogic_thermal_regmap_config_g12a,
221221
};
222222

223+
static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
224+
.u_efuse_off = 0x114,
225+
.calibration_parameters = &amlogic_thermal_g12a,
226+
.regmap_config = &amlogic_thermal_regmap_config_g12a,
227+
};
228+
223229
static const struct of_device_id of_amlogic_thermal_match[] = {
224230
{
225231
.compatible = "amlogic,g12a-ddr-thermal",
@@ -229,6 +235,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
229235
.compatible = "amlogic,g12a-cpu-thermal",
230236
.data = &amlogic_thermal_g12a_cpu_param,
231237
},
238+
{
239+
.compatible = "amlogic,a1-cpu-thermal",
240+
.data = &amlogic_thermal_a1_cpu_param,
241+
},
232242
{ /* sentinel */ }
233243
};
234244
MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);

drivers/thermal/armada_thermal.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,6 @@ static void armada_set_sane_name(struct platform_device *pdev,
763763
struct armada_thermal_priv *priv)
764764
{
765765
const char *name = dev_name(&pdev->dev);
766-
char *insane_char;
767766

768767
if (strlen(name) > THERMAL_NAME_LENGTH) {
769768
/*
@@ -781,12 +780,8 @@ static void armada_set_sane_name(struct platform_device *pdev,
781780
/* Save the name locally */
782781
strscpy(priv->zone_name, name, THERMAL_NAME_LENGTH);
783782

784-
/* Then check there are no '-' or hwmon core will complain */
785-
do {
786-
insane_char = strpbrk(priv->zone_name, "-");
787-
if (insane_char)
788-
*insane_char = '_';
789-
} while (insane_char);
783+
/* Then ensure there are no '-' or hwmon core will complain */
784+
strreplace(priv->zone_name, '-', '_');
790785
}
791786

792787
/*

drivers/thermal/k3_bandgap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ static const int k3_adc_to_temp[] = {
7878

7979
struct k3_bandgap {
8080
void __iomem *base;
81-
const struct k3_bandgap_data *conf;
8281
};
8382

8483
/* common data structures */

0 commit comments

Comments
 (0)