This FG (fuel gauge) can be found on Snapdragon 835, 845, 660, 670..

Series enables the FG, which is used on phones as OnePlus 6, 6T, Pixel 3a..

Since many downstream trees (sdm845-mainline, sdm660, sdm670) carring
these patches, after Barnabás dropped older gen support from the driver,
cleaned up the driver, I picked changes and cleaned up device-tree
patches and sending the whole bulk for review.

Note:
Usually I picked the oldest commits authors.
Since there was multiple patches, multiple names and modifications etc.,
if someone from the authors, co-developers, contributors etc. missing,
please let me know and I'll fix this up in the next series.

Currently some authors are unreachable or haven't given Signed-off-by
yet, thus RFC, when this get cleaned up, I'll sent non-RFC or leave it
to the authors to continue upstreaming process in case they want to.

Until merged (or taken over by the original authors), the series is
available at:
  https://gitlab.com/sdm845/sdm845-next/-/commits/b4%2Fpmi8998_fuel_gauge

Signed-off-by: David Heidelberg <[email protected]>
---
Changes in v1:
- Clean and read charge full and max voltage from dts. (Joel)
- Dont put battery info on remove. All the battery info data is devm
  tracked so it will be freed for us on removal. (Casey)
- Invert charging current. Battery current should be negative for charging
  batteries, invert it so it's correct. Fixes upower charging status
  reporting. (Casey)
- Expose PROP_STATUS to fix upower not detecting charging status properly.
- Adopt battery info API changes.
- Silence -EPROBE_DEFER error. (Richard)
- Add present sysfs property. Required for battery drivers from
  UPower>=1.90.0 onwards to work properly. (Alexander)
- Drop support for older gen from the driver. (Barnabás)
- Rename the driver to pmi8998_fg. (Barnabás)
- Remove unnecessary batt_info. (Barnabás)
- Fix all checkpatch issues in strict mode. (Barnabás)
- Fixed naming, properties sorting, styling issues, few checkpatch
  warnings. (David)
- Updated Joel to "Joel Selvaraj <[email protected]>" everywhere
  (patch author, author field inside the driver, dt docs). (David)
- Link to v0:
  - https://gitlab.com/msm8998-mainline/linux/ (very old)
  - https://gitlab.com/sdm845-mainline/linux/ (multiple branches)
  - https://github.com/sdm660-mainline/linux/
  - https://gitlab.com/sdm670-mainline/linux-patches/-/tree/main/stable

---
Alexey Minnekhanov (1):
      arm64: dts: qcom: sdm660-xiaomi-lavender: Enable support for battery

Casey Connolly (2):
      arm64: dts: qcom: pmi8998: Add fuel gauge
      arm64: dts: qcom: sdm845-shift-axolotl: Enable fuel gauge

Joel Selvaraj (2):
      power: supply: Add driver for Qualcomm PMI8998 fuel gauge
      arm64: dts: qcom: sdm845-xiaomi-beryllium: Enable fuel gauge

Richard Acayan (2):
      arm64: dts: qcom: pm660: Add fuel gauge
      arm64: dts: qcom: sdm670-google-sargo: Enable fuel gauge

Yassine Oudjana (1):
      dt-bindings: power: supply: Add schema for Qualcomm pmi8998 fuel gauge

 .../bindings/power/supply/qcom,pmi8998-fg.yaml     |  77 +++
 arch/arm64/boot/dts/qcom/pm660.dtsi                |  10 +
 arch/arm64/boot/dts/qcom/pmi8998.dtsi              |  11 +
 .../arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts |  25 +
 arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts   |   7 +
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts  |   7 +
 .../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi   |   7 +
 drivers/power/supply/Kconfig                       |   8 +
 drivers/power/supply/Makefile                      |   1 +
 drivers/power/supply/pmi8998_fg.c                  | 687 +++++++++++++++++++++
 10 files changed, 840 insertions(+)
---
base-commit: 422f3140bbcb657e1b86c484296972ab76f6d1ff
change-id: 20251121-pmi8998_fuel_gauge-cfaf78ed103d

Best regards,
-- 
David Heidelberg <[email protected]>



Reply via email to