Skip to content

Commit 00707e4

Browse files
miquelraynalEduardo Valentin
authored andcommitted
thermal: armada: remove sensors validity from the IP initialization
When using new bindings with multiple sensors, sensor validity is checked twice because sensor selection also checks for the validity. Remove the redundant call from the IP initialization helper and move it to the legacy probe section where it is still needed. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
1 parent f7c2068 commit 00707e4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/thermal/armada_thermal.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@ static void armada380_init(struct platform_device *pdev,
222222
reg &= ~CONTROL0_TSEN_TC_TRIM_MASK;
223223
reg |= CONTROL0_TSEN_TC_TRIM_VAL;
224224
regmap_write(priv->syscon, data->syscon_control0_off, reg);
225-
226-
/* Wait the sensors to be valid or the core will warn the user */
227-
armada_wait_sensor_validity(priv);
228225
}
229226

230227
static void armada_ap806_init(struct platform_device *pdev,
@@ -244,9 +241,6 @@ static void armada_ap806_init(struct platform_device *pdev,
244241
reg &= ~CONTROL0_TSEN_AVG_BYPASS;
245242

246243
regmap_write(priv->syscon, data->syscon_control0_off, reg);
247-
248-
/* Wait the sensors to be valid or the core will warn the user */
249-
armada_wait_sensor_validity(priv);
250244
}
251245

252246
static void armada_cp110_init(struct platform_device *pdev,
@@ -652,6 +646,9 @@ static int armada_thermal_probe(struct platform_device *pdev)
652646

653647
priv->data->init(pdev, priv);
654648

649+
/* Wait the sensors to be valid */
650+
armada_wait_sensor_validity(priv);
651+
655652
tz = thermal_zone_device_register(priv->zone_name, 0, 0, priv,
656653
&legacy_ops, NULL, 0, 0);
657654
if (IS_ERR(tz)) {

0 commit comments

Comments
 (0)