Re: [PATCH] ARM: dts: qcom: msm8974-hammerhead: Link the fuel gauge to its charger

From: Bjorn Andersson

Date: Fri Dec 04 2026 - 17:24:42 EST


On Sun, Nov 22, 2026 at 05:12:49AM +0000, EMCP333 via B4 Relay wrote:
> From: EMCP333 <emcp@xxxxxxxx>
>
> 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@xxxxxxxx>

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@xxxxxxxx>
>
>