[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210604103458.bb6niqmuflgh6vkq@earth.universe>
Date: Fri, 4 Jun 2021 12:34:58 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Stephan Gerhold <stephan@...hold.net>
Cc: Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Beomho Seo <beomho.seo@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH v2 0/3] Fix RT5033 battery device tree probing
Hi,
On Mon, May 17, 2021 at 12:51:10PM +0200, Stephan Gerhold wrote:
> At the moment, the RT5033 MFD and battery driver suggest that the
> battery driver should probe as a sub-device of the MFD driver. However,
> this does not make any sense since the fuel gauge part of RT5033 has its
> own I2C device and interrupt line.
>
> It was also documented as separate I2C device in the original device
> tree bindings [1] (that were never finished up and merged) but for some
> reason the code does not match the documentation (and reality). :/
>
> Given other fairly critical mistakes like setting the wrong bits
> in the regulator driver (see [2]), unfortunately I get the feeling
> that none of the RT5033 drivers were ever tested properly. :(
>
> This patch sets adds a proper of_match_table to rt5033-battery
> and removes the rt5033-battery sub-device from the MFD driver.
> There is no compile/runtime dependency of the power supply / MFD patch
> so they can just be applied separately through the power supply / MFD tree.
Thanks, I queued patches 1&2 to power-supply's for-next branch
and ignored patch 3.
-- Sebastian
> With these changes, rt5033-battery seems to work fine on the
> Samsung Galaxy A5 (2015) at least (it reports a reasonable
> battery percentage).
>
> [1]: https://lore.kernel.org/linux-pm/1425864191-4121-3-git-send-email-beomho.seo@samsung.com/
> [2]: https://lore.kernel.org/lkml/20201110130047.8097-1-michael.srba@seznam.cz/
>
> Changes in v2: Fix stupid typo in second patch :(
> v1: Honestly, not worth looking at :)
>
> Stephan Gerhold (3):
> dt-bindings: power: supply: Add DT schema for richtek,rt5033-battery
> power: supply: rt5033_battery: Fix device tree enumeration
> mfd: rt5033: Drop rt5033-battery sub-device
>
> .../power/supply/richtek,rt5033-battery.yaml | 54 +++++++++++++++++++
> drivers/mfd/rt5033.c | 3 --
> drivers/power/supply/Kconfig | 3 +-
> drivers/power/supply/rt5033_battery.c | 7 +++
> 4 files changed, 63 insertions(+), 4 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt5033-battery.yaml
>
> --
> 2.31.1
>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists