<div dir="ltr">Dear Chanh Nguyen,<br><br>Thank you for your response.<br><br>Chanh Nguyen <<a href="mailto:chanh@amperemail.onmicrosoft.com">chanh@amperemail.onmicrosoft.com</a>> 於 2024年11月6日 週三 下午12:58寫道:<br>><br>><br>><br>> On 06/11/2024 09:39, Eason Yang wrote:<br>> > This adds a binding specification for the Nuvoton NCT7201/NCT7202<br>> > family of ADCs.<br>> ><br>> > Signed-off-by: Eason Yang <<a href="mailto:j2anfernee@gmail.com">j2anfernee@gmail.com</a>><br>> > ---<br>> >   .../bindings/iio/adc/nuvoton,nct720x.yaml     | 47 +++++++++++++++++++<br>> >   MAINTAINERS                                   |  1 +<br>> >   2 files changed, 48 insertions(+)<br>> >   create mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,nct720x.yaml<br>> ><br>> > diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,nct720x.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,nct720x.yaml<br>> > new file mode 100644<br>> > index 000000000000..3052039af10e<br>> > --- /dev/null<br>> > +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,nct720x.yaml<br>> > @@ -0,0 +1,47 @@<br>> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)<br>> > +%YAML 1.2<br>> > +---<br>> > +$id: <a href="http://devicetree.org/schemas/iio/adc/nuvoton,nct720x.yaml#">http://devicetree.org/schemas/iio/adc/nuvoton,nct720x.yaml#</a><br>> > +$schema: <a href="http://devicetree.org/meta-schemas/core.yaml#">http://devicetree.org/meta-schemas/core.yaml#</a><br>> > +<br>> > +title: Nuvoton nct7202 and similar ADCs<br>> > +<br>> > +maintainers:<br>> > +  - Eason Yang <<a href="mailto:yhyang2@nuvoton.com">yhyang2@nuvoton.com</a>><br>> > +<br>> > +description: |<br>> > +   Family of ADCs with i2c interface.<br>> > +<br>> > +properties:<br>> > +  compatible:<br>> > +    enum:<br>> > +      - nuvoton,nct7201<br>> > +      - nuvoton,nct7202<br>> > +<br>> > +  reg:<br>> > +    maxItems: 1<br>> > +<br>> > +  read-vin-data-size:<br>><br>> Is it generic property or vendor property? I tried to find in the<br>> <a href="https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings">https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings</a><br>> , but it seems this property hasn't been used on other devices.<br>><br>> If it is vendor property, then I think it should include a vendor<br>> prefix. For examples:<br>><br>> <a href="https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/adi%2Cad7780.yaml#L50">https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/adi%2Cad7780.yaml#L50</a><br>> <a href="https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/fsl%2Cvf610-adc.yaml#L42">https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/fsl%2Cvf610-adc.yaml#L42</a><br>> <a href="https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/st%2Cstmpe-adc.yaml#L22">https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/st%2Cstmpe-adc.yaml#L22</a><br><br>I would add a vendor prefix for it.<br><br>><br>><br>> > +    description: number of data bits per read vin<br>> > +    $ref: /schemas/types.yaml#/definitions/uint32<br>> > +    enum: [8, 16]<br>> > +<br>> > +required:<br>> > +  - compatible<br>> > +  - reg<br>> > +  - read-vin-data-size<br>> > +<br>> > +additionalProperties: false<br>> > +<br>> > +examples:<br>> > +  - |<br>> > +    i2c {<br>> > +        #address-cells = <1>;<br>> > +        #size-cells = <0>;<br>> > +<br>> > +        nct7202@1d {<br>><br>> I think the Node name should follow<br>> <a href="https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation">https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation</a><br>><br>><br>> For some examples that were merged before<br>><br>> <a href="https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/adi%2Cad7091r5.yaml#L102">https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/adi%2Cad7091r5.yaml#L102</a><br>> <a href="https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/maxim%2Cmax1238.yaml#L73">https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/maxim%2Cmax1238.yaml#L73</a><br>> <a href="https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/ti%2Cadc081c.yaml#L49">https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/adc/ti%2Cadc081c.yaml#L49</a><br>><br><br>I would change it for the node naming.<br><br>> > +            compatible = "nuvoton,nct7202";<br>> > +            reg = <0x1d>;<br>> > +            read-vin-data-size = <8>;<br>> > +        };<br>> > +    };<br>> > diff --git a/MAINTAINERS b/MAINTAINERS<br>> > index 91d0609db61b..68570c58e7aa 100644<br>> > --- a/MAINTAINERS<br>> > +++ b/MAINTAINERS<br>> > @@ -2746,6 +2746,7 @@ L:      <a href="mailto:openbmc@lists.ozlabs.org">openbmc@lists.ozlabs.org</a> (moderated for non-subscribers)<br>> >   S:  Supported<br>> >   F:  Documentation/devicetree/bindings/*/*/*npcm*<br>> >   F:  Documentation/devicetree/bindings/*/*npcm*<br>> > +F:   Documentation/devicetree/bindings/iio/adc/nuvoton,nct720x.yaml<br>> >   F:  Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml<br>> >   F:  arch/arm/boot/dts/nuvoton/nuvoton-npcm*<br>> >   F:  arch/arm/mach-npcm/<br>></div>