power: supply: sbs-battery: use correct flags field
Subsystems (2)
PATCH v2 1/1 power: supply: sbs-battery: use correct flags field
the type flag is stored in the chip->flags field not in the client->flags field. This currently leads to never using the ti specific health function as client->flags doesn't use that bit. So it's always falling back to the general one.
MANUFACTURER_DATA formats")
---
Changes since v1:
* Changed comment according to Brian's suggestions
* Added Fixes tag
* Added reviewed and cc stable
drivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/sbs-battery.c +1 -1
@@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy,switch (psp) {case POWER_SUPPLY_PROP_PRESENT :case POWER_SUPPLY_PROP_HEALTH : -if (client->flags &SBS_FLAGS_TI_BQ20Z75 ) +if (chip->flags &SBS_FLAGS_TI_BQ20Z75 ) ret =sbs_get_ti_battery_presence_and_health (client, psp, val);else
Signature · 1 line
2.20.1
Hi Michael,
I think that Sebastian is expected to be cc'ed, so adding him (otherwise he can miss your patch)
Missatge de Michael Nosthoff <[email protected]> del dia dv., 16 d’ag. 2019 a les 9:38:
Quoted 6 lines
the type flag is stored in the
chip->flagsfield not in theclient->flagsfield. This currently leads to never using the ti specific health function asclient->flagsdoesn't use that bit. So it's always falling back to the general one.
Quoted 6 lines
Fixes 76b16f4cdfb8 ("power: supply: sbs-battery: don't assume
MANUFACTURER_DATAformats")Signed-off-by Michael Nosthoff <[email protected]>Reviewed-by Brian Norris <[email protected]>Cc <[email protected]>
Found this patch while looking at another issue and LGTM, so in case this helps the patch landing
Thanks,
Enric
Quoted 25 lines
---
Changes since v1:
* Changed comment according to Brian's suggestions
* Added Fixes tag
* Added reviewed and cc stabledrivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/supply/sbs-battery.c +1
-2@@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy,switch (psp) {case POWER_SUPPLY_PROP_PRESENT :case POWER_SUPPLY_PROP_HEALTH : -if (client->flags &SBS_FLAGS_TI_BQ20Z75 ) +if (chip->flags &SBS_FLAGS_TI_BQ20Z75 ) ret =sbs_get_ti_battery_presence_and_health (client, psp, val);else --2.20.1
Sebastian Reichel
maintainerHi,
Quoted 5 lines · Michael Nosthoff
the type flag is stored in the
chip->flagsfield not in theclient->flagsfield. This currently leads to never using the ti specific health function asclient->flagsdoesn't use that bit. So it's always falling back to the general one.
Quoted 7 lines
Fixes 76b16f4cdfb8 ("power: supply: sbs-battery: don't assume
MANUFACTURER_DATAformats")Signed-off-by Michael Nosthoff <[email protected]>Reviewed-by Brian Norris <[email protected]>Cc <[email protected]>---
Thanks, queued.
-- Sebastian
Quoted 24 lines
Changes since v1:
* Changed comment according to Brian's suggestions
* Added Fixes tag
* Added reviewed and cc stabledrivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/supply/sbs-battery.c +1
-1@@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy,switch (psp) {case POWER_SUPPLY_PROP_PRESENT :case POWER_SUPPLY_PROP_HEALTH : -if (client->flags &SBS_FLAGS_TI_BQ20Z75 ) +if (chip->flags &SBS_FLAGS_TI_BQ20Z75 ) ret =sbs_get_ti_battery_presence_and_health (client, psp, val);else Signature · 1 line
2.20.1