Thread (10 messages) 10 messages, 4 authors, 2021-05-27

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

From: Rob Herring <robh@kernel.org>
Date: 2021-05-20 16:41:23
Also in: linux-devicetree, lkml

On Tue, May 18, 2021 at 9:13 AM Aswath Govindraju [off-list ref] wrote:

Hi Rob,

On 18/05/21 3:45 am, Rob Herring wrote:
quoted
On Tue, May 11, 2021 at 02:31:20PM +0530, Aswath Govindraju wrote:
quoted
Convert gpio-davinci dt-binding documentation from txt to yaml format.

Signed-off-by: Aswath Govindraju <redacted>
---
 .../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
[...]
quoted
quoted
+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.
quoted
quoted
+
+  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.
quoted
quoted
+
+  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.
quoted
quoted
+
+  "#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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help