mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: 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>,
	Subbaraman Narayanamurthy
	<subbaraman.narayanamurthy@oss.qualcomm.com>,
	David Collins <david.collins@oss.qualcomm.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 v2 1/8] power: supply: core: Add resistance power supply property
Date: Fri, 25 Jul 2025 16:33:24 +0800	[thread overview]
Message-ID: <cd7930c3-4cba-4806-8653-8d7eecb278f5@oss.qualcomm.com> (raw)
In-Reply-To: <fb3ielhucosims237ikv4jfp3oq6fu5ftgt2mvenj6pjmzrpqo@vip3r6qew32p>


On 7/7/2025 8:15 AM, Sebastian Reichel wrote:
> Hi,
>
> On Mon, Jun 30, 2025 at 04:28:14PM +0800, Fenglin Wu wrote:
>> On 6/22/2025 9:26 AM, Sebastian Reichel wrote:
>>> On Fri, May 30, 2025 at 03:35:06PM +0800, Fenglin Wu via B4 Relay wrote:
>>>> From: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
>>>>
>>>> Some battery drivers provide the ability to export resistance as a
>>>> parameter. Add resistance power supply property for that purpose.
>>> This is missing some information and the naming is bad.
>>>
>>> Which resistance (I suppose battery internal resistance)?
>>>
>>> That is heavily dependent on the battery temperature. So this needs
>>> to document if this is for the current temperature or for some
>>> specific one.
>>>
>>> -- Sebastian
>> This is battery internal resistance calculated by battery management system,
>> using the real-time temperature measured by the thermistor inside the
>> battery pack.
>>
>> I can update the name to something like "rt_internal_resistance" and update
>> the description accordingly.
> Your message is kind of mixed signal to me.
>
> If the BMS needs the thermistor to calculate the internal
> resistance, it means the data is either not real-time, but
> just adopting some fixed value to the current temperature,
> or the internal resistance is adopted from the current
> temperature to some fixed temperature.
>
> My expectation would be, that the BMS instead actually measures the
> internal resistance via ohm's and law and Kirchhoff's voltage law.
> So please make sure to understand what data is actually provided by
> the BMS for a proper ABI description.
>
> Depending on the description I think 'internal_resistance' is a good
> name.
>
> Greetings,
>
> -- Sebastian

Hi Sebastian,

Sorry for causing the confusion. I will try to clear it by explaining 
how the battery resistance is calculated in Qcom BMS.

In Qcom BMS, it uses the Equivalent Series Resistance (ESR) parameter to 
represent the battery’s real-time internal resistance. ESR changes 
dynamically depending on factors like the battery’s state of charge 
(SoC), temperature, charging or discharging status. To estimate ESR 
accurately under different conditions, the BMS uses data obtained from 
characterizing representative battery samples, mapping ESR values across 
various temperatures and SoC levels under charging or discharging 
status. The characterization process with those battery samples on test 
bench would use ohm's law to calculate the battery resistance I think. 
These data points serve as a reference for real-time resistance 
estimation. During operation, the BMS software refers to this data and 
adjusts ESR values according to real-time inputs, especially 
temperature, which is typically measured by a thermistor inside the 
battery pack.

I can use 'internal_resistance' if you think this is good to represent 
this ESR parameter.

Thanks

Fenglin


  reply	other threads:[~2025-07-25  8:33 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-30  7:35 [PATCH v2 0/8] power: supply: Add several features support in qcom-battmgr driver Fenglin Wu via B4 Relay
2025-05-30  7:35 ` [PATCH v2 1/8] power: supply: core: Add resistance power supply property Fenglin Wu via B4 Relay
2025-06-22  1:26   ` Sebastian Reichel
2025-06-30  8:28     ` Fenglin Wu
2025-07-07  0:15       ` Sebastian Reichel
2025-07-25  8:33         ` Fenglin Wu [this message]
2025-05-30  7:35 ` [PATCH v2 2/8] power: supply: core: Add state_of_health " Fenglin Wu via B4 Relay
2025-06-02  6:17   ` Dmitry Baryshkov
2025-06-03  4:50     ` Fenglin Wu
2025-06-03 10:35       ` Dmitry Baryshkov
2025-06-05  6:08         ` Fenglin Wu
2025-06-05  6:34           ` Dmitry Baryshkov
2025-06-22  1:17             ` Sebastian Reichel
2025-07-25  8:17               ` Fenglin Wu
2025-05-30  7:35 ` [PATCH v2 3/8] power: supply: qcom_battmgr: Add resistance " Fenglin Wu via B4 Relay
2025-06-02  6:17   ` Dmitry Baryshkov
2025-05-30  7:35 ` [PATCH v2 4/8] power: supply: qcom_battmgr: Add state_of_health property Fenglin Wu via B4 Relay
2025-05-30  7:35 ` [PATCH v2 5/8] power: supply: qcom_battmgr: Add charge control support Fenglin Wu via B4 Relay
2025-05-30  8:48   ` Bryan O'Donoghue
2025-05-30  9:37     ` Fenglin Wu
2025-05-30 10:11       ` Bryan O'Donoghue
2025-06-03  5:43         ` Fenglin Wu
2025-05-31 10:36   ` György Kurucz
2025-06-03  5:48     ` Fenglin Wu
2025-06-03 10:37       ` Dmitry Baryshkov
2025-06-07  9:46         ` Konrad Dybcio
2025-06-09  2:39           ` Fenglin Wu
2025-06-09  7:17             ` Dmitry Baryshkov
2025-06-10 12:19               ` Konrad Dybcio
2025-05-30  7:35 ` [PATCH v2 6/8] dt-bindings: soc: qcom: pmic-glink: Move X1E80100 out of fallbacks Fenglin Wu via B4 Relay
2025-06-02  6:38   ` Dmitry Baryshkov
2025-06-02  7:40   ` Krzysztof Kozlowski
2025-06-03  6:42     ` Fenglin Wu
2025-06-03  6:47       ` Krzysztof Kozlowski
2025-06-03  6:59         ` Fenglin Wu
2025-06-03  7:06           ` Krzysztof Kozlowski
2025-06-03  7:41             ` Fenglin Wu
2025-06-03  9:34               ` Krzysztof Kozlowski
2025-06-04  9:40                 ` Fenglin Wu
2025-06-10 12:22                   ` Konrad Dybcio
2025-05-30  7:35 ` [PATCH v2 7/8] usb: typec: ucsi_glink: Add UCSI quirk for X1E80100 platform Fenglin Wu via B4 Relay
2025-05-30  8:35   ` Bryan O'Donoghue
2025-05-30  7:35 ` [PATCH v2 8/8] arm64: dts: qcom: x1*: Remove qcom,sm8550-pmic-glink fallback Fenglin Wu via B4 Relay
2025-06-02  7:41   ` Krzysztof Kozlowski

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=cd7930c3-4cba-4806-8653-8d7eecb278f5@oss.qualcomm.com \
    --to=fenglin.wu@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=david.collins@oss.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=kernel@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=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --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®