diff options
author | Liam Breck <kernel@networkimprov.net> | 2017-06-07 21:37:56 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2017-06-08 18:57:38 +0300 |
commit | ccce440956c79343ab3aa1269a4cf57f9cce030f (patch) | |
tree | 21c51f3f8e0ad3585bfa8d596251e0ae0002ed0c /drivers/power/supply/Kconfig | |
parent | 0670c9b3588f163cfcfcd8ea532f321ec004e6ad (diff) | |
download | linux-ccce440956c79343ab3aa1269a4cf57f9cce030f.tar.xz |
power: supply: bq27xxx: Add power_supply_battery_info support
Previously there was no way to configure these chips in the event that the
defaults didn't match the battery in question.
For chips with RAM data memory (and also those with flash/NVM data memory
if CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is defined and the user has not
set module param dt_monitored_battery_updates_nvm=0) we now call
power_supply_get_battery_info(), check its values, and write battery
properties to chip data memory if there is a dm_regs table for the chip.
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power/supply/Kconfig')
-rw-r--r-- | drivers/power/supply/Kconfig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig index f04c44c6c3f3..969f5005669c 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig @@ -198,6 +198,17 @@ config BATTERY_BQ27XXX_I2C Say Y here to enable support for batteries with BQ27xxx chips connected over an I2C bus. +config BATTERY_BQ27XXX_DT_UPDATES_NVM + bool "BQ27xxx support for update of NVM/flash data memory" + depends on BATTERY_BQ27XXX_I2C + help + Say Y here to enable devicetree monitored-battery config to update + NVM/flash data memory. Only enable this option for devices with a + fuel gauge mounted on the circuit board, and a battery that cannot + easily be replaced with one of a different type. Not for + general-purpose kernels, as this can cause misconfiguration of a + smart battery with embedded NVM/flash. + config BATTERY_DA9030 tristate "DA9030 battery driver" depends on PMIC_DA903X |