charger: max14577: Configure battery-dependent settings from DTS and sysfs
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fri, 12 Sep 2014 06:53:57 +0000 (08:53 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 24 Sep 2014 14:25:49 +0000 (15:25 +0100)
commite30110e9c96f48aea01abc3e6dfadb369cbafec3
treeb0fffcc4dd9de5c4efad8dda1682d06acde65239
parentb8f139f68f2099b7f8b4ef470a1e53210e3aa025
charger: max14577: Configure battery-dependent settings from DTS and sysfs

Remove hard-coded values for:
 - Fast Charge current,
 - End Of Charge current,
 - Fast Charge timer,
 - Overvoltage Protection Threshold,
 - Battery Constant Voltage,
and use DTS or sysfs to configure them. This allows using the max14577 charger
driver with different batteries.

Now the charger driver requires valid configuration data from DTS. In
case of wrong configuration data it fails during probe.

The fast charge timer is configured through sysfs entry.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/power/Kconfig
drivers/power/max14577_charger.c
include/linux/mfd/max14577-private.h
include/linux/mfd/max14577.h