From: "Kaustabh Chakraborty" <kauschluss@disroot.org>
To: "Adil Hüsrev Tepe" <tadilhusrev@gmail.com>,
"Sebastian Reichel" <sre@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Kaustabh Chakraborty" <kauschluss@disroot.org>
Cc: "Yassine Oudjana" <y.oudjana@protonmail.com>,
<linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 0/3] power: supply: s2mu005-battery: add S2MU106 (Samsung Galaxy XCover5)
Date: Fri, 20 Nov 2026 21:22:14 +0530 [thread overview]
Message-ID: <DN05PYTW4NV6.SOA0NRNOJBAR@disroot.org> (raw)
In-Reply-To: <6afc2f77.2bb6edcb.1518d5.5d4f@mx.google.com>
On 2026-11-17 02:41 -08:00, Adil Hüsrev Tepe wrote:
> I'd like to withdraw this series rather than send a v2.
>
> A review bot (Sashiko AI) flagged that patch 1's fallback compatible
> (samsung,s2mu106-fuel-gauge falling back to samsung,s2mu005-fuel-gauge)
> is unsound: a board using that fallback binds to the S2MU005 driver as-is,
> which still reads the MONOUT average-monitoring registers for
> VOLTAGE_AVG/CURRENT_AVG and uses current_avg to help decide
> POWER_SUPPLY_STATUS. The S2MU106 doesn't have that path, so those reads
> return garbage, and garbage current_avg can flip the reported charging
> status. Patch 3's has_monout flag avoids calling into that path from the
> S2MU106 variant I added, but the binding still allows a device to bind
> through the plain samsung,s2mu005-fuel-gauge compatible with no
> has_monout gate at all, which is the actual hole.
>
> On reflection, extending s2mu005-battery.c was the wrong shape for this
> chip regardless of that specific bug. The S2MU106 fuel gauge is a
> separate, standalone I2C device on the Galaxy XCover5 (own address,
> 0x3b), not a drop-in register-compatible S2MU005 variant sharing a
> device tree node -- it only happens to reuse the same STATUS/RVBAT/
> RCURCC/RSOC register layout and scaling. A dedicated driver avoids the
> fallback-compatible construction entirely, since there's nothing to
> fall back to.
>
> I'll send that as a new series instead: a samsung,s2mu106-fuelgauge
> binding and a standalone drivers/power/supply/s2mu106-fuelgauge.c,
> with no changes to s2mu005-battery.c or its binding. Sorry for the
> noise -- I should have settled on this shape before sending v1.
Actually, this one was just fine. I didn't look at the patches
meticulously but it seems like it does belong here. The correct approach
would be to adjust the driver correctly so that it accepts both.
The compatible patch is, in fact incorrect. The driver clearly uses two
separate compatibles for the two devices, so there should not be any
fallback.
> Adil
prev parent reply other threads:[~2026-11-20 15:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 7:39 [PATCH v1 0/3] power: supply: s2mu005-battery: add S2MU106 (Samsung Galaxy XCover5) Adil Hüsrev Tepe
2026-11-16 7:39 ` [PATCH v1 1/3] dt-bindings: power: supply: samsung,s2mu005-fuel-gauge: add S2MU106 Adil Hüsrev Tepe
2026-11-16 7:39 ` [PATCH v1 2/3] power: supply: s2mu005-battery: make the alert interrupt optional Adil Hüsrev Tepe
2026-11-16 7:40 ` [PATCH v1 3/3] power: supply: s2mu005-battery: add S2MU106 support Adil Hüsrev Tepe
2026-11-17 10:41 ` [PATCH v1 0/3] power: supply: s2mu005-battery: add S2MU106 (Samsung Galaxy XCover5) Adil Hüsrev Tepe
2026-11-20 15:52 ` Kaustabh Chakraborty [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=DN05PYTW4NV6.SOA0NRNOJBAR@disroot.org \
--to=kauschluss@disroot.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
--cc=tadilhusrev@gmail.com \
--cc=y.oudjana@protonmail.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