diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-07-16 16:41:53 +0200 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2018-07-27 14:43:10 -0700 |
commit | 00707e4c9618949d492f685c324326f39f08ea9c (patch) | |
tree | 26805bccb3600faab987942db635516998d34b18 /drivers/thermal/armada_thermal.c | |
parent | f7c2068a1728c1b2aed9416b071a3e2f8f887786 (diff) |
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>
Diffstat (limited to 'drivers/thermal/armada_thermal.c')
-rw-r--r-- | drivers/thermal/armada_thermal.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index e20d4f954f21..1f6bc317748d 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -222,9 +222,6 @@ static void armada380_init(struct platform_device *pdev, reg &= ~CONTROL0_TSEN_TC_TRIM_MASK; reg |= CONTROL0_TSEN_TC_TRIM_VAL; regmap_write(priv->syscon, data->syscon_control0_off, reg); - - /* Wait the sensors to be valid or the core will warn the user */ - armada_wait_sensor_validity(priv); } static void armada_ap806_init(struct platform_device *pdev, @@ -244,9 +241,6 @@ static void armada_ap806_init(struct platform_device *pdev, reg &= ~CONTROL0_TSEN_AVG_BYPASS; regmap_write(priv->syscon, data->syscon_control0_off, reg); - - /* Wait the sensors to be valid or the core will warn the user */ - armada_wait_sensor_validity(priv); } static void armada_cp110_init(struct platform_device *pdev, @@ -652,6 +646,9 @@ static int armada_thermal_probe(struct platform_device *pdev) priv->data->init(pdev, priv); + /* Wait the sensors to be valid */ + armada_wait_sensor_validity(priv); + tz = thermal_zone_device_register(priv->zone_name, 0, 0, priv, &legacy_ops, NULL, 0, 0); if (IS_ERR(tz)) { |