mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alina Yu <alina_yu@richtek.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: <broonie@kernel.org>, <linux-kernel@vger.kernel.org>,
	<cy_huang@richtek.com>, <alina_yu@richtek.com>
Subject: Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Date: Thu, 6 Jul 2023 18:30:40 +0800	[thread overview]
Message-ID: <20230706103040.GA32138@linuxcarl2.richtek.com> (raw)
In-Reply-To: <d3308334-aa91-f265-2469-8a6fbc727798@kernel.org>

On Wed, Jul 05, 2023 at 07:58:53PM +0200, Krzysztof Kozlowski wrote:
> On 05/07/2023 17:27, alina_yu@richtek.com wrote:
> > From: alinayu <alina_yu@richtek.com>
> > 
> > Add bindings for Richtek RTQ2208 IC controlled SubPMIC
> 
> Please use scripts/get_maintainers.pl to get a list of necessary people
> and lists to CC.  It might happen, that command when run on an older
> kernel, gives you outdated entries.  Therefore please be sure you base
> your patches on recent Linux kernel.
> 
> You missed at least DT list (maybe more), so this won't be tested by our
> tools. Performing review on untested code might be a waste of time, thus
> I will skip this patch entirely till you follow the process allowing the
> patch to be tested.
> 
> Please kindly resend and include all necessary To/Cc entries.
> 
> Limited review follows.
> 

Sorry, I will add all necessary people to CC list to v3.

...

> > +      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

...

> > +
> > +      regulator-state-(mem):
> 
> That's not a pattern.
>

Should I revise that like this ?

patternProperties:
  "^regulator-state-mem$":


> > +        type: object
> > +        additionalProperties: true
> 
> Why?

Does "additionalProperties: true" mean I need to define my own property ?
If yes, I misunderstood additionalProperties as properties like "regulator-on-in-suspend" or "regulator-mode".

> 
> > +        properties:
> > +          regulator-on-in-suspend: false
> > +          regulator-mode: false
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - regulators
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    i2c {
> > +      #address-cells = <1>;
> > +      #size-cells = <0>;
> > +
> > +      rtq2208@10 {
> 
> Node names should be generic. See also explanation and list of examples
> in DT specification:
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> 

I'll modify the node name to 

regulator@10

in v3

> > +        compatible = "richtek,rtq2208";
> > +        reg = <0x10>;
> > +        interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
> > +        richtek,mtp-sel;
> > +
> > +        regulators {
> > +         BUCK_A:buck_A {
> 
> Drop labels.
> 
> 

BR,
Alina

  reply	other threads:[~2023-07-06 10:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 15:27 [PATCH v2 0/2] Add Richtek RTQ2208 SubPMIC support alina_yu
2023-07-05 15:27 ` [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC alina_yu
2023-07-05 17:58   ` Krzysztof Kozlowski
2023-07-06 10:30     ` Alina Yu [this message]
2023-07-06 11:04       ` Krzysztof Kozlowski
2023-07-10  3:08       ` Alina Yu
2023-07-10  6:02         ` Krzysztof Kozlowski
2023-07-10  7:23           ` Alina Yu
2023-07-05 15:27 ` [PATCH v2 2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver alina_yu
2023-07-18  8:40   ` Alina Yu
2023-07-18 14:16     ` Mark Brown
2023-07-19  4:29       ` Alina Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230706103040.GA32138@linuxcarl2.richtek.com \
    --to=alina_yu@richtek.com \
    --cc=broonie@kernel.org \
    --cc=cy_huang@richtek.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome