diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-10-19 19:05:51 +0200 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2017-10-31 19:32:16 -0700 |
commit | 10d7e9a9181f4637640f388d334c6740c1b5d0e8 (patch) | |
tree | 51467cf32cef550e044cdafd425844b9d143cc76 /drivers/thermal/rockchip_thermal.c | |
parent | b424315a287c70eeb5f920f84c92492bd2f5658e (diff) |
thermal/drivers/hisi: Remove costly sensor inspection
The sensor is all setup, bind, resetted, acked, etc... every single second.
That was the way to workaround a problem with the interrupt bouncing again and
again.
With the following changes, we fix all in one:
- Do the setup, one time, at probe time
- Add the IRQF_ONESHOT, ack the interrupt in the threaded handler
- Remove the interrupt handler
- Set the correct value for the LAG register
- Remove all the irq_enabled stuff in the code as the interruption
handling is fixed
- Remove the 3ms delay
- Reorder the initialization routine to be in the right order
It ends up to a nicer code and more efficient, the 3-5ms delay is removed from
the get_temp() path.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/rockchip_thermal.c')
0 files changed, 0 insertions, 0 deletions