]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: hisilicon: increase temperature resolution
authorLeo Yan <leo.yan@linaro.org>
Tue, 29 Mar 2016 11:23:32 +0000 (19:23 +0800)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 27 Apr 2016 22:54:01 +0000 (15:54 -0700)
commit1bf54bcc59204a00a534e64699f24d33af96b823
treedfde889af6cfa191cdd388aa7eb7ddc07ed4dc70
parenta4b3e450a05af2e39bb4a96d6c6e76e220bd8209
thermal: hisilicon: increase temperature resolution

When calculate temperature, old code firstly do division and then
convert to "millicelsius" unit. This will lose resolution and only can
read back temperature with "Celsius" unit.

So firstly scale step value to "millicelsius" and then do division, so
finally we can increase resolution for temperature value. Also refine
the calculation from temperature value to step value.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/hisi_thermal.c