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

From: Krzysztof Kozlowski
Date: Thu Jul 06 2023 - 07:04:57 EST


On 06/07/2023 12:30, Alina Yu wrote:
>>> +
>>> + regulator-state-(mem):
>>
>> That's not a pattern.
>>
>
> Should I revise that like this ?
>
> patternProperties:
> "^regulator-state-mem$":

It's still not a pattern, but a regular property, so keep it in properties.

I don't even understand what you want to say with this. You put it
outside of any regulator. I don't think this was tested at all. :(

>
>
>>> + type: object
>>> + additionalProperties: true
>>
>> Why?
>
> Does "additionalProperties: true" mean I need to define my own property ?

No.

> If yes, I misunderstood additionalProperties as properties like "regulator-on-in-suspend" or "regulator-mode".

Please open recent regulator bindings and use them as example.

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


If this is PMIC, then "pmic" as name.

Best regards,
Krzysztof