Comments

From: Daniel Lezcano <daniel.lezcano@linaro.org>
commit 10d7e9a9181f4637640f388d334c6740c1b5d0e8 upstream.
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.
Link: https://bugs.linaro.org/show_bug.cgi?id=4053 (PATCH 5/5)
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>
(cherry picked from commit 10d7e9a9181f4637640f388d334c6740c1b5d0e8)
Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org>
---
drivers/thermal/hisi_thermal.c | 203 +++++++++++++++------------------
1 file changed, 93 insertions(+), 110 deletions(-)