]> git.baikalelectronics.ru Git - kernel.git/commit
lp8727_charger: Fix code for getting battery temp
authorKim, Milo <Milo.Kim@ti.com>
Fri, 31 Aug 2012 09:24:28 +0000 (09:24 +0000)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Fri, 21 Sep 2012 01:00:55 +0000 (18:00 -0700)
commitc0e4f4d148cfd7e32c183f872ac64e0b6eaea22b
tree4e5abc11573948c8d7fdd7f4ad3a2e42bcda63ed
parent4da9cca806c5f77ace4b1ae2915bb068e0606b59
lp8727_charger: Fix code for getting battery temp

For better understanding, use specific function and definitions rather
than magic numbers. New enum type for die temperature is matched with hex
codes. Specific temperature names are better than 0x1, 0x2 and 0x3.

And lp8727_is_high_temperature() function has better readability than
comparing raw register values.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/lp8727_charger.c