]> asedeno.scripts.mit.edu Git - linux.git/commit
power: supply: bq27xxx: Add power_supply_battery_info support
authorLiam Breck <kernel@networkimprov.net>
Wed, 7 Jun 2017 18:37:56 +0000 (11:37 -0700)
committerSebastian Reichel <sre@kernel.org>
Thu, 8 Jun 2017 15:57:38 +0000 (17:57 +0200)
commitccce440956c79343ab3aa1269a4cf57f9cce030f
tree21c51f3f8e0ad3585bfa8d596251e0ae0002ed0c
parent0670c9b3588f163cfcfcd8ea532f321ec004e6ad
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>
drivers/power/supply/Kconfig
drivers/power/supply/bq27xxx_battery.c
include/linux/power/bq27xxx_battery.h