BACKPORT: thermal/drivers/hisi: Use round up step value
authorKevin Wangtao <kevin.wangtao@linaro.org>
Thu, 19 Oct 2017 17:05:57 +0000 (19:05 +0200)
committerKevin Wangtao <kevin.wangtao@hisilicon.com>
Fri, 26 Jan 2018 02:01:05 +0000 (10:01 +0800)
commit9f75fb2633962799f4737884ae8001f30d5b68f2
treedeb9b48264c776242dfb3e595d6e1fee141a7e22
parente4d15c6eebe327d5bf58d3b54e52f91ff77bcfc3
BACKPORT: thermal/drivers/hisi: Use round up step value

Use round up division to ensure the programmed value of threshold and the lag
are not less than what we set, and in order to keep the accuracy while using
round up division, the step value should be a rounded up value.  There is
no need to use hisi_thermal_round_temp.

Change-Id: I1b064d0a000fde3e64f42ac152b54ffdacb45d5e
Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from commit e42bbe1160c3b5fcab8d5afcc49d8647adff6c9c)
Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
drivers/thermal/hisi_thermal.c