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

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

 



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@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.

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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux