[PATCH v2 44/48] ARM: dts: at91: align gpio-key node names with dtschema

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Fri Jun 10 03:05:52 PDT 2022


On 10/06/2022 09:12, Claudiu.Beznea at microchip.com wrote:

>>                 compatible = "gpio-keys";
>>                 pinctrl-names = "default";
>>                 pinctrl-0 = <&pinctrl_key_gpio_default>;
>>                 status = "okay";
>>
>> -               sw1 {
>> +               switch-1 {
> 
> This is acutally a button labeled on board as SW1. It has been wrongly
> carried over from older DTSes. Maybe it would worth to have it now here as
> button instead of switch.

Sure, I'll name it "button-1". Could be also "button-sw1" if ou prefer.

> 
>>                         label = "SW1";
>>                         gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
>>                         linux,code=<KEY_PROG1>;
>> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
>> index 08f0d4b995ff..96c9290007a8 100644
>> --- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
>> +++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
>> @@ -478,13 +478,13 @@ can1: can at fc050000 {
>>                 };
>>         };
>>
>> -       gpio_keys {
>> +       gpio-keys {
>>                 compatible = "gpio-keys";
>>
>>                 pinctrl-names = "default";
>>                 pinctrl-0 = <&pinctrl_key_gpio_default>;
>>
>> -               pb4 {
>> +               button {
>>                         label = "USER";
>>                         gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>;
>>                         linux,code = <KEY_PROG1>;
>> diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts
>> index 5e8755f22784..d5652c974748 100644
>> --- a/arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts
>> +++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts
>> @@ -26,14 +26,14 @@ chosen {
>>                 stdout-path = "serial0:115200n8";
>>         };
>>
>> -       gpio_keys {
>> +       gpio-keys {
>>                 compatible = "gpio-keys";
>>
>>                 pinctrl-names = "default";
>>                 pinctrl-0 = <&pinctrl_key_gpio_default>;
>>                 status = "okay";
>>
>> -               sw4 {
>> +               switch-4 {
> 
> Same here, this is a button not a switch.

Sure, then button-1 or button-sw4

> 
>>                         label = "USER BUTTON";
>>                         gpios = <&pioA PIN_PB2 GPIO_ACTIVE_LOW>;
>>                         linux,code = <KEY_PROG1>;
>> diff --git a/arch/arm/boot/dts/at91-sama5d2_icp.dts b/arch/arm/boot/dts/at91-sama5d2_icp.dts
>> index 806eb1d911d7..d7b59e16a081 100644
>> --- a/arch/arm/boot/dts/at91-sama5d2_icp.dts
>> +++ b/arch/arm/boot/dts/at91-sama5d2_icp.dts
>> @@ -42,14 +42,14 @@ main_xtal {
>>                 };
>>         };
>>
>> -       gpio_keys {
>> +       gpio-keys {
>>                 compatible = "gpio-keys";
>>
>>                 pinctrl-names = "default";
>>                 pinctrl-0 = <&pinctrl_key_gpio_default>;
>>                 status = "okay";
>>
>> -               sw4 {
>> +               switch-4 {
> 
> Same here, button not switch.
> 
> Other than this, looks good to me.

Thanks for checking


Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list