public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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>
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 v5 9/9] power: supply: qcom_battmgr: handle charging state change notifications
Date: Wed, 17 Sep 2025 13:14:26 +0200	[thread overview]
Message-ID: <fa258ad4-1efa-4fe8-9636-d70c5ea9c8e1@oss.qualcomm.com> (raw)
In-Reply-To: <20250917-qcom_battmgr_update-v5-9-270ade9ffe13@oss.qualcomm.com>

On 9/17/25 12:15 PM, Fenglin Wu via B4 Relay wrote:
> From: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
> 
> The X1E80100 battery management firmware sends a notification with
> code 0x83 when the battery charging state changes, such as switching
> between fast charge, taper charge, end of charge, or any other error
> charging states. The same notification code is used with bit[16] set
> if charging stops due to reaching the charge control end threshold.
> Additionally, a 2-bit value is added in bit[18:17] with the same code
> and used to indicate the charging source capability: a value of 2
> represents a strong charger, 1 is a weak charger, and 0 is no charging
> source. The 3-MSB [18:16] in the notification code is not much useful
> for now, hence just ignore them and trigger a power supply change event
> whenever 0x83 notification code is received. This helps to eliminate the
> unknown notification error messages.

Thank you for explaining the technical background.

Please hit enter somewhere in your commit message, this is a very
long paragraph, making it difficult to read.


I believe this maps to:

0 -> POWER_SUPPLY_CHARGE_TYPE_NONE
1 -> POWER_SUPPLY_CHARGE_TYPE_TRICKLE
2 -> POWER_SUPPLY_CHARGE_TYPE_FAST (or _STANDARD, I see battmgr code
reports them both as 2)

However, we already set it to none/trickle/standard(taper) based on
the usual notifications, so I'm not sure if these are more common or
arrive outside the normal state changes - if so, perhaps we can take
them into account as well?

I think it also warrants a:

Reported-by: Sebastian Reichel <sebastian.reichel@collabora.com>

Konrad

  reply	other threads:[~2025-09-17 11:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 10:15 [PATCH v5 0/9] power: supply: Add several features support in qcom-battmgr driver Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 1/9] power: supply: core: Add resistance power supply property Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 2/9] power: supply: core: Add state_of_health " Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 3/9] power: supply: qcom_battmgr: Add resistance " Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 4/9] power: supply: qcom_battmgr: Add state_of_health property Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 5/9] power: supply: qcom_battmgr: update compats for SM8550 and X1E80100 Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 6/9] dt-bindings: soc: qcom,pmic-glink: Add charge limit nvmem properties Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 7/9] power: supply: qcom_battmgr: Add charge control support Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 8/9] arm64: dts: qcom: x1e80100-crd: Add charge limit nvmem Fenglin Wu via B4 Relay
2025-09-17 10:15 ` [PATCH v5 9/9] power: supply: qcom_battmgr: handle charging state change notifications Fenglin Wu via B4 Relay
2025-09-17 11:14   ` Konrad Dybcio [this message]
2025-09-18  2:01     ` Fenglin Wu
2025-09-18 23:17       ` Sebastian Reichel
2025-09-17 23:03 ` (subset) [PATCH v5 0/9] power: supply: Add several features support in qcom-battmgr driver Sebastian Reichel

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=fa258ad4-1efa-4fe8-9636-d70c5ea9c8e1@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --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=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