The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: qcom: msm8974-hammerhead: Link the fuel gauge to its charger
@ 2026-11-22  5:12 EMCP333 via B4 Relay
  2026-12-04 22:24 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22  5:12 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Abel Vesa, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel, EMCP333

From: EMCP333 <emcp@enser.io>

The max17048 fuel gauge takes its STATUS from the power supply that
feeds it, but its node does not say which one that is, so the gauge
reports Unknown however the battery is being charged. Point it at the
bq24192 charger with power-supplies, as the max17040 binding's own
example does.

The driver only reads the property since "power: supply: max17040: pass
the device fwnode to the power supply core", now in the power-supply
tree. Tested on an LG Nexus 5 with that same one-line driver change:
with a charger attached the battery's status reads Charging, as the
charger's does. Without the driver change this patch is harmless and
has no effect.

The code and this changelog were prepared with the help of an AI coding
assistant. The submitter has reviewed both and takes responsibility for
them.

Signed-off-by: EMCP333 <emcp@enser.io>
---
 arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
index e34d7b864e..48be1f9835 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -120,6 +120,7 @@ charger: bq24192@6b {
 	fuelgauge: max17048@36 {
 		compatible = "maxim,max17048";
 		reg = <0x36>;
+		power-supplies = <&charger>;
 
 		maxim,double-soc;
 		maxim,rcomp = /bits/ 8 <0x4d>;

---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261122-b4-hammerhead-gauge-supply-6c0cf213ae0f

Best regards,
--  
EMCP333 <emcp@enser.io>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: dts: qcom: msm8974-hammerhead: Link the fuel gauge to its charger
  2026-11-22  5:12 [PATCH] ARM: dts: qcom: msm8974-hammerhead: Link the fuel gauge to its charger EMCP333 via B4 Relay
@ 2026-12-04 22:24 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2026-12-04 22:24 UTC (permalink / raw)
  To: emcp
  Cc: Konrad Dybcio, Abel Vesa, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Sun, Nov 22, 2026 at 05:12:49AM +0000, EMCP333 via B4 Relay wrote:
> From: EMCP333 <emcp@enser.io>
> 
> The max17048 fuel gauge takes its STATUS from the power supply that
> feeds it, but its node does not say which one that is, so the gauge
> reports Unknown however the battery is being charged. Point it at the
> bq24192 charger with power-supplies, as the max17040 binding's own
> example does.
> 
> The driver only reads the property since "power: supply: max17040: pass
> the device fwnode to the power supply core", now in the power-supply
> tree. Tested on an LG Nexus 5 with that same one-line driver change:
> with a charger attached the battery's status reads Charging, as the
> charger's does. Without the driver change this patch is harmless and
> has no effect.
> 
> The code and this changelog were prepared with the help of an AI coding
> assistant. The submitter has reviewed both and takes responsibility for
> them.
> 
> Signed-off-by: EMCP333 <emcp@enser.io>

Please use your real/full name.

Thanks,
Bjorn

> ---
>  arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
> index e34d7b864e..48be1f9835 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
> @@ -120,6 +120,7 @@ charger: bq24192@6b {
>  	fuelgauge: max17048@36 {
>  		compatible = "maxim,max17048";
>  		reg = <0x36>;
> +		power-supplies = <&charger>;
>  
>  		maxim,double-soc;
>  		maxim,rcomp = /bits/ 8 <0x4d>;
> 
> ---
> base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
> change-id: 20261122-b4-hammerhead-gauge-supply-6c0cf213ae0f
> 
> Best regards,
> --  
> EMCP333 <emcp@enser.io>
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22  5:12 [PATCH] ARM: dts: qcom: msm8974-hammerhead: Link the fuel gauge to its charger EMCP333 via B4 Relay
2026-12-04 22:24 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox