Re: [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 18, 2021 at 9:13 AM Aswath Govindraju <a-govindraju@xxxxxx> wrote:
>
>
> Hi Rob,
>
> On 18/05/21 3:45 am, Rob Herring wrote:
> > On Tue, May 11, 2021 at 02:31:20PM +0530, Aswath Govindraju wrote:
> >> Convert gpio-davinci dt-binding documentation from txt to yaml format.
> >>
> >> Signed-off-by: Aswath Govindraju <a-govindraju@xxxxxx>
> >> ---
> >>  .../devicetree/bindings/gpio/gpio-davinci.txt | 167 ---------------
> >>  .../bindings/gpio/gpio-davinci.yaml           | 193 ++++++++++++++++++
> >>  MAINTAINERS                                   |   2 +-
> >>  3 files changed, 194 insertions(+), 168 deletions(-)
> >>  delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-davinci.txt
> >>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-davinci.yaml
> >>
>
> [...]
>
> >> +properties:
> >> +  compatible:
> >> +    oneOf:
> >> +      - items:
> >> +          - enum:
> >> +              - ti,k2g-gpio
> >> +              - ti,am654-gpio
> >> +              - ti,j721e-gpio
> >> +              - ti,am64-gpio
> >> +          - const: ti,keystone-gpio
> >> +
> >> +      - items:
> >> +          - const: ti,dm6441-gpio
> >> +      - items:
> >> +          - const: ti,keystone-gpio
> >
> > These 2 can be expressed as an 'enum'.
>
> I will change this.
>
> >
> >> +
> >> +  reg:
> >> +    maxItems: 1
> >> +    description:
> >> +      Physical base address of the controller and the size of memory mapped registers.
> >
> > Drop. That's every 'reg' property.
> >
>
> I'll drop this.
>
> >> +
> >> +  gpio-controller: true
> >> +
> >> +  gpio-ranges: true
> >> +
> >> +  gpio-line-names:
> >> +    description: strings describing the names of each gpio line.
> >
> > Any constraints like min/max number of lines?
> >
>
> The max number of lines will be equal to ti,ngpio. Is there any way to
> equate maxItems to the a property value in json schema ?

There have been discussions about something like that for json-schema,
but nothing yet AFAIK. Is there a max for ti,ngpio? Nothing means
2^32. Surely there's something less than that. You can always adjust
the max later.

> >> +
> >> +  "#gpio-cells":
> >> +    const: 2
> >> +    description:
> >> +      first cell is the pin number and second cell is used to specify optional parameters (unused).
> >> +
> >> +  interrupts:
> >> +    description:
> >> +      Array of GPIO interrupt number. Only banked or unbanked IRQs are supported at a time.
> >
> > Needs constraints. How many items and what are they?
>
> Here also the maximum number of interrupts is equal to ti,ngpio in
> unbanked interrupts case. Same as above is there anyway to equate
> maxItems to ti,ngpio property in json schma ? If not, then what would be
> the best way to handle this ?

Banked means 1 combined interrupt?



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux