power: supply: axp20x_battery: add DT support for battery max constant charge current
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Thu, 11 May 2017 13:42:20 +0000 (15:42 +0200)
committerSebastian Reichel <sre@kernel.org>
Thu, 8 Jun 2017 15:57:53 +0000 (17:57 +0200)
commitc800384490500cdf4c2409a9052862d1db805499
treea107cc656ef64b77a93ae80a5be710e75f889aa5
parentf8c91bae0c37dfc5aecc49cafc5c1ea9d9227731
power: supply: axp20x_battery: add DT support for battery max constant charge current

This adds the ability to set the maximum constant charge current,
supported by the battery, delivered by this battery power supply to the
battery.

The maximum constant charge current set in DT will also set the default
constant charge current supplied by this supply.

The actual user can modify the constant charge current within the range
of 0 to maximum constant charge current via sysfs.
The user can also modify the maximum constant charge current to widen
the range of possible constant charge current. While this seems quite
risky, a message is printed on the console to warn the user this might
damage the battery. The reason for letting the user change the maximum
constant charge current is for letting users change the battery and
thus, let them adjust the maximum constant charge current according to
what the battery can support.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/axp20x_battery.c