mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: fenglin.wu@oss.qualcomm.com, Sebastian Reichel <sre@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: "Subbaraman Narayanamurthy"
	<subbaraman.narayanamurthy@oss.qualcomm.com>,
	"David Collins" <david.collins@oss.qualcomm.com>,
	"György Kurucz" <me@kuruczgy.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, kernel@oss.qualcomm.com,
	devicetree@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v3 0/8] power: supply: Add several features support in qcom-battmgr driver
Date: Wed, 3 Sep 2025 10:57:25 +0200	[thread overview]
Message-ID: <437b6676-0669-410b-ae77-ec22aa0f66db@linaro.org> (raw)
In-Reply-To: <20250826-qcom_battmgr_update-v3-0-74ea410ef146@oss.qualcomm.com>

Hi,

On 26/08/2025 09:18, Fenglin Wu via B4 Relay wrote:
> Add following features in qcom-battmgr drivers as the battery management
> firmware has provided such capabilities:
>   - Add resistance power supply property in core driver and qcom-battmgr
>     driver to get battery resistance
>   - Add state_of_health power supply property in core driver and
>     qcom-battmgr driver to get battery health percentage
>   - Add charge control start/end threshold control by using
>     charge_control_start_threshold and charge_control_end_threshold power
>     supply properties
> 
> The changes have been tested on QRD8650 and X1E80100-CRD devices based on
> qcom/linux.git for-next commit a679f3f6931cdb0c2ef5dc0c26f895ae3f6c1ddc.

Gnome sets the properties and they are correctly loaded back at reboot.

Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Thinkpad T14S OLED

Thanks,
Neil

> 
> Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
> ---
> Changes in v3:
> - Change power supply property "RESISTANCE" to "INTERNAL_RESISTANCE" and
>    update the ABI document accordingly.
> - Update the ABI document for "STATE_OF_HEALTH" property to explain it
>    better.
> - Drop following patches, as they were made due to my misunderstanding of
>    the compats fallback behavior. Thank you to Krzysztof for the correction
>    with patience.
>      [PATCH v2 6/8] dt-bindings: soc: qcom: pmic-glink: Move X1E80100 out of fallbacks
>      [PATCH v2 7/8] usb: typec: ucsi_glink: Add UCSI quirk for X1E80100 platform
>      [PATCH v2 8/8] arm64: dts: qcom: x1*: Remove qcom,sm8550-pmic-glink fallback
> - Addressed several comments in [PATCH v2 5/8]:
>     - Separated the compat string addition change
>     - Fixed the coding style issues in several places to address this
>       checkpatch error:
>         "CHECK: Alignment should match open parenthesis"
>     - Add logic to read charge control thresholds from SDAM registers in driver
>       probe. It addresses the issue on X1E80100, where there is no interface
>       to retrieve the thresholds from the battery management firmware after
>       boot-up.
> - Add a DT binding change for charge_limit_xx "nvmem" DT properties.
> - Add a DT change to specifiy charge_limit_xx "nvmem" properties for X1E80100
>    devices.
> - Link to v2: https://lore.kernel.org/r/20250530-qcom_battmgr_update-v2-0-9e377193a656@oss.qualcomm.com
> 
> Changes in v2:
> - Corrected "qcom-battmgr" to "qcom_battmgr" in the commit subject of
>    patch 4/5.
> - Added charge control support for X1E80100 platform in patch 5.
> - X1E80100 is no longer a fallback of SM8550 in pmic-glink battmgr support,
>    hence added patch 6 in the pmic-glink binding to move X1E80100 out of the
>    fallbacks.
> - Added patch 7 in glink-ucsi driver to include UCSI quirk for X1E80100
>    platform
> - Added patch 8 to remove "qcom,sm8550-pmic-glink" compatible string in
>    x1* board files.
> - Rebased the changes on qcom/linux.git for-next commit 44ef9ab4baaf496d227ab98d368016700f0b9300.
> - Link to v1: https://lore.kernel.org/r/20250523-qcom_battmgr_update-v1-0-2bb6d4e0a56e@oss.qualcomm.com
> 
> ---
> Fenglin Wu (8):
>        power: supply: core: Add resistance power supply property
>        power: supply: core: Add state_of_health power supply property
>        power: supply: qcom_battmgr: Add resistance power supply property
>        power: supply: qcom_battmgr: Add state_of_health property
>        power: supply: qcom_battmgr: update compats for SM8550 and X1E80100
>        dt-bindings: soc: qcom,pmic-glink: Add charge limit nvmem properties
>        power: supply: qcom_battmgr: Add charge control support
>        arm64: dts: qcom: x1e80100-crd: Add charge limit nvmem
> 
>   Documentation/ABI/testing/sysfs-class-power        |  31 ++
>   .../bindings/soc/qcom/qcom,pmic-glink.yaml         |  14 +
>   arch/arm64/boot/dts/qcom/x1-crd.dtsi               |   2 +
>   arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi       |  20 ++
>   drivers/power/supply/power_supply_sysfs.c          |   2 +
>   drivers/power/supply/qcom_battmgr.c                | 316 ++++++++++++++++++++-
>   include/linux/power_supply.h                       |   2 +
>   7 files changed, 378 insertions(+), 9 deletions(-)
> ---
> base-commit: abbf1025002e4966bfcbf8a069234e485d49edf1
> change-id: 20250520-qcom_battmgr_update-3561dc526c05
> 
> Best regards,


      parent reply	other threads:[~2025-09-03  8:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26  7:18 Fenglin Wu via B4 Relay
2025-08-26  7:18 ` [PATCH v3 1/8] power: supply: core: Add resistance power supply property Fenglin Wu via B4 Relay
2025-08-26  7:18 ` [PATCH v3 2/8] power: supply: core: Add state_of_health " Fenglin Wu via B4 Relay
2025-08-26  7:18 ` [PATCH v3 3/8] power: supply: qcom_battmgr: Add resistance " Fenglin Wu via B4 Relay
2025-08-26  7:18 ` [PATCH v3 4/8] power: supply: qcom_battmgr: Add state_of_health property Fenglin Wu via B4 Relay
2025-08-26  7:18 ` [PATCH v3 5/8] power: supply: qcom_battmgr: update compats for SM8550 and X1E80100 Fenglin Wu via B4 Relay
2025-08-26  7:18 ` [PATCH v3 6/8] dt-bindings: soc: qcom,pmic-glink: Add charge limit nvmem properties Fenglin Wu via B4 Relay
2025-09-01 20:05   ` Rob Herring (Arm)
2025-08-26  7:18 ` [PATCH v3 7/8] power: supply: qcom_battmgr: Add charge control support Fenglin Wu via B4 Relay
2025-09-03  8:29   ` Neil Armstrong
2025-09-05  1:19     ` Fenglin Wu
2025-09-05  7:09       ` Neil Armstrong
2025-08-26  7:18 ` [PATCH v3 8/8] arm64: dts: qcom: x1e80100-crd: Add charge limit nvmem Fenglin Wu via B4 Relay
2025-09-03  8:41   ` Maud Spierings
2025-09-05  1:03     ` Fenglin Wu
2025-09-09  8:56   ` Konrad Dybcio
2025-09-03  8:57 ` Neil Armstrong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=437b6676-0669-410b-ae77-ec22aa0f66db@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=david.collins@oss.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=fenglin.wu@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=kernel@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=me@kuruczgy.com \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=subbaraman.narayanamurthy@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®