Re: [PATCH v2 02/17] regulator: dt-bindings: add s2mpg10-pmic regulators

From: André Draszik
Date: Thu Jun 12 2025 - 06:59:26 EST


Hi Mark,

On Wed, 2025-06-11 at 14:53 +0100, Mark Brown wrote:
> On Wed, Jun 11, 2025 at 10:55:44AM +0200, Krzysztof Kozlowski wrote:
> > On Fri, Jun 06, 2025 at 04:02:58PM GMT, André Draszik wrote:
>
> > > +          For S2MPG10 ldo20m, the following values are valid
> > > +            - 0 # S2MPG10_PCTRLSEL_LDO20M_ON - always on
>
> > No, use standard regulator properties - regulator-always-on
>
> > > +            - 1 # S2MPG10_PCTRLSEL_LDO20M_EN_SFR - VLDO20M_EN & LDO20M_SFR
> > > +            - 2 # S2MPG10_PCTRLSEL_LDO20M_EN - VLDO20M_EN pin
> > > +            - 3 # S2MPG10_PCTRLSEL_LDO20M_SFR - LDO20M_SFR in LDO_CTRL1 register
> > > +            - 4 # S2MPG10_PCTRLSEL_LDO20M_OFF - disable
>
> > I don't think we allowed such property in the past. I don't get what is
> > here the actual signal - you described registers in multiple places, not
> > signals. Few of these duplicate standard properties, so this looks like
> > exact copy of downstream which was doing exactly that way and that was
> > exactly never upstreamed.
>
> It looks like we can infer the configuration needed here from the
> existing properties,

For this ldo20, yes, and I'll update binding+driver to do so.

> if a GPIO is provided then use value 2 otherwise
> use value 3.

Close :-) There is another register to say if this pctrlsel should be
respected in the first place. Therefore if a GPIO is provided, then use
value 2 for pctrlsel, otherwise the value doesn't matter, as pctrlsel
will be ignored anyway. But doesn't really matter in the context of this
discussion here, just for future reference :-)

Thanks for your review!

Thanks!
Andre'