Skip to content

Commit d284d6c

Browse files
committed
Merge tag 'thermal-v6.10-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux
Merge thermal driver fixes for 6.10-rc5 from Daniel Lezcano: "- Remove the filtered mode for mt8188 as it is not supported on this platform (Julien Panis) - Fail in case the golden temperature is zero as that means the efuse data is not correctly set (Julien Panis)" * tag 'thermal-v6.10-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data thermal/drivers/mediatek/lvts_thermal: Remove filtered mode for mt8188
2 parents 494c7d0 + 72cacd0 commit d284d6c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

drivers/thermal/mediatek/lvts_thermal.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,11 @@ static int lvts_golden_temp_init(struct device *dev, u8 *calib,
769769
*/
770770
gt = (((u32 *)calib)[0] >> lvts_data->gt_calib_bit_offset) & 0xff;
771771

772-
if (gt && gt < LVTS_GOLDEN_TEMP_MAX)
772+
/* A zero value for gt means that device has invalid efuse data */
773+
if (!gt)
774+
return -ENODATA;
775+
776+
if (gt < LVTS_GOLDEN_TEMP_MAX)
773777
golden_temp = gt;
774778

775779
golden_temp_offset = golden_temp * 500 + lvts_data->temp_offset;
@@ -1458,7 +1462,6 @@ static const struct lvts_ctrl_data mt8188_lvts_mcu_data_ctrl[] = {
14581462
},
14591463
VALID_SENSOR_MAP(1, 1, 1, 1),
14601464
.offset = 0x0,
1461-
.mode = LVTS_MSR_FILTERED_MODE,
14621465
},
14631466
{
14641467
.lvts_sensor = {
@@ -1469,7 +1472,6 @@ static const struct lvts_ctrl_data mt8188_lvts_mcu_data_ctrl[] = {
14691472
},
14701473
VALID_SENSOR_MAP(1, 1, 0, 0),
14711474
.offset = 0x100,
1472-
.mode = LVTS_MSR_FILTERED_MODE,
14731475
}
14741476
};
14751477

@@ -1483,7 +1485,6 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = {
14831485
},
14841486
VALID_SENSOR_MAP(0, 1, 0, 0),
14851487
.offset = 0x0,
1486-
.mode = LVTS_MSR_FILTERED_MODE,
14871488
},
14881489
{
14891490
.lvts_sensor = {
@@ -1496,7 +1497,6 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = {
14961497
},
14971498
VALID_SENSOR_MAP(1, 1, 1, 0),
14981499
.offset = 0x100,
1499-
.mode = LVTS_MSR_FILTERED_MODE,
15001500
},
15011501
{
15021502
.lvts_sensor = {
@@ -1507,7 +1507,6 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = {
15071507
},
15081508
VALID_SENSOR_MAP(1, 1, 0, 0),
15091509
.offset = 0x200,
1510-
.mode = LVTS_MSR_FILTERED_MODE,
15111510
},
15121511
{
15131512
.lvts_sensor = {
@@ -1518,7 +1517,6 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = {
15181517
},
15191518
VALID_SENSOR_MAP(1, 1, 0, 0),
15201519
.offset = 0x300,
1521-
.mode = LVTS_MSR_FILTERED_MODE,
15221520
}
15231521
};
15241522

0 commit comments

Comments
 (0)