bq2415x_charger: Fix max battery regulation voltage
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 16 Oct 2013 14:08:31 +0000 (16:08 +0200)
committerAnton Vorontsov <anton@enomsg.org>
Fri, 25 Oct 2013 23:24:22 +0000 (16:24 -0700)
commit3ed5cd79b82e9a055e0df3275eeb471ea0f1e2d7
tree6cb58a324dc8c0123171da4d1647a8e5422b360d
parente47bcba4a189ab1ba23072ee2f457b1d72cd22fe
bq2415x_charger: Fix max battery regulation voltage

As per the datasheets, maximum battery regulation voltage is 4440mV.

The formula is (voltage - offset) / step, so the maximum value is:
(4440 - 3500) / 20 = 47

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Thanks-to: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/bq2415x_charger.c