lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqKM5unmiXdYBzM9xfEETfTVTF9RMXPuT7Lb7w0cnwd1mw@mail.gmail.com>
Date:   Thu, 20 May 2021 11:41:07 -0500
From:   Rob Herring <robh@...nel.org>
To:     Aswath Govindraju <a-govindraju@...com>
Cc:     Vignesh Raghavendra <vigneshr@...com>,
        Lokesh Vutla <lokeshvutla@...com>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Kishon Vijay Abraham I <kishon@...com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Keerthy <j-keerthy@...com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        devicetree@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema

On Tue, May 18, 2021 at 9:13 AM Aswath Govindraju <a-govindraju@...com> 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@...com>
> >> ---
> >>  .../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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ