linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
@ 2023-12-08  7:50 Anshul Dalal
  2023-12-08 10:27 ` Krzysztof Kozlowski
  2023-12-08 23:23 ` Dmitry Torokhov
  0 siblings, 2 replies; 8+ messages in thread
From: Anshul Dalal @ 2023-12-08  7:50 UTC (permalink / raw)
  To: linux-input, devicetree
  Cc: Anshul Dalal, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, linux-kernel, linux-kernel-mentees,
	Krzysztof Kozlowski

Convert device tree binding documentation for GPIO attached mouse to
json-schema.

Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/input/gpio-mouse.txt  | 32 ---------
 .../devicetree/bindings/input/gpio-mouse.yaml | 68 +++++++++++++++++++
 2 files changed, 68 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/gpio-mouse.txt
 create mode 100644 Documentation/devicetree/bindings/input/gpio-mouse.yaml

diff --git a/Documentation/devicetree/bindings/input/gpio-mouse.txt b/Documentation/devicetree/bindings/input/gpio-mouse.txt
deleted file mode 100644
index 519510a11af9..000000000000
--- a/Documentation/devicetree/bindings/input/gpio-mouse.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Device-Tree bindings for GPIO attached mice
-
-This simply uses standard GPIO handles to define a simple mouse connected
-to 5-7 GPIO lines.
-
-Required properties:
-	- compatible: must be "gpio-mouse"
-	- scan-interval-ms: The scanning interval in milliseconds
-	- up-gpios: GPIO line phandle to the line indicating "up"
-	- down-gpios: GPIO line phandle to the line indicating "down"
-	- left-gpios: GPIO line phandle to the line indicating "left"
-	- right-gpios: GPIO line phandle to the line indicating "right"
-
-Optional properties:
-	- button-left-gpios: GPIO line handle to the left mouse button
-	- button-middle-gpios: GPIO line handle to the middle mouse button
-	- button-right-gpios: GPIO line handle to the right mouse button
-Example:
-
-#include <dt-bindings/gpio/gpio.h>
-
-gpio-mouse {
-	compatible = "gpio-mouse";
-	scan-interval-ms = <50>;
-	up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
-	down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
-	left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-	right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
-	button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
-	button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
-	button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
-};
diff --git a/Documentation/devicetree/bindings/input/gpio-mouse.yaml b/Documentation/devicetree/bindings/input/gpio-mouse.yaml
new file mode 100644
index 000000000000..3928ec6aff1d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/gpio-mouse.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/gpio-mouse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO attached mouse
+
+description: |
+  This simply uses standard GPIO handles to define a simple mouse connected
+  to 5-7 GPIO lines.
+
+maintainers:
+  - Anshul Dalal <anshulusr@gmail.com>
+
+properties:
+  compatible:
+    const: gpio-mouse
+
+  scan-interval-ms:
+    maxItems: 1
+
+  up-gpios:
+    maxItems: 1
+
+  down-gpios:
+    maxItems: 1
+
+  left-gpios:
+    maxItems: 1
+
+  right-gpios:
+    maxItems: 1
+
+  button-left-gpios:
+    maxItems: 1
+
+  button-middle-gpios:
+    maxItems: 1
+
+  button-right-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - scan-interval-ms
+  - up-gpios
+  - down-gpios
+  - left-gpios
+  - right-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    gpio-mouse {
+        compatible = "gpio-mouse";
+        scan-interval-ms = <50>;
+        up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+        down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+        left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+        right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+        button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+        button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+        button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+    };
-- 
2.42.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
  2023-12-08  7:50 [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema Anshul Dalal
@ 2023-12-08 10:27 ` Krzysztof Kozlowski
  2023-12-08 10:33   ` Anshul Dalal
  2023-12-08 23:23 ` Dmitry Torokhov
  1 sibling, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:27 UTC (permalink / raw)
  To: Anshul Dalal, linux-input, devicetree
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Linus Walleij, linux-kernel, linux-kernel-mentees

On 08/12/2023 08:50, Anshul Dalal wrote:
> Convert device tree binding documentation for GPIO attached mouse to
> json-schema.
> 
> Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

You cannot have v1 being already reviewed. This is some newer version.

> ---

Missing changelog.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
  2023-12-08 10:27 ` Krzysztof Kozlowski
@ 2023-12-08 10:33   ` Anshul Dalal
  2023-12-08 10:59     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Anshul Dalal @ 2023-12-08 10:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-input, devicetree
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Linus Walleij, linux-kernel, linux-kernel-mentees



On 12/8/23 15:57, Krzysztof Kozlowski wrote:
> On 08/12/2023 08:50, Anshul Dalal wrote:
>> Convert device tree binding documentation for GPIO attached mouse to
>> json-schema.
>>
>> Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
>> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> You cannot have v1 being already reviewed. This is some newer version.
> 
>> ---
> 
> Missing changelog.

This is a copy of an earlier patch[1]. Since the patch had been sitting
idle for past 10 days, I reposed it with the Reviewed-by tags added in.
Please let me know if this is the right way or if there is need for a
changelog.

[1]:
https://lore.kernel.org/lkml/20231126103029.851742-1-anshulusr@gmail.com/

Best regards,
Anshul

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
  2023-12-08 10:33   ` Anshul Dalal
@ 2023-12-08 10:59     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:59 UTC (permalink / raw)
  To: Anshul Dalal, linux-input, devicetree
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Linus Walleij, linux-kernel, linux-kernel-mentees

On 08/12/2023 11:33, Anshul Dalal wrote:
> 
> 
> On 12/8/23 15:57, Krzysztof Kozlowski wrote:
>> On 08/12/2023 08:50, Anshul Dalal wrote:
>>> Convert device tree binding documentation for GPIO attached mouse to
>>> json-schema.
>>>
>>> Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
>>> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> You cannot have v1 being already reviewed. This is some newer version.
>>
>>> ---
>>
>> Missing changelog.
> 
> This is a copy of an earlier patch[1]. Since the patch had been sitting
> idle for past 10 days, I reposed it with the Reviewed-by tags added in.
> Please let me know if this is the right way or if there is need for a
> changelog.
> 
> [1]:
> https://lore.kernel.org/lkml/20231126103029.851742-1-anshulusr@gmail.com/

OK, then it should be: "[PATCH RESEND] ...." with a short changelog like:

---

Resending with collected tags.

...

(Sharing this for future, no need to resend it now)

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
  2023-12-08  7:50 [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema Anshul Dalal
  2023-12-08 10:27 ` Krzysztof Kozlowski
@ 2023-12-08 23:23 ` Dmitry Torokhov
  1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2023-12-08 23:23 UTC (permalink / raw)
  To: Anshul Dalal
  Cc: linux-input, devicetree, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, linux-kernel, linux-kernel-mentees,
	Krzysztof Kozlowski

On Fri, Dec 08, 2023 at 01:20:35PM +0530, Anshul Dalal wrote:
> Convert device tree binding documentation for GPIO attached mouse to
> json-schema.
> 
> Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
  2023-11-26 10:30 Anshul Dalal
  2023-11-26 20:08 ` Linus Walleij
@ 2023-11-27  7:13 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-27  7:13 UTC (permalink / raw)
  To: Anshul Dalal, linux-input, devicetree
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Linus Walleij, linux-kernel, linux-kernel-mentees

On 26/11/2023 11:30, Anshul Dalal wrote:
> Convert device tree binding documentation for GPIO attached mouse to
> json-schema.
> 
> Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
> ---

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
  2023-11-26 10:30 Anshul Dalal
@ 2023-11-26 20:08 ` Linus Walleij
  2023-11-27  7:13 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2023-11-26 20:08 UTC (permalink / raw)
  To: Anshul Dalal
  Cc: linux-input, devicetree, Dmitry Torokhov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-kernel,
	linux-kernel-mentees

On Sun, Nov 26, 2023 at 11:32 AM Anshul Dalal <anshulusr@gmail.com> wrote:

> Convert device tree binding documentation for GPIO attached mouse to
> json-schema.
>
> Signed-off-by: Anshul Dalal <anshulusr@gmail.com>

Nice work! It looks flawless, making good use of default typing suffixes
-ms -gpios.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema
@ 2023-11-26 10:30 Anshul Dalal
  2023-11-26 20:08 ` Linus Walleij
  2023-11-27  7:13 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 8+ messages in thread
From: Anshul Dalal @ 2023-11-26 10:30 UTC (permalink / raw)
  To: linux-input, devicetree
  Cc: Anshul Dalal, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, linux-kernel, linux-kernel-mentees

Convert device tree binding documentation for GPIO attached mouse to
json-schema.

Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
---
 .../devicetree/bindings/input/gpio-mouse.txt  | 32 ---------
 .../devicetree/bindings/input/gpio-mouse.yaml | 68 +++++++++++++++++++
 2 files changed, 68 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/gpio-mouse.txt
 create mode 100644 Documentation/devicetree/bindings/input/gpio-mouse.yaml

diff --git a/Documentation/devicetree/bindings/input/gpio-mouse.txt b/Documentation/devicetree/bindings/input/gpio-mouse.txt
deleted file mode 100644
index 519510a11af9..000000000000
--- a/Documentation/devicetree/bindings/input/gpio-mouse.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Device-Tree bindings for GPIO attached mice
-
-This simply uses standard GPIO handles to define a simple mouse connected
-to 5-7 GPIO lines.
-
-Required properties:
-	- compatible: must be "gpio-mouse"
-	- scan-interval-ms: The scanning interval in milliseconds
-	- up-gpios: GPIO line phandle to the line indicating "up"
-	- down-gpios: GPIO line phandle to the line indicating "down"
-	- left-gpios: GPIO line phandle to the line indicating "left"
-	- right-gpios: GPIO line phandle to the line indicating "right"
-
-Optional properties:
-	- button-left-gpios: GPIO line handle to the left mouse button
-	- button-middle-gpios: GPIO line handle to the middle mouse button
-	- button-right-gpios: GPIO line handle to the right mouse button
-Example:
-
-#include <dt-bindings/gpio/gpio.h>
-
-gpio-mouse {
-	compatible = "gpio-mouse";
-	scan-interval-ms = <50>;
-	up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
-	down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
-	left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-	right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
-	button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
-	button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
-	button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
-};
diff --git a/Documentation/devicetree/bindings/input/gpio-mouse.yaml b/Documentation/devicetree/bindings/input/gpio-mouse.yaml
new file mode 100644
index 000000000000..3928ec6aff1d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/gpio-mouse.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/gpio-mouse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO attached mouse
+
+description: |
+  This simply uses standard GPIO handles to define a simple mouse connected
+  to 5-7 GPIO lines.
+
+maintainers:
+  - Anshul Dalal <anshulusr@gmail.com>
+
+properties:
+  compatible:
+    const: gpio-mouse
+
+  scan-interval-ms:
+    maxItems: 1
+
+  up-gpios:
+    maxItems: 1
+
+  down-gpios:
+    maxItems: 1
+
+  left-gpios:
+    maxItems: 1
+
+  right-gpios:
+    maxItems: 1
+
+  button-left-gpios:
+    maxItems: 1
+
+  button-middle-gpios:
+    maxItems: 1
+
+  button-right-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - scan-interval-ms
+  - up-gpios
+  - down-gpios
+  - left-gpios
+  - right-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    gpio-mouse {
+        compatible = "gpio-mouse";
+        scan-interval-ms = <50>;
+        up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+        down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+        left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+        right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+        button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+        button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+        button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+    };
-- 
2.42.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-08 23:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08  7:50 [PATCH v1] dt-bindings: input: convert gpio-mouse to json-schema Anshul Dalal
2023-12-08 10:27 ` Krzysztof Kozlowski
2023-12-08 10:33   ` Anshul Dalal
2023-12-08 10:59     ` Krzysztof Kozlowski
2023-12-08 23:23 ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2023-11-26 10:30 Anshul Dalal
2023-11-26 20:08 ` Linus Walleij
2023-11-27  7:13 ` Krzysztof Kozlowski

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