power: supply: bq27xxx: expose battery data when CI=1
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest1 patch 1 replyIn review
- v11 patch 3 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | power: supply: bq27xxx: expose battery data when CI=1drivers/ | +27 | 1 reply |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Pali Rohár |
|---|---|
| 1/1 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/1] power: supply: bq27xxx: expose battery data when CI=1
We currently discard capacity information provided by the chip when the Capacity Inaccurate flag is set. However, in many cases, having this stale data is better than no information at all.
Even if the chip has been fully reset, the datasheet shows that capacity values (NAC specifically) can be seeded by using the WRTNAC facility of the Control and Mode registers. After seeding, CI remains set, but the capacity values are as accurate as the NAC value provided to WRTNAC is.
On the Nokia N900, such seed value can be obtained from rx51_battery, which reads battery data directly from the battery's BSI pin. This can be done in userspace via i2c access to the registers. With this patch, once seeded, capacity values are available through the driver.
The patch was successfully tested on bq27200 on the Nokia N900.
Sicelo A. Mhlongo (1):
power: supply: bq27xxx: expose battery data when CI=1
drivers/power/supply/bq27xxx_battery.c | 59 ++++++++++++-------------- 1 file changed, 27 insertions(+), 32 deletions(-)
Signature · 1 line
2.35.2