Re: [PATCH 1/2] power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats
From: Brian Norris
Date: Tue Jun 12 2018 - 16:23:34 EST
Eek, sorry this series should have subjects "[PATCH v5 X/2] ...". I
can resend if really needed, but hopefully by now this is ready to
go...
Brian
On Tue, Jun 12, 2018 at 1:20 PM, Brian Norris <briannorris@xxxxxxxxxxxx> wrote:
> This driver was originally submitted for the TI BQ20Z75 battery IC
> (commit a7640bfa10c5 ("power_supply: Add driver for TI BQ20Z75 gas gauge
> IC")) and later renamed to express generic SBS support. While it's
> mostly true that this driver implemented a standard SBS command set, it
> takes liberties with the REG_MANUFACTURER_DATA register. This register
> is specified in the SBS spec, but it doesn't make any mention of what
> its actual contents are.
...
> ---
> v2:
> * don't stub out POWER_SUPPLY_PROP_PRESENT from sbs_data[]
> * use if/else instead of switch/case
>
> v3:
> * pull 'return 0' out of if/else, to satisfy braindead tooling
>
> v4:
> * make ManufacturerAccess non-optional for TI parts again
>
> v5: no change
> ---
> drivers/power/supply/sbs-battery.c | 67 ++++++++++++++++++++++++------
> 1 file changed, 54 insertions(+), 13 deletions(-)