From: Aswath Govindraju <a-govindraju@ti.com>
To: Rob Herring <robh@kernel.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
Lokesh Vutla <lokeshvutla@ti.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Keerthy <j-keerthy@ti.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
<devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema
Date: Thu, 20 May 2021 22:34:03 +0530 [thread overview]
Message-ID: <50d6dea2-f35d-d620-a8f2-29ad97365119@ti.com> (raw)
In-Reply-To: <CAL_JsqKM5unmiXdYBzM9xfEETfTVTF9RMXPuT7Lb7w0cnwd1mw@mail.gmail.com>
Hi Rob,
On 20/05/21 10:11 pm, Rob Herring wrote:
> On Tue, May 18, 2021 at 9:13 AM Aswath Govindraju <a-govindraju@ti.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@ti.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.
Thank you. I will put an cap on this number based on the existing device
trees.
>
>>>> +
>>>> + "#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?
>
Yes, one combined interrupt per bank and there can be multiple banks per
gpio instance.
Thanks,
Aswath
next prev parent reply other threads:[~2021-05-20 17:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 9:01 [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema Aswath Govindraju
2021-05-17 22:15 ` Rob Herring
2021-05-18 14:13 ` Aswath Govindraju
2021-05-20 16:41 ` Rob Herring
2021-05-20 17:04 ` Aswath Govindraju [this message]
2021-05-21 8:31 ` Grygorii Strashko
2021-05-21 12:56 ` Rob Herring
2021-05-21 16:06 ` Grygorii Strashko
2021-05-21 16:30 ` Rob Herring
2021-05-27 0:17 ` Linus Walleij
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=50d6dea2-f35d-d620-a8f2-29ad97365119@ti.com \
--to=a-govindraju@ti.com \
--cc=bgolaszewski@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=j-keerthy@ti.com \
--cc=kishon@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lokeshvutla@ti.com \
--cc=robh@kernel.org \
--cc=vigneshr@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).