1d6aab36 | 05-Mar-2022 |
YueHaibing <yuehaibing@huawei.com> |
thermal/drivers/ti-soc-thermal: Remove unused function ti_thermal_get_temp()
commit b263b473bf62 ("thermal: ti-soc-thermal: Remove redundant code") left behind this, remove it.
Signed-off-by: YueHa
thermal/drivers/ti-soc-thermal: Remove unused function ti_thermal_get_temp()
commit b263b473bf62 ("thermal: ti-soc-thermal: Remove redundant code") left behind this, remove it.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Bryan Brattlof <bb@ti.com> Link: https://lore.kernel.org/r/20220305125047.26948-1-yuehaibing@huawei.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
d473327f | 21-Apr-2021 |
Lin Ruizhe <linruizhe@huawei.com> |
thermal/drivers/ti-soc-thermal/bandgap Remove unused variable 'val'
The function ti_bandgap_restore_ctxt() restores the context at resume time. It checks if the sensor has a counter, reads the regis
thermal/drivers/ti-soc-thermal/bandgap Remove unused variable 'val'
The function ti_bandgap_restore_ctxt() restores the context at resume time. It checks if the sensor has a counter, reads the register but does nothing with the value.
The block was probably omitted by the commit b87ea759a4cc.
Remove the unused variable as well as the block using it as we can consider it as dead code.
Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: b87ea759a4cc ("staging: omap-thermal: fix context restore function") Signed-off-by: Lin Ruizhe <linruizhe@huawei.com> Reviewed-by: Tony Lindgren <tony@atomide.com> Tested-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210421084256.57591-1-linruizhe@huawei.com
show more ...
|
c13636ba | 05-Feb-2021 |
Tony Lindgren <tony@atomide.com> |
thermal: ti-soc-thermal: Use non-inverted define for omap4
When we set bit 10 high we use continuous mode and not single mode. Let's correct this to avoid confusion. No functional changes here, the
thermal: ti-soc-thermal: Use non-inverted define for omap4
When we set bit 10 high we use continuous mode and not single mode. Let's correct this to avoid confusion. No functional changes here, the code does the right thing with bit 10.
Cc: Adam Ford <aford173@gmail.com> Cc: Carl Philipp Klemm <philipp@uvos.xyz> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Merlijn Wajer <merlijn@wizzup.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com> Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Adam Ford <aford173@gmail.com> #logicpd-torpedo-37xx-devkit Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210205134534.49200-5-tony@atomide.com
show more ...
|
514cbabb | 05-Feb-2021 |
Tony Lindgren <tony@atomide.com> |
thermal: ti-soc-thermal: Simplify polling with iopoll
We can use iopoll for checking the EOCZ (end of conversion) bit. And with this we now also want to handle the timeout errors properly.
For omap
thermal: ti-soc-thermal: Simplify polling with iopoll
We can use iopoll for checking the EOCZ (end of conversion) bit. And with this we now also want to handle the timeout errors properly.
For omap3, we need about 1.2ms for the single mode sampling to wait for EOCZ down, so let's use 1.5ms timeout there. Waiting for sampling to start is faster and we can use 1ms timeout.
Cc: Adam Ford <aford173@gmail.com> Cc: Carl Philipp Klemm <philipp@uvos.xyz> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Merlijn Wajer <merlijn@wizzup.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com> Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Adam Ford <aford173@gmail.com> #logicpd-torpedo-37xx-devkit Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210205134534.49200-4-tony@atomide.com
show more ...
|
735c3535 | 05-Feb-2021 |
Tony Lindgren <tony@atomide.com> |
thermal: ti-soc-thermal: Fix stuck sensor with continuous mode for 4430
At least for 4430, trying to use the single conversion mode eventually hangs the thermal sensor. This can be quite easily seen
thermal: ti-soc-thermal: Fix stuck sensor with continuous mode for 4430
At least for 4430, trying to use the single conversion mode eventually hangs the thermal sensor. This can be quite easily seen with errors:
thermal thermal_zone0: failed to read out thermal zone (-5)
Also, trying to read the temperature shows a stuck value with:
$ while true; do cat /sys/class/thermal/thermal_zone0/temp; done
Where the temperature is not rising at all with the busy loop.
Additionally, the EOCZ (end of conversion) bit is not rising on 4430 in single conversion mode while it works fine in continuous conversion mode. It is also possible that the hung temperature sensor can affect the thermal shutdown alert too.
Let's fix the issue by adding TI_BANDGAP_FEATURE_CONT_MODE_ONLY flag and use it for 4430.
Note that we also need to add udelay to for the EOCZ (end of conversion) bit polling as otherwise we have it time out too early on 4430. We'll be changing the loop to use iopoll in the following clean-up patch.
Cc: Adam Ford <aford173@gmail.com> Cc: Carl Philipp Klemm <philipp@uvos.xyz> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Merlijn Wajer <merlijn@wizzup.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com> Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Adam Ford <aford173@gmail.com> #logicpd-torpedo-37xx-devkit Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210205134534.49200-3-tony@atomide.com
show more ...
|
b57b4b4d | 05-Feb-2021 |
Tony Lindgren <tony@atomide.com> |
thermal: ti-soc-thermal: Skip pointless register access for dra7
On dra7, there is no Start of Conversion (SOC) register bit and we have an empty bgap_soc_mask in the configuration for the thermal d
thermal: ti-soc-thermal: Skip pointless register access for dra7
On dra7, there is no Start of Conversion (SOC) register bit and we have an empty bgap_soc_mask in the configuration for the thermal driver. Let's not do pointless reads and writes with the empty mask.
There's also no point waiting for End of Conversion bit (EOCZ) to go high on dra7. We only care about it going down, and are now mostly timing out waiting for EOCZ high while it has already gone down.
When we add checking for the timeout errors in a later patch, waiting for EOCZ high would cause bogus time out errors.
Cc: Adam Ford <aford173@gmail.com> Cc: Carl Philipp Klemm <philipp@uvos.xyz> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Merlijn Wajer <merlijn@wizzup.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com> Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Adam Ford <aford173@gmail.com> #logicpd-torpedo-37xx-devkit Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210205134534.49200-2-tony@atomide.com
show more ...
|