diff options
author | Andrzej Pietrasiewicz <andrzej.p@collabora.com> | 2020-06-29 15:29:24 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-06-29 21:26:39 +0300 |
commit | 5d7bd8aa7c35873f448d60ffbd996cfa151d2a11 (patch) | |
tree | 8ac238d6c8de5a562a8f3fefedb7991dc79d2ddb /drivers/thermal/imx_thermal.c | |
parent | b56bdff78e0b65fd2b2ed8eba4c645a7f71ba652 (diff) | |
download | linux-5d7bd8aa7c35873f448d60ffbd996cfa151d2a11.tar.xz |
thermal: Simplify or eliminate unnecessary set_mode() methods
Setting polling_delay is now done at thermal_core level (by not polling
DISABLED devices), so no need to repeat this code.
int340x: Checking for an impossible enum value is unnecessary.
acpi/thermal: It only prints debug messages.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
[for acerhdf]
Acked-by: Peter Kaestle <peter@piie.net>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200629122925.21729-11-andrzej.p@collabora.com
Diffstat (limited to 'drivers/thermal/imx_thermal.c')
-rw-r--r-- | drivers/thermal/imx_thermal.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 53abb1be1cba..a02398118d88 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -338,9 +338,6 @@ static int imx_set_mode(struct thermal_zone_device *tz, const struct thermal_soc_data *soc_data = data->socdata; if (mode == THERMAL_DEVICE_ENABLED) { - tz->polling_delay = IMX_POLLING_DELAY; - tz->passive_delay = IMX_PASSIVE_DELAY; - regmap_write(map, soc_data->sensor_ctrl + REG_CLR, soc_data->power_down_mask); regmap_write(map, soc_data->sensor_ctrl + REG_SET, @@ -356,9 +353,6 @@ static int imx_set_mode(struct thermal_zone_device *tz, regmap_write(map, soc_data->sensor_ctrl + REG_SET, soc_data->power_down_mask); - tz->polling_delay = 0; - tz->passive_delay = 0; - if (data->irq_enabled) { disable_irq(data->irq); data->irq_enabled = false; |