lkml.org 
[lkml]   [2018]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/17] thermal: hisi_thermal: enable/check sensor after its setup is finished
Date
* Enable/check sensor after checking ntrips and doing chipset specific
enable operation.

* Remove superfluous second sensor enable/check attempt.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
drivers/thermal/hisi_thermal.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index 1936eb4..d4c5055 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -488,9 +488,6 @@ static int hisi_thermal_register_sensor(struct platform_device *pdev,
return ret;
}

- thermal_zone_device_toggle(sensor->tzd, true);
- thermal_zone_device_check(sensor->tzd);
-
trip = of_thermal_get_trip_points(sensor->tzd);

for (i = 0; i < of_thermal_get_ntrips(sensor->tzd); i++) {
@@ -553,6 +550,9 @@ static int hisi_thermal_probe(struct platform_device *pdev)
return ret;
}

+ thermal_zone_device_toggle((&data->sensor)->tzd, true);
+ thermal_zone_device_check((&data->sensor)->tzd);
+
if (data->irq) {
ret = devm_request_threaded_irq(dev, data->irq, NULL,
hisi_thermal_alarm_irq_thread,
@@ -563,9 +563,6 @@ static int hisi_thermal_probe(struct platform_device *pdev)
}
}

- thermal_zone_device_toggle((&data->sensor)->tzd, true);
- thermal_zone_device_check((&data->sensor)->tzd);
-
return 0;
}

--
1.9.1
\
 
 \ /
  Last update: 2018-04-10 14:44    [W:0.795 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site