All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: input: use generic node names
@ 2022-05-24  9:31 Krzysztof Kozlowski
  2022-05-24 11:11 ` Andreas Kemnade
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-24  9:31 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Jeff LaBundy,
	linux-input, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Andreas Kemnade

Devicetree specification expects nodes to have generic names, if
possible, so replace custom ones with something generic.  For gpio-keys,
the more popular format is "key-xxx" instead of "xxx-key", so choose the
first one.

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

---

Cc: Andreas Kemnade <andreas@kemnade.info>
---
 .../devicetree/bindings/input/fsl,mpr121-touchkey.yaml        | 4 ++--
 Documentation/devicetree/bindings/input/gpio-keys.yaml        | 4 ++--
 Documentation/devicetree/bindings/input/iqs269a.yaml          | 2 +-
 Documentation/devicetree/bindings/input/iqs626a.yaml          | 2 +-
 .../devicetree/bindings/input/microchip,cap11xx.yaml          | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
index 878464f128dc..5139af287d3e 100644
--- a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
+++ b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
@@ -57,7 +57,7 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
 
-        mpr121@5a {
+        touchkey@5a {
             compatible = "fsl,mpr121-touchkey";
             reg = <0x5a>;
             interrupt-parent = <&gpio1>;
@@ -77,7 +77,7 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
 
-        mpr121@5a {
+        touchkey@5a {
             compatible = "fsl,mpr121-touchkey";
             reg = <0x5a>;
             poll-interval = <20>;
diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
index 7fe1966ea28a..93f601c58984 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
+++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
@@ -127,13 +127,13 @@ examples:
         compatible = "gpio-keys";
         autorepeat;
 
-        up {
+        key-up {
             label = "GPIO Key UP";
             linux,code = <103>;
             gpios = <&gpio1 0 1>;
         };
 
-        down {
+        key-down {
             label = "GPIO Key DOWN";
             linux,code = <108>;
             interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
diff --git a/Documentation/devicetree/bindings/input/iqs269a.yaml b/Documentation/devicetree/bindings/input/iqs269a.yaml
index 9c154e5e1a91..d84d69f5455d 100644
--- a/Documentation/devicetree/bindings/input/iqs269a.yaml
+++ b/Documentation/devicetree/bindings/input/iqs269a.yaml
@@ -475,7 +475,7 @@ examples:
             #address-cells = <1>;
             #size-cells = <0>;
 
-            iqs269a@44 {
+            touch@44 {
                     #address-cells = <1>;
                     #size-cells = <0>;
 
diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml
index 0cb736c541c9..dd727befe564 100644
--- a/Documentation/devicetree/bindings/input/iqs626a.yaml
+++ b/Documentation/devicetree/bindings/input/iqs626a.yaml
@@ -751,7 +751,7 @@ examples:
             #address-cells = <1>;
             #size-cells = <0>;
 
-            iqs626a@44 {
+            touch@44 {
                     #address-cells = <1>;
                     #size-cells = <0>;
 
diff --git a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
index d5d6bced3148..96358b12f9b2 100644
--- a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
+++ b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
@@ -112,7 +112,7 @@ examples:
       #address-cells = <1>;
       #size-cells = <0>;
 
-      cap1188@28 {
+      touch@28 {
         compatible = "microchip,cap1188";
         interrupt-parent = <&gpio1>;
         interrupts = <0 0>;
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: input: use generic node names
  2022-05-24  9:31 [PATCH] dt-bindings: input: use generic node names Krzysztof Kozlowski
@ 2022-05-24 11:11 ` Andreas Kemnade
  2022-05-24 11:28   ` Krzysztof Kozlowski
  2022-05-26  2:20 ` Rob Herring
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Andreas Kemnade @ 2022-05-24 11:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Jeff LaBundy,
	linux-input, devicetree, linux-kernel

Hi,

On Tue, 24 May 2022 11:31:36 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> index 7fe1966ea28a..93f601c58984 100644
> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> @@ -127,13 +127,13 @@ examples:
>          compatible = "gpio-keys";
>          autorepeat;
>  
> -        up {
> +        key-up {
>              label = "GPIO Key UP";
>              linux,code = <103>;
>              gpios = <&gpio1 0 1>;
>          };
>  
> -        down {
> +        key-down {
>              label = "GPIO Key DOWN";
>              linux,code = <108>;
>              interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
hmm, what about changing
patternProperties:
  ".*":

to enforce this format instead of allowing anything?

Regards,
Andreas

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

* Re: [PATCH] dt-bindings: input: use generic node names
  2022-05-24 11:11 ` Andreas Kemnade
@ 2022-05-24 11:28   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-24 11:28 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Jeff LaBundy,
	linux-input, devicetree, linux-kernel

On 24/05/2022 13:11, Andreas Kemnade wrote:
> Hi,
> 
> On Tue, 24 May 2022 11:31:36 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> 
>> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>> index 7fe1966ea28a..93f601c58984 100644
>> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
>> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>> @@ -127,13 +127,13 @@ examples:
>>          compatible = "gpio-keys";
>>          autorepeat;
>>  
>> -        up {
>> +        key-up {
>>              label = "GPIO Key UP";
>>              linux,code = <103>;
>>              gpios = <&gpio1 0 1>;
>>          };
>>  
>> -        down {
>> +        key-down {
>>              label = "GPIO Key DOWN";
>>              linux,code = <108>;
>>              interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
> hmm, what about changing
> patternProperties:
>   ".*":
> 
> to enforce this format instead of allowing anything?

It will cause a lot, a lot of warnings, so first these would need to be
fixed in every DTS. That's also doable, might help if these gpio-keys
bindings need any other object like property.


Best regards,
Krzysztof

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

* Re: [PATCH] dt-bindings: input: use generic node names
  2022-05-24  9:31 [PATCH] dt-bindings: input: use generic node names Krzysztof Kozlowski
  2022-05-24 11:11 ` Andreas Kemnade
@ 2022-05-26  2:20 ` Rob Herring
  2022-05-27 22:44 ` Jeff LaBundy
  2022-05-28 20:41 ` Dmitry Torokhov
  3 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2022-05-26  2:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andreas Kemnade, linux-input, linux-kernel, Krzysztof Kozlowski,
	devicetree, Rob Herring, Dmitry Torokhov, Jeff LaBundy

On Tue, 24 May 2022 11:31:36 +0200, Krzysztof Kozlowski wrote:
> Devicetree specification expects nodes to have generic names, if
> possible, so replace custom ones with something generic.  For gpio-keys,
> the more popular format is "key-xxx" instead of "xxx-key", so choose the
> first one.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Andreas Kemnade <andreas@kemnade.info>
> ---
>  .../devicetree/bindings/input/fsl,mpr121-touchkey.yaml        | 4 ++--
>  Documentation/devicetree/bindings/input/gpio-keys.yaml        | 4 ++--
>  Documentation/devicetree/bindings/input/iqs269a.yaml          | 2 +-
>  Documentation/devicetree/bindings/input/iqs626a.yaml          | 2 +-
>  .../devicetree/bindings/input/microchip,cap11xx.yaml          | 2 +-
>  5 files changed, 7 insertions(+), 7 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH] dt-bindings: input: use generic node names
  2022-05-24  9:31 [PATCH] dt-bindings: input: use generic node names Krzysztof Kozlowski
  2022-05-24 11:11 ` Andreas Kemnade
  2022-05-26  2:20 ` Rob Herring
@ 2022-05-27 22:44 ` Jeff LaBundy
  2022-05-29 14:21   ` Krzysztof Kozlowski
  2022-05-28 20:41 ` Dmitry Torokhov
  3 siblings, 1 reply; 7+ messages in thread
From: Jeff LaBundy @ 2022-05-27 22:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, linux-input,
	devicetree, linux-kernel, Andreas Kemnade

Hi Krzysztof,

On Tue, May 24, 2022 at 11:31:36AM +0200, Krzysztof Kozlowski wrote:
> Devicetree specification expects nodes to have generic names, if
> possible, so replace custom ones with something generic.  For gpio-keys,
> the more popular format is "key-xxx" instead of "xxx-key", so choose the
> first one.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Andreas Kemnade <andreas@kemnade.info>
> ---
>  .../devicetree/bindings/input/fsl,mpr121-touchkey.yaml        | 4 ++--
>  Documentation/devicetree/bindings/input/gpio-keys.yaml        | 4 ++--
>  Documentation/devicetree/bindings/input/iqs269a.yaml          | 2 +-
>  Documentation/devicetree/bindings/input/iqs626a.yaml          | 2 +-

For iqs*a.yaml:

Acked-by: Jeff LaBundy <jeff@labundy.com>

Does there happen to be a list of preferred names based on device
function, or is it simply a matter of what seems to be most common?

>  .../devicetree/bindings/input/microchip,cap11xx.yaml          | 2 +-
>  5 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> index 878464f128dc..5139af287d3e 100644
> --- a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> +++ b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> @@ -57,7 +57,7 @@ examples:
>          #address-cells = <1>;
>          #size-cells = <0>;
>  
> -        mpr121@5a {
> +        touchkey@5a {
>              compatible = "fsl,mpr121-touchkey";
>              reg = <0x5a>;
>              interrupt-parent = <&gpio1>;
> @@ -77,7 +77,7 @@ examples:
>          #address-cells = <1>;
>          #size-cells = <0>;
>  
> -        mpr121@5a {
> +        touchkey@5a {
>              compatible = "fsl,mpr121-touchkey";
>              reg = <0x5a>;
>              poll-interval = <20>;
> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> index 7fe1966ea28a..93f601c58984 100644
> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> @@ -127,13 +127,13 @@ examples:
>          compatible = "gpio-keys";
>          autorepeat;
>  
> -        up {
> +        key-up {
>              label = "GPIO Key UP";
>              linux,code = <103>;
>              gpios = <&gpio1 0 1>;
>          };
>  
> -        down {
> +        key-down {
>              label = "GPIO Key DOWN";
>              linux,code = <108>;
>              interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
> diff --git a/Documentation/devicetree/bindings/input/iqs269a.yaml b/Documentation/devicetree/bindings/input/iqs269a.yaml
> index 9c154e5e1a91..d84d69f5455d 100644
> --- a/Documentation/devicetree/bindings/input/iqs269a.yaml
> +++ b/Documentation/devicetree/bindings/input/iqs269a.yaml
> @@ -475,7 +475,7 @@ examples:
>              #address-cells = <1>;
>              #size-cells = <0>;
>  
> -            iqs269a@44 {
> +            touch@44 {
>                      #address-cells = <1>;
>                      #size-cells = <0>;
>  
> diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml
> index 0cb736c541c9..dd727befe564 100644
> --- a/Documentation/devicetree/bindings/input/iqs626a.yaml
> +++ b/Documentation/devicetree/bindings/input/iqs626a.yaml
> @@ -751,7 +751,7 @@ examples:
>              #address-cells = <1>;
>              #size-cells = <0>;
>  
> -            iqs626a@44 {
> +            touch@44 {
>                      #address-cells = <1>;
>                      #size-cells = <0>;
>  
> diff --git a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> index d5d6bced3148..96358b12f9b2 100644
> --- a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> +++ b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> @@ -112,7 +112,7 @@ examples:
>        #address-cells = <1>;
>        #size-cells = <0>;
>  
> -      cap1188@28 {
> +      touch@28 {
>          compatible = "microchip,cap1188";
>          interrupt-parent = <&gpio1>;
>          interrupts = <0 0>;
> -- 
> 2.34.1
> 

Kind regards,
Jeff LaBundy

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

* Re: [PATCH] dt-bindings: input: use generic node names
  2022-05-24  9:31 [PATCH] dt-bindings: input: use generic node names Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2022-05-27 22:44 ` Jeff LaBundy
@ 2022-05-28 20:41 ` Dmitry Torokhov
  3 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2022-05-28 20:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Jeff LaBundy, linux-input,
	devicetree, linux-kernel, Andreas Kemnade

On Tue, May 24, 2022 at 11:31:36AM +0200, Krzysztof Kozlowski wrote:
> Devicetree specification expects nodes to have generic names, if
> possible, so replace custom ones with something generic.  For gpio-keys,
> the more popular format is "key-xxx" instead of "xxx-key", so choose the
> first one.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 

Applied, thank you.

-- 
Dmitry

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

* Re: [PATCH] dt-bindings: input: use generic node names
  2022-05-27 22:44 ` Jeff LaBundy
@ 2022-05-29 14:21   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-29 14:21 UTC (permalink / raw)
  To: Jeff LaBundy
  Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, linux-input,
	devicetree, linux-kernel, Andreas Kemnade

On 28/05/2022 00:44, Jeff LaBundy wrote:
> Hi Krzysztof,
> 
> On Tue, May 24, 2022 at 11:31:36AM +0200, Krzysztof Kozlowski wrote:
>> Devicetree specification expects nodes to have generic names, if
>> possible, so replace custom ones with something generic.  For gpio-keys,
>> the more popular format is "key-xxx" instead of "xxx-key", so choose the
>> first one.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Cc: Andreas Kemnade <andreas@kemnade.info>
>> ---
>>  .../devicetree/bindings/input/fsl,mpr121-touchkey.yaml        | 4 ++--
>>  Documentation/devicetree/bindings/input/gpio-keys.yaml        | 4 ++--
>>  Documentation/devicetree/bindings/input/iqs269a.yaml          | 2 +-
>>  Documentation/devicetree/bindings/input/iqs626a.yaml          | 2 +-
> 
> For iqs*a.yaml:
> 
> Acked-by: Jeff LaBundy <jeff@labundy.com>
> 
> Does there happen to be a list of preferred names based on device
> function, or is it simply a matter of what seems to be most common?

Devicetree spec has examples of names, but of course it does not cover
many of cases. Here I chosen mixture of device function and most common
(e.g. touch for touch controller).


Best regards,
Krzysztof

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

end of thread, other threads:[~2022-05-29 14:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24  9:31 [PATCH] dt-bindings: input: use generic node names Krzysztof Kozlowski
2022-05-24 11:11 ` Andreas Kemnade
2022-05-24 11:28   ` Krzysztof Kozlowski
2022-05-26  2:20 ` Rob Herring
2022-05-27 22:44 ` Jeff LaBundy
2022-05-29 14:21   ` Krzysztof Kozlowski
2022-05-28 20:41 ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.