]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0b2c1119754f42b640f94aaa8fad4e46da078dd5
treea107cc656ef64b77a93ae80a5be710e75f889aa5
parent9ec349ea237b5740a31214b516fcff5e1a3fba97
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