[PATCH v4 2/5] power: supply: add support for max77759 fuel gauge

Peter Griffin peter.griffin at linaro.org
Mon Jul 7 01:52:00 PDT 2025


Hi André

On Mon, 7 Jul 2025 at 09:04, André Draszik <andre.draszik at linaro.org> wrote:
>
> Hi,
>
> On Mon, 2025-07-07 at 08:16 +0100, Peter Griffin wrote:
> > Hi Thomas,
> >
> > On Tue, 24 Jun 2025 at 16:45, Thomas Antoine <t.antoine at uclouvain.be> wrote:
> >
> > > I am unsure about what to do about this initalization, especially for values
> > > which slightly differ from the devicetree. I think for next version, I
> > > will have the same parameters be passed in the devicetree like android.
> >
> > We don't really pass register values like the downstream driver is
> > doing in the device tree. I think you will likely need to add a
> > max77759-gs101-oriole compatible to the driver and then have the
> > application specific values, and m5 gauge model algorithm as static
> > info in the driver applied from the dedicated compatible. It would
> > also be worth checking whether any more of those register values can
> > be represented by the standard power-supply binding properties that
> > already exist.
>
> I believe these are likely battery specific values, and were obtained during
> battery characterization by the vendor (or Maxim). They can change (with a
> different battery supplier etc, hence I don't think basing this on a
> max77759-gs101-oriole would be correct here.
>
> As we learned from the Pixel 6a battery updates, the same phone may use
> batteries (e.g. from different suppliers).
>
> Either it needs to know about the specific battery model, or the values
> should be passed from DT in some way.

Some of the fg-params values are characterization values like
QResidual, Rcomp0 and others. I hadn't really considered different
batteries for the same phone model. Given that information I think one
would need to investigate in more detail how downstream chooses what
battery it has and what set of values to use.

Thanks,

Peter



More information about the linux-arm-kernel mailing list