lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251124-pmi8998_fuel_gauge-v1-0-dd3791f61478@ixit.cz>
Date: Mon, 24 Nov 2025 22:53:33 +0100
From: David Heidelberg via B4 Relay <devnull+david.ixit.cz@...nel.org>
To: Sebastian Reichel <sre@...nel.org>, Rob Herring <robh@...nel.org>, 
 Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>, 
 Casey Connolly <casey.connolly@...aro.org>, 
 Casey Connolly <casey@...nolly.tech>, Joel Selvaraj <foss@...lselvaraj.com>, 
 Yassine Oudjana <y.oudjana@...tonmail.com>, 
 Bjorn Andersson <andersson@...nel.org>, 
 Konrad Dybcio <konradybcio@...nel.org>, 
 Alexander Martinz <amartinz@...ftphones.com>, 
 Barnabás Czémán <barnabas.czeman@...nlining.org>, 
 Richard Acayan <mailingradian@...il.com>, 
 Alexey Minnekhanov <alexeymin@...tmarketos.org>
Cc: linux-pm@...r.kernel.org, devicetree@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org, 
 phone-devel@...r.kernel.org, David Heidelberg <david@...t.cz>
Subject: [PATCH RFC 0/8] Qualcomm 3rd gen fuel gauge support

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 <david@...t.cz>
---
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 <foss@...lselvaraj.com>" 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 <david@...t.cz>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ