Skip to content

Commit eb78332

Browse files
committed
Merge tag 'thermal-6.13-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more thermal control updates from Rafael Wysocki: "These update a few thermal drivers used on ARM platforms and thermal tools: - Add SAR2130P compatible to DT bindings in the QCom Tsens driver (Dmitry Baryshkov) - Add static annotation to arrays describing platform sensors in the LVTS Mediatek driver (Colin Ian King) - Switch back to struct platform_driver::remove() from the previous callbacks prototype rework (Uwe Kleine-König) - Add MSM8937 compatible to DT bindings and its support in the QCom Tsens driver (Barnabás Czémán) - Remove a pointless sign test on an unsigned value in k3_bgp_read_temp() in the k3_j72xx_bandgap driver (Rex Nie) - Fix a pointer reference loss when realloc() fails in the thermal library (Zhang Jiao)" * tag 'thermal-6.13-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/thermal: Fix common realloc mistake thermal/drivers/k3_j72xx_bandgap: Simplify code in k3_bgp_read_temp() thermal/drivers/qcom/tsens-v1: Add support for MSM8937 tsens dt-bindings: thermal: tsens: Add MSM8937 thermal: Switch back to struct platform_driver::remove() thermal/drivers/mediatek/lvts_thermal: Make read-only arrays static const dt-bindings: thermal: qcom-tsens: Add SAR2130P compatible
2 parents 6f9baa9 + fef664f commit eb78332

36 files changed

+62
-49
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ properties:
3939
- description: v1 of TSENS
4040
items:
4141
- enum:
42+
- qcom,msm8937-tsens
4243
- qcom,msm8956-tsens
4344
- qcom,msm8976-tsens
4445
- qcom,qcs404-tsens
@@ -53,6 +54,7 @@ properties:
5354
- qcom,qcm2290-tsens
5455
- qcom,sa8255p-tsens
5556
- qcom,sa8775p-tsens
57+
- qcom,sar2130p-tsens
5658
- qcom,sc7180-tsens
5759
- qcom,sc7280-tsens
5860
- qcom,sc8180x-tsens

drivers/thermal/amlogic_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static struct platform_driver amlogic_thermal_driver = {
333333
.of_match_table = of_amlogic_thermal_match,
334334
},
335335
.probe = amlogic_thermal_probe,
336-
.remove_new = amlogic_thermal_remove,
336+
.remove = amlogic_thermal_remove,
337337
};
338338

339339
module_platform_driver(amlogic_thermal_driver);

drivers/thermal/armada_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ static void armada_thermal_exit(struct platform_device *pdev)
970970

971971
static struct platform_driver armada_thermal_driver = {
972972
.probe = armada_thermal_probe,
973-
.remove_new = armada_thermal_exit,
973+
.remove = armada_thermal_exit,
974974
.driver = {
975975
.name = "armada_thermal",
976976
.of_match_table = armada_thermal_id_table,

drivers/thermal/broadcom/bcm2835_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void bcm2835_thermal_remove(struct platform_device *pdev)
268268

269269
static struct platform_driver bcm2835_thermal_driver = {
270270
.probe = bcm2835_thermal_probe,
271-
.remove_new = bcm2835_thermal_remove,
271+
.remove = bcm2835_thermal_remove,
272272
.driver = {
273273
.name = "bcm2835_thermal",
274274
.of_match_table = bcm2835_thermal_of_match_table,

drivers/thermal/broadcom/ns-thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ MODULE_DEVICE_TABLE(of, ns_thermal_of_match);
8080

8181
static struct platform_driver ns_thermal_driver = {
8282
.probe = ns_thermal_probe,
83-
.remove_new = ns_thermal_remove,
83+
.remove = ns_thermal_remove,
8484
.driver = {
8585
.name = "ns-thermal",
8686
.of_match_table = ns_thermal_of_match,

drivers/thermal/da9062-thermal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ static void da9062_thermal_remove(struct platform_device *pdev)
250250

251251
static struct platform_driver da9062_thermal_driver = {
252252
.probe = da9062_thermal_probe,
253-
.remove_new = da9062_thermal_remove,
253+
.remove = da9062_thermal_remove,
254254
.driver = {
255-
.name = "da9062-thermal",
256-
.of_match_table = da9062_compatible_reg_id_table,
255+
.name = "da9062-thermal",
256+
.of_match_table = da9062_compatible_reg_id_table,
257257
},
258258
};
259259

drivers/thermal/dove_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ MODULE_DEVICE_TABLE(of, dove_thermal_id_table);
170170

171171
static struct platform_driver dove_thermal_driver = {
172172
.probe = dove_thermal_probe,
173-
.remove_new = dove_thermal_exit,
173+
.remove = dove_thermal_exit,
174174
.driver = {
175175
.name = "dove_thermal",
176176
.of_match_table = dove_thermal_id_table,

drivers/thermal/hisi_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,10 @@ static struct platform_driver hisi_thermal_driver = {
637637
.driver = {
638638
.name = "hisi_thermal",
639639
.pm = pm_sleep_ptr(&hisi_thermal_pm_ops),
640-
.of_match_table = of_hisi_thermal_match,
640+
.of_match_table = of_hisi_thermal_match,
641641
},
642642
.probe = hisi_thermal_probe,
643-
.remove_new = hisi_thermal_remove,
643+
.remove = hisi_thermal_remove,
644644
};
645645

646646
module_platform_driver(hisi_thermal_driver);

drivers/thermal/imx8mm_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static struct platform_driver imx8mm_tmu = {
399399
.of_match_table = imx8mm_tmu_table,
400400
},
401401
.probe = imx8mm_tmu_probe,
402-
.remove_new = imx8mm_tmu_remove,
402+
.remove = imx8mm_tmu_remove,
403403
};
404404
module_platform_driver(imx8mm_tmu);
405405

drivers/thermal/imx_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ static struct platform_driver imx_thermal = {
861861
.of_match_table = of_imx_thermal_match,
862862
},
863863
.probe = imx_thermal_probe,
864-
.remove_new = imx_thermal_remove,
864+
.remove = imx_thermal_remove,
865865
};
866866
module_platform_driver(imx_thermal);
867867

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ MODULE_DEVICE_TABLE(acpi, int3400_thermal_match);
707707

708708
static struct platform_driver int3400_thermal_driver = {
709709
.probe = int3400_thermal_probe,
710-
.remove_new = int3400_thermal_remove,
710+
.remove = int3400_thermal_remove,
711711
.driver = {
712712
.name = "int3400 thermal",
713713
.acpi_match_table = ACPI_PTR(int3400_thermal_match),

drivers/thermal/intel/int340x_thermal/int3401_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static SIMPLE_DEV_PM_OPS(int3401_proc_thermal_pm, int3401_thermal_suspend,
6060

6161
static struct platform_driver int3401_driver = {
6262
.probe = int3401_add,
63-
.remove_new = int3401_remove,
63+
.remove = int3401_remove,
6464
.driver = {
6565
.name = "int3401 thermal",
6666
.acpi_match_table = int3401_device_ids,

drivers/thermal/intel/int340x_thermal/int3402_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ MODULE_DEVICE_TABLE(acpi, int3402_thermal_match);
8989

9090
static struct platform_driver int3402_thermal_driver = {
9191
.probe = int3402_thermal_probe,
92-
.remove_new = int3402_thermal_remove,
92+
.remove = int3402_thermal_remove,
9393
.driver = {
9494
.name = "int3402 thermal",
9595
.acpi_match_table = int3402_thermal_match,

drivers/thermal/intel/int340x_thermal/int3403_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ MODULE_DEVICE_TABLE(acpi, int3403_device_ids);
281281

282282
static struct platform_driver int3403_driver = {
283283
.probe = int3403_add,
284-
.remove_new = int3403_remove,
284+
.remove = int3403_remove,
285285
.driver = {
286286
.name = "int3403 thermal",
287287
.acpi_match_table = int3403_device_ids,

drivers/thermal/intel/int340x_thermal/int3406_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ MODULE_DEVICE_TABLE(acpi, int3406_thermal_match);
195195

196196
static struct platform_driver int3406_thermal_driver = {
197197
.probe = int3406_thermal_probe,
198-
.remove_new = int3406_thermal_remove,
198+
.remove = int3406_thermal_remove,
199199
.driver = {
200200
.name = "int3406 thermal",
201201
.acpi_match_table = int3406_thermal_match,

drivers/thermal/k3_bandgap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ MODULE_DEVICE_TABLE(of, of_k3_bandgap_match);
250250

251251
static struct platform_driver k3_bandgap_sensor_driver = {
252252
.probe = k3_bandgap_probe,
253-
.remove_new = k3_bandgap_remove,
253+
.remove = k3_bandgap_remove,
254254
.driver = {
255255
.name = "k3-soc-thermal",
256256
.of_match_table = of_k3_bandgap_match,

drivers/thermal/k3_j72xx_bandgap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static inline int k3_bgp_read_temp(struct k3_thermal_data *devdata,
238238
K3_VTM_TS_STAT_DTEMP_MASK;
239239
dtemp = vtm_get_best_value(s0, s1, s2);
240240

241-
if (dtemp < 0 || dtemp >= TABLE_SIZE)
241+
if (dtemp >= TABLE_SIZE)
242242
return -EINVAL;
243243

244244
*temp = derived_table[dtemp];
@@ -594,7 +594,7 @@ MODULE_DEVICE_TABLE(of, of_k3_j72xx_bandgap_match);
594594

595595
static struct platform_driver k3_j72xx_bandgap_sensor_driver = {
596596
.probe = k3_j72xx_bandgap_probe,
597-
.remove_new = k3_j72xx_bandgap_remove,
597+
.remove = k3_j72xx_bandgap_remove,
598598
.driver = {
599599
.name = "k3-j72xx-soc-thermal",
600600
.of_match_table = of_k3_j72xx_bandgap_match,

drivers/thermal/kirkwood_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ MODULE_DEVICE_TABLE(of, kirkwood_thermal_id_table);
102102

103103
static struct platform_driver kirkwood_thermal_driver = {
104104
.probe = kirkwood_thermal_probe,
105-
.remove_new = kirkwood_thermal_exit,
105+
.remove = kirkwood_thermal_exit,
106106
.driver = {
107107
.name = "kirkwood_thermal",
108108
.of_match_table = kirkwood_thermal_id_table,

drivers/thermal/mediatek/lvts_thermal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static int lvts_get_temp(struct thermal_zone_device *tz, int *temp)
329329

330330
static void lvts_update_irq_mask(struct lvts_ctrl *lvts_ctrl)
331331
{
332-
u32 masks[] = {
332+
static const u32 masks[] = {
333333
LVTS_MONINT_OFFSET_SENSOR0,
334334
LVTS_MONINT_OFFSET_SENSOR1,
335335
LVTS_MONINT_OFFSET_SENSOR2,
@@ -424,7 +424,7 @@ static irqreturn_t lvts_ctrl_irq_handler(struct lvts_ctrl *lvts_ctrl)
424424
{
425425
irqreturn_t iret = IRQ_NONE;
426426
u32 value;
427-
u32 masks[] = {
427+
static const u32 masks[] = {
428428
LVTS_INT_SENSOR0,
429429
LVTS_INT_SENSOR1,
430430
LVTS_INT_SENSOR2,
@@ -1788,7 +1788,7 @@ static const struct dev_pm_ops lvts_pm_ops = {
17881788

17891789
static struct platform_driver lvts_driver = {
17901790
.probe = lvts_probe,
1791-
.remove_new = lvts_remove,
1791+
.remove = lvts_remove,
17921792
.driver = {
17931793
.name = "mtk-lvts-thermal",
17941794
.of_match_table = lvts_of_match,

drivers/thermal/qcom/tsens-v1.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,28 +162,35 @@ struct tsens_plat_data data_tsens_v1 = {
162162
.fields = tsens_v1_regfields,
163163
};
164164

165-
static const struct tsens_ops ops_8956 = {
166-
.init = init_8956,
165+
static const struct tsens_ops ops_common = {
166+
.init = init_common,
167167
.calibrate = tsens_calibrate_common,
168168
.get_temp = get_temp_tsens_valid,
169169
};
170170

171-
struct tsens_plat_data data_8956 = {
171+
struct tsens_plat_data data_8937 = {
172172
.num_sensors = 11,
173-
.ops = &ops_8956,
173+
.ops = &ops_common,
174174
.feat = &tsens_v1_feat,
175175
.fields = tsens_v1_regfields,
176176
};
177177

178-
static const struct tsens_ops ops_8976 = {
179-
.init = init_common,
178+
static const struct tsens_ops ops_8956 = {
179+
.init = init_8956,
180180
.calibrate = tsens_calibrate_common,
181181
.get_temp = get_temp_tsens_valid,
182182
};
183183

184+
struct tsens_plat_data data_8956 = {
185+
.num_sensors = 11,
186+
.ops = &ops_8956,
187+
.feat = &tsens_v1_feat,
188+
.fields = tsens_v1_regfields,
189+
};
190+
184191
struct tsens_plat_data data_8976 = {
185192
.num_sensors = 11,
186-
.ops = &ops_8976,
193+
.ops = &ops_common,
187194
.feat = &tsens_v1_feat,
188195
.fields = tsens_v1_regfields,
189196
};

drivers/thermal/qcom/tsens.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,9 @@ static const struct of_device_id tsens_table[] = {
11191119
}, {
11201120
.compatible = "qcom,msm8916-tsens",
11211121
.data = &data_8916,
1122+
}, {
1123+
.compatible = "qcom,msm8937-tsens",
1124+
.data = &data_8937,
11221125
}, {
11231126
.compatible = "qcom,msm8939-tsens",
11241127
.data = &data_8939,
@@ -1360,7 +1363,7 @@ static void tsens_remove(struct platform_device *pdev)
13601363

13611364
static struct platform_driver tsens_driver = {
13621365
.probe = tsens_probe,
1363-
.remove_new = tsens_remove,
1366+
.remove = tsens_remove,
13641367
.driver = {
13651368
.name = "qcom-tsens",
13661369
.pm = &tsens_pm_ops,

drivers/thermal/qcom/tsens.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ extern struct tsens_plat_data data_8960;
647647
extern struct tsens_plat_data data_8226, data_8909, data_8916, data_8939, data_8974, data_9607;
648648

649649
/* TSENS v1 targets */
650-
extern struct tsens_plat_data data_tsens_v1, data_8976, data_8956;
650+
extern struct tsens_plat_data data_tsens_v1, data_8937, data_8976, data_8956;
651651

652652
/* TSENS v2 targets */
653653
extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;

drivers/thermal/renesas/rcar_gen3_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ static struct platform_driver rcar_gen3_thermal_driver = {
603603
.of_match_table = rcar_gen3_thermal_dt_ids,
604604
},
605605
.probe = rcar_gen3_thermal_probe,
606-
.remove_new = rcar_gen3_thermal_remove,
606+
.remove = rcar_gen3_thermal_remove,
607607
};
608608
module_platform_driver(rcar_gen3_thermal_driver);
609609

drivers/thermal/renesas/rcar_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static struct platform_driver rcar_thermal_driver = {
579579
.of_match_table = rcar_thermal_dt_ids,
580580
},
581581
.probe = rcar_thermal_probe,
582-
.remove_new = rcar_thermal_remove,
582+
.remove = rcar_thermal_remove,
583583
};
584584
module_platform_driver(rcar_thermal_driver);
585585

drivers/thermal/renesas/rzg2l_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static struct platform_driver rzg2l_thermal_driver = {
240240
.of_match_table = rzg2l_thermal_dt_ids,
241241
},
242242
.probe = rzg2l_thermal_probe,
243-
.remove_new = rzg2l_thermal_remove,
243+
.remove = rzg2l_thermal_remove,
244244
};
245245
module_platform_driver(rzg2l_thermal_driver);
246246

drivers/thermal/rockchip_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ static struct platform_driver rockchip_thermal_driver = {
16891689
.of_match_table = of_rockchip_thermal_match,
16901690
},
16911691
.probe = rockchip_thermal_probe,
1692-
.remove_new = rockchip_thermal_remove,
1692+
.remove = rockchip_thermal_remove,
16931693
};
16941694

16951695
module_platform_driver(rockchip_thermal_driver);

drivers/thermal/samsung/exynos_tmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ static struct platform_driver exynos_tmu_driver = {
11641164
.of_match_table = exynos_tmu_match,
11651165
},
11661166
.probe = exynos_tmu_probe,
1167-
.remove_new = exynos_tmu_remove,
1167+
.remove = exynos_tmu_remove,
11681168
};
11691169

11701170
module_platform_driver(exynos_tmu_driver);

drivers/thermal/spear_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ MODULE_DEVICE_TABLE(of, spear_thermal_id_table);
173173

174174
static struct platform_driver spear_thermal_driver = {
175175
.probe = spear_thermal_probe,
176-
.remove_new = spear_thermal_exit,
176+
.remove = spear_thermal_exit,
177177
.driver = {
178178
.name = "spear_thermal",
179179
.pm = &spear_thermal_pm_ops,

drivers/thermal/sprd_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static const struct dev_pm_ops sprd_thermal_pm_ops = {
534534

535535
static struct platform_driver sprd_thermal_driver = {
536536
.probe = sprd_thm_probe,
537-
.remove_new = sprd_thm_remove,
537+
.remove = sprd_thm_remove,
538538
.driver = {
539539
.name = "sprd-thermal",
540540
.pm = &sprd_thermal_pm_ops,

drivers/thermal/st/st_thermal_memmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static struct platform_driver st_mmap_thermal_driver = {
174174
.of_match_table = st_mmap_thermal_of_match,
175175
},
176176
.probe = st_mmap_probe,
177-
.remove_new = st_mmap_remove,
177+
.remove = st_mmap_remove,
178178
};
179179

180180
module_platform_driver(st_mmap_thermal_driver);

drivers/thermal/st/stm_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ static struct platform_driver stm_thermal_driver = {
582582
.of_match_table = stm_thermal_of_match,
583583
},
584584
.probe = stm_thermal_probe,
585-
.remove_new = stm_thermal_remove,
585+
.remove = stm_thermal_remove,
586586
};
587587
module_platform_driver(stm_thermal_driver);
588588

drivers/thermal/tegra/soctherm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ static SIMPLE_DEV_PM_OPS(tegra_soctherm_pm, soctherm_suspend, soctherm_resume);
22692269

22702270
static struct platform_driver tegra_soctherm_driver = {
22712271
.probe = tegra_soctherm_probe,
2272-
.remove_new = tegra_soctherm_remove,
2272+
.remove = tegra_soctherm_remove,
22732273
.driver = {
22742274
.name = "tegra_soctherm",
22752275
.pm = &tegra_soctherm_pm,

drivers/thermal/tegra/tegra-bpmp-thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ MODULE_DEVICE_TABLE(of, tegra_bpmp_thermal_of_match);
315315

316316
static struct platform_driver tegra_bpmp_thermal_driver = {
317317
.probe = tegra_bpmp_thermal_probe,
318-
.remove_new = tegra_bpmp_thermal_remove,
318+
.remove = tegra_bpmp_thermal_remove,
319319
.driver = {
320320
.name = "tegra-bpmp-thermal",
321321
.of_match_table = tegra_bpmp_thermal_of_match,

drivers/thermal/ti-soc-thermal/ti-bandgap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ MODULE_DEVICE_TABLE(of, of_ti_bandgap_match);
12811281

12821282
static struct platform_driver ti_bandgap_sensor_driver = {
12831283
.probe = ti_bandgap_probe,
1284-
.remove_new = ti_bandgap_remove,
1284+
.remove = ti_bandgap_remove,
12851285
.driver = {
12861286
.name = "ti-soc-thermal",
12871287
.pm = DEV_PM_OPS,

0 commit comments

Comments
 (0)