drivers: thermal: tsens: simplify get_temp_tsens_v2 routine
authorAmit Kucheria <amit.kucheria@linaro.org>
Wed, 20 Mar 2019 13:17:56 +0000 (18:47 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 14 May 2019 13:59:20 +0000 (06:59 -0700)
commitdbdaa582e4ee38c9e2c2d500ebb102a350b7e1fc
tree04d34bf9014cd7b27103178beb2c90815ee7917b
parent1b6e3e517fadcfbbe0f88eb676ebffafc20fd49c
drivers: thermal: tsens: simplify get_temp_tsens_v2 routine

The current implementation is based on an algorithm published in the
docs. Instead of reading the temperature thrice w/o any explanation,
improve the algorithm.

This will become the basis for a common get_temp routine in the future.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/qcom/tsens-v2.c