Add YAML bindings for MA35D1 SoC keypad.
Signed-off-by: Ming-Jen Chen <mjchen0829@gmail.com>
---
.../bindings/input/nuvoton,ma35d1-keypad.yaml | 69 +++++++++++++++++++
1 file changed, 69 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
diff --git a/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
new file mode 100644
index 000000000000..9ccd81a2574d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/nuvoton,ma35d1-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton MA35D1 Keypad
+
+maintainers:
+ - Ming-jen Chen <mjchen0829@gmail.com>
+
+allOf:
+ - $ref: /schemas/input/matrix-keymap.yaml#
+
+properties:
+ compatible:
+ const: nuvoton,ma35d1-kpi
+
+ debounce-delay-ms:
+ description: Debounce delay time in milliseconds.
+ maxItems: 1
+
+ scan-interval-ms:
+ description: Scan interval time in milliseconds.
+ maxItems: 1
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - linux,keymap
+ - keypad,num-rows
+ - keypad,num-columns
+ - debounce-delay-ms
+ - scan-interval-ms
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/input/input.h>
+ keypad@404A0000 {
+ compatible = "nuvoton,ma35d1-kpi";
+ reg = <0x404A0000 0x10000>;
+ interrupts = <79>;
+ clocks = <&clk>;
+ keypad,num-rows = <2>;
+ keypad,num-columns = <2>;
+
+ linux,keymap = <
+ MATRIX_KEY(0, 0, KEY_ENTER)
+ MATRIX_KEY(0, 1, KEY_ENTER)
+ MATRIX_KEY(1, 0, KEY_SPACE)
+ MATRIX_KEY(1, 1, KEY_Z)
+ >;
+
+ debounce-delay-ms = <1>;
+ scan-interval-ms = <20>;
+ };
--
2.25.1
On Tue, Nov 19, 2024 at 02:59:53AM +0000, Ming-Jen Chen wrote:
> Add YAML bindings for MA35D1 SoC keypad.
>
> Signed-off-by: Ming-Jen Chen <mjchen0829@gmail.com>
> ---
> .../bindings/input/nuvoton,ma35d1-keypad.yaml | 69 +++++++++++++++++++
> 1 file changed, 69 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>
> diff --git a/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
> new file mode 100644
> index 000000000000..9ccd81a2574d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
Filename matching compatible. You got this comment already.
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/nuvoton,ma35d1-keypad.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nuvoton MA35D1 Keypad
> +
> +maintainers:
> + - Ming-jen Chen <mjchen0829@gmail.com>
> +
> +allOf:
> + - $ref: /schemas/input/matrix-keymap.yaml#
> +
> +properties:
> + compatible:
> + const: nuvoton,ma35d1-kpi
> +
> + debounce-delay-ms:
> + description: Debounce delay time in milliseconds.
> + maxItems: 1
> +
> + scan-interval-ms:
> + description: Scan interval time in milliseconds.
> + maxItems: 1
> +
> + reg:
> + maxItems: 1
Keep the same order of properties as in required: block.
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - linux,keymap
> + - keypad,num-rows
> + - keypad,num-columns
> + - debounce-delay-ms
> + - scan-interval-ms
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/input/input.h>
> + keypad@404A0000 {
Lowercase hex
> + compatible = "nuvoton,ma35d1-kpi";
> + reg = <0x404A0000 0x10000>;
Lowercase hex
Best regards,
Krzysztof
Hi, Krzysztof:
Thank you for your feedback on the v4 submission. I understand that some
of your previous comments were not fully addressed. I want to make sure
I completely understand your feedback and resolve the issues correctly.
Could you kindly let me know if the following approach is acceptable?
On 2024/11/20 下午 04:41, Krzysztof Kozlowski wrote:
> On Tue, Nov 19, 2024 at 02:59:53AM +0000, Ming-Jen Chen wrote:
>> Add YAML bindings for MA35D1 SoC keypad.
>>
>> Signed-off-by: Ming-Jen Chen <mjchen0829@gmail.com>
>> ---
>> .../bindings/input/nuvoton,ma35d1-keypad.yaml | 69 +++++++++++++++++++
>> 1 file changed, 69 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>> new file mode 100644
>> index 000000000000..9ccd81a2574d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>
> Filename matching compatible. You got this comment already.
>
>
>> @@ -0,0 +1,69 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/input/nuvoton,ma35d1-keypad.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Nuvoton MA35D1 Keypad
>> +
>> +maintainers:
>> + - Ming-jen Chen <mjchen0829@gmail.com>
>> +
>> +allOf:
>> + - $ref: /schemas/input/matrix-keymap.yaml#
>> +
>> +properties:
>> + compatible:
>> + const: nuvoton,ma35d1-kpi
>> +
>> + debounce-delay-ms:
>> + description: Debounce delay time in milliseconds.
>> + maxItems: 1
>> +
>> + scan-interval-ms:
>> + description: Scan interval time in milliseconds.
>> + maxItems: 1
>> +
>> + reg:
>> + maxItems: 1
>
> Keep the same order of properties as in required: block.
I will modify to:
properties:
compatible:
const: nuvoton,ma35d1-kpi
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
linux,keymap:
description: Keymap for the keypad.
keypad,num-rows:
description: Number of rows in the keypad.
keypad,num-columns:
description: Number of columns in the keypad.
debounce-delay-ms:
description: Debounce delay time in milliseconds.
maxItems: 1
scan-interval-ms:
description: Scan interval time in milliseconds.
maxItems: 1
required:
- compatible
- reg
- interrupts
- clocks
- linux,keymap
- keypad,num-rows
- keypad,num-columns
- debounce-delay-ms
- scan-interval-ms
>
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + clocks:
>> + maxItems: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - interrupts
>> + - clocks
>> + - linux,keymap
>> + - keypad,num-rows
>> + - keypad,num-columns
>> + - debounce-delay-ms
>> + - scan-interval-ms
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/input/input.h>
>> + keypad@404A0000 {
>
> Lowercase hex
I will modify to:
keypad@404a0000 {
>
>> + compatible = "nuvoton,ma35d1-kpi";
>> + reg = <0x404A0000 0x10000>;
>
> Lowercase hex
I will modify to:
reg = <0x404a0000 0x10000>;
Your guidance will be greatly appreciated, and I will incorporate the
necessary changes in the next submission to fully address your concerns.
Thank you for your time and patience.
>
> Best regards,
> Krzysztof
>
On 2024/11/20 下午 04:41, Krzysztof Kozlowski wrote:
> On Tue, Nov 19, 2024 at 02:59:53AM +0000, Ming-Jen Chen wrote:
>> Add YAML bindings for MA35D1 SoC keypad.
>>
>> Signed-off-by: Ming-Jen Chen <mjchen0829@gmail.com>
>> ---
>> .../bindings/input/nuvoton,ma35d1-keypad.yaml | 69 +++++++++++++++++++
>> 1 file changed, 69 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>> new file mode 100644
>> index 000000000000..9ccd81a2574d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>
> Filename matching compatible. You got this comment already.
>
>
>> @@ -0,0 +1,69 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/input/nuvoton,ma35d1-keypad.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Nuvoton MA35D1 Keypad
>> +
>> +maintainers:
>> + - Ming-jen Chen <mjchen0829@gmail.com>
>> +
>> +allOf:
>> + - $ref: /schemas/input/matrix-keymap.yaml#
>> +
>> +properties:
>> + compatible:
>> + const: nuvoton,ma35d1-kpi
>> +
>> + debounce-delay-ms:
>> + description: Debounce delay time in milliseconds.
>> + maxItems: 1
>> +
>> + scan-interval-ms:
>> + description: Scan interval time in milliseconds.
>> + maxItems: 1
>> +
>> + reg:
>> + maxItems: 1
>
> Keep the same order of properties as in required: block.
I will ensure that the properties block and the required block have the
same order.
>
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + clocks:
>> + maxItems: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - interrupts
>> + - clocks
>> + - linux,keymap
>> + - keypad,num-rows
>> + - keypad,num-columns
>> + - debounce-delay-ms
>> + - scan-interval-ms
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/input/input.h>
>> + keypad@404A0000 {
>
> Lowercase hex
I will fix it in the next revision
>
>> + compatible = "nuvoton,ma35d1-kpi";
>> + reg = <0x404A0000 0x10000>;
>
> Lowercase hex
I will fix it in the next revision
Best regards,
Mingjen-Jen Chen
>
> Best regards,
> Krzysztof
>
Hi:
I apologize for the oversight in my previous patch where I forget to
include v3 in the subject line.
The content of the patch remains the same, only the version label has
been corrected.
On 2024/11/19 上午 10:59, Ming-Jen Chen wrote:
> Add YAML bindings for MA35D1 SoC keypad.
>
> Signed-off-by: Ming-Jen Chen <mjchen0829@gmail.com>
> ---
> .../bindings/input/nuvoton,ma35d1-keypad.yaml | 69 +++++++++++++++++++
> 1 file changed, 69 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
>
> diff --git a/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
> new file mode 100644
> index 000000000000..9ccd81a2574d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/nuvoton,ma35d1-keypad.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/nuvoton,ma35d1-keypad.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nuvoton MA35D1 Keypad
> +
> +maintainers:
> + - Ming-jen Chen <mjchen0829@gmail.com>
> +
> +allOf:
> + - $ref: /schemas/input/matrix-keymap.yaml#
> +
> +properties:
> + compatible:
> + const: nuvoton,ma35d1-kpi
> +
> + debounce-delay-ms:
> + description: Debounce delay time in milliseconds.
> + maxItems: 1
> +
> + scan-interval-ms:
> + description: Scan interval time in milliseconds.
> + maxItems: 1
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - linux,keymap
> + - keypad,num-rows
> + - keypad,num-columns
> + - debounce-delay-ms
> + - scan-interval-ms
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/input/input.h>
> + keypad@404A0000 {
> + compatible = "nuvoton,ma35d1-kpi";
> + reg = <0x404A0000 0x10000>;
> + interrupts = <79>;
> + clocks = <&clk>;
> + keypad,num-rows = <2>;
> + keypad,num-columns = <2>;
> +
> + linux,keymap = <
> + MATRIX_KEY(0, 0, KEY_ENTER)
> + MATRIX_KEY(0, 1, KEY_ENTER)
> + MATRIX_KEY(1, 0, KEY_SPACE)
> + MATRIX_KEY(1, 1, KEY_Z)
> + >;
> +
> + debounce-delay-ms = <1>;
> + scan-interval-ms = <20>;
> + };
© 2016 - 2026 Red Hat, Inc.