Re: [PATCH V9 4/6] regulator: Add a regulator driver for the PM8008 PMIC

From: Stephen Boyd
Date: Wed Apr 06 2022 - 16:02:43 EST


Quoting Mark Brown (2022-04-06 09:36:14)
> On Wed, Apr 06, 2022 at 08:51:48AM -0700, Stephen Boyd wrote:
> > Quoting Mark Brown (2022-04-06 08:45:41)
>
> > > There's a MFD parent for it, and if it's for an I2C device for a pm8008
> > > why would it have a -regulators in the name?
>
> > There are two i2c devices. One is pm8008 at i2c address 0x8 and one is
> > pm8008-regulators at i2c address 0x9. Earlier revisions of this patch
> > series were making it very confusing by redoing the pm8008 binding and
> > adding the pm8008-regulator i2c address device to the same binding and
> > driver.
>
> > My guess is that this is one IC that responds to multiple i2c addresses.
> > The "main" qcom,pm8008 address is 0x8 and that supports things like
> > interrupts. Then there's an address for regulators at 0x9 which controls
> > the handful of LDOs on the PMIC.
>
> So it's like the TI TWL4030 and Palmas - in which case it should
> probably be handled similarly?

How did those work out? I wasn't involved and I don't know what you
mean. Do they have multiple i2c addresses they respond to?

> Note that the original sumbission was
> *also* a MFD subfunction, but using a DT compatible to match the
> platform device - this is the first I've heard of this being a separate
> I2C function.

I'm mainly looking at the dts file now. It clearly has two i2c devices
at 0x8 and 0x9. Maybe the regulator driver followed the mfd design
because the first driver for this device is an mfd.