diff options
author | Andrew F. Davis <afd@ti.com> | 2018-04-21 18:12:49 -0500 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2018-04-25 23:11:47 +0200 |
commit | 5ef6a16033b47afbc578c7ef8754da5ae7b198d7 (patch) | |
tree | 420924905d704dbd2518e2ed9880b5f8e57604b8 /drivers/power/supply/bq27xxx_battery.c | |
parent | 77142a611252de84ac533842438d19e7b2f494e7 (diff) |
power: supply: bq27xxx: Add support for BQ27426
This device is software similar to the BQ27426 except it has
different data memory offsets. Add support here.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power/supply/bq27xxx_battery.c')
-rw-r--r-- | drivers/power/supply/bq27xxx_battery.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c index 7ce60519b1bc..d44ed8e17c47 100644 --- a/drivers/power/supply/bq27xxx_battery.c +++ b/drivers/power/supply/bq27xxx_battery.c @@ -432,6 +432,7 @@ static u8 BQ27XXX_DM_REG_ROWS, }; #define bq27425_regs bq27421_regs +#define bq27426_regs bq27421_regs #define bq27441_regs bq27421_regs #define bq27621_regs bq27421_regs @@ -664,6 +665,7 @@ static enum power_supply_property bq27421_props[] = { POWER_SUPPLY_PROP_MANUFACTURER, }; #define bq27425_props bq27421_props +#define bq27426_props bq27421_props #define bq27441_props bq27421_props #define bq27621_props bq27421_props @@ -734,6 +736,12 @@ static struct bq27xxx_dm_reg bq27425_dm_regs[] = { [BQ27XXX_DM_TERMINATE_VOLTAGE] = { 82, 18, 2, 2800, 3700 }, }; +static struct bq27xxx_dm_reg bq27426_dm_regs[] = { + [BQ27XXX_DM_DESIGN_CAPACITY] = { 82, 6, 2, 0, 8000 }, + [BQ27XXX_DM_DESIGN_ENERGY] = { 82, 8, 2, 0, 32767 }, + [BQ27XXX_DM_TERMINATE_VOLTAGE] = { 82, 10, 2, 2500, 3700 }, +}; + #if 0 /* not yet tested */ #define bq27441_dm_regs bq27421_dm_regs #else @@ -795,6 +803,7 @@ static struct { [BQ27545] = BQ27XXX_DATA(bq27545, 0x04143672, BQ27XXX_O_OTDC), [BQ27421] = BQ27XXX_DATA(bq27421, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM), [BQ27425] = BQ27XXX_DATA(bq27425, 0x04143672, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP), + [BQ27426] = BQ27XXX_DATA(bq27426, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM), [BQ27441] = BQ27XXX_DATA(bq27441, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM), [BQ27621] = BQ27XXX_DATA(bq27621, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM), }; |