Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC

From: Alina Yu
Date: Sun Jul 09 2023 - 23:09:22 EST


Hi, Krzystof

On Thu, Jul 06, 2023 at 06:30:40PM +0800, Alina Yu wrote:
> On Wed, Jul 05, 2023 at 07:58:53PM +0200, Krzysztof Kozlowski wrote:
> > On 05/07/2023 17:27, alina_yu@xxxxxxxxxxx wrote:
> > > From: alinayu <alina_yu@xxxxxxxxxxx>
> > >
> > > Add bindings for Richtek RTQ2208 IC controlled SubPMIC
> >
>
> ...
>
> > > + Buck and ldo vout selection is based on this value.
> > > + There are two independently programmable voltage settings named as mtp-sel0 and
> > > + mtp-sel1 for RTQ2208 bucks vout voltage. 0 which means this property isn't present
> > > + and 1 which means this property is present corresponds to different adjustable registers.
> > > +
> > > + 0 - DVS0 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL0 register to en/disable vout.
> > > + 1 - DVS1 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL1 register to en/disable vout.
> >
> > I read it three times and still don't understand. This is bool, not 0/1,
> > so are these "0" refer to DVS0 or to presence of the property? Maybe
> > Mark will understand it, I don't get it.
> >
>
> Yes, "0" refers to DVS0 registers, and "1" refers to DVS1.
> and there is only DVS0 and DVS1, so I use boolean to check which one is used.
>
> Is it more understandable if I modify that to enum ? And description will be like this
>
> richtek,mtp-sel:
> enum: [0, 1]
> description: |
> vout register selection besed on this value.
> 0 - Using DVS0 register setting to adjust vout
> 1 - Using DVS1 register setting to adjust vout
>

May I ask one more question ?
If I modify the name into "richtek,mtp-sel-high", is that more understandable ?
It will be like this,

richtek,mtp-sel-high:
type: boolean
description:
vout register selection besed on this value.
0 - Using DVS0 register setting to adjust vout
1 - Using DVS1 register setting to adjust vout

>
> >
> >
>
> BR,
> Alina