diff mbox series

[v2,32/48] arm64: dts: rockchip: align gpio-key node names with dtschema

Message ID 20220609114026.380682-3-krzysztof.kozlowski@linaro.org (mailing list archive)
State Superseded
Headers show
Series dt-bindings: input: gpio-keys: rework matching children | expand

Commit Message

Krzysztof Kozlowski June 9, 2022, 11:40 a.m. UTC
The node names should be generic and DT schema expects certain pattern
(e.g. with key/button/switch).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/rockchip/rk3308-evb.dts   |  2 +-
 .../boot/dts/rockchip/rk3326-odroid-go2.dts   | 32 +++++++++----------
 .../boot/dts/rockchip/rk3328-nanopi-r2s.dts   |  2 +-
 arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi  |  2 +-
 .../boot/dts/rockchip/rk3368-geekbox.dts      |  2 +-
 .../dts/rockchip/rk3368-orion-r68-meta.dts    |  2 +-
 .../boot/dts/rockchip/rk3368-px5-evb.dts      |  2 +-
 arch/arm64/boot/dts/rockchip/rk3368-r88.dts   |  2 +-
 .../boot/dts/rockchip/rk3399-firefly.dts      |  2 +-
 .../dts/rockchip/rk3399-gru-chromebook.dtsi   |  2 +-
 .../boot/dts/rockchip/rk3399-gru-kevin.dts    |  2 +-
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi |  2 +-
 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi |  2 +-
 .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   |  4 +--
 .../boot/dts/rockchip/rk3399-nanopi4.dtsi     |  2 +-
 .../boot/dts/rockchip/rk3399-orangepi.dts     |  2 +-
 .../boot/dts/rockchip/rk3399-pinebook-pro.dts |  4 +--
 .../boot/dts/rockchip/rk3399-roc-pc.dtsi      |  2 +-
 .../boot/dts/rockchip/rk3399-rockpro64.dtsi   |  2 +-
 .../boot/dts/rockchip/rk3399-sapphire.dtsi    |  2 +-
 .../boot/dts/rockchip/rk3566-pinenote.dtsi    |  2 +-
 21 files changed, 38 insertions(+), 38 deletions(-)

Comments

Maya Matuszczyk June 9, 2022, 1:57 p.m. UTC | #1
czw., 9 cze 2022 o 13:56 Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> napisał(a):
>
> The node names should be generic and DT schema expects certain pattern
> (e.g. with key/button/switch).
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  arch/arm64/boot/dts/rockchip/rk3308-evb.dts   |  2 +-
>  .../boot/dts/rockchip/rk3326-odroid-go2.dts   | 32 +++++++++----------
>  .../boot/dts/rockchip/rk3328-nanopi-r2s.dts   |  2 +-
>  arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi  |  2 +-
>  .../boot/dts/rockchip/rk3368-geekbox.dts      |  2 +-
>  .../dts/rockchip/rk3368-orion-r68-meta.dts    |  2 +-
>  .../boot/dts/rockchip/rk3368-px5-evb.dts      |  2 +-
>  arch/arm64/boot/dts/rockchip/rk3368-r88.dts   |  2 +-
>  .../boot/dts/rockchip/rk3399-firefly.dts      |  2 +-
>  .../dts/rockchip/rk3399-gru-chromebook.dtsi   |  2 +-
>  .../boot/dts/rockchip/rk3399-gru-kevin.dts    |  2 +-
>  .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi |  2 +-
>  .../boot/dts/rockchip/rk3399-khadas-edge.dtsi |  2 +-
>  .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   |  4 +--
>  .../boot/dts/rockchip/rk3399-nanopi4.dtsi     |  2 +-
>  .../boot/dts/rockchip/rk3399-orangepi.dts     |  2 +-
>  .../boot/dts/rockchip/rk3399-pinebook-pro.dts |  4 +--
>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      |  2 +-
>  .../boot/dts/rockchip/rk3399-rockpro64.dtsi   |  2 +-
>  .../boot/dts/rockchip/rk3399-sapphire.dtsi    |  2 +-
>  .../boot/dts/rockchip/rk3566-pinenote.dtsi    |  2 +-
>  21 files changed, 38 insertions(+), 38 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> index 9b4f855ea5d4..4b5413b12bfa 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> @@ -75,7 +75,7 @@ gpio-keys {
>                 pinctrl-names = "default";
>                 pinctrl-0 = <&pwr_key>;
>
> -               power {
> +               power-key {
>                         gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
>                         linux,code = <KEY_POWER>;
>                         label = "GPIO Key Power";
> diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> index ea0695b51ecd..72328dd993ee 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> @@ -71,82 +71,82 @@ gpio-keys {
>                  * |------------------------------------------------|
>                  */
>
> -               sw1 {
> +               switch-1 {
Wouldn't it make more sense to rename this and all other
renamed nodes in this dts into "button-dpad-up" or "button-1",
as on the physical device those are buttons and the naming
scheme of "sw" + number seems to be a carryover from
downstream sources.

>                         gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
>                         label = "DPAD-UP";
>                         linux,code = <BTN_DPAD_UP>;
>                 };
> -               sw2 {
> +               switch-2 {
>                         gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
>                         label = "DPAD-DOWN";
>                         linux,code = <BTN_DPAD_DOWN>;
>                 };
> -               sw3 {
> +               switch-3 {
>                         gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
>                         label = "DPAD-LEFT";
>                         linux,code = <BTN_DPAD_LEFT>;
>                 };
> -               sw4 {
> +               switch-4 {
>                         gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
>                         label = "DPAD-RIGHT";
>                         linux,code = <BTN_DPAD_RIGHT>;
>                 };
> -               sw5 {
> +               switch-5 {
>                         gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
>                         label = "BTN-A";
>                         linux,code = <BTN_EAST>;
>                 };
> -               sw6 {
> +               switch-6 {
>                         gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
>                         label = "BTN-B";
>                         linux,code = <BTN_SOUTH>;
>                 };
> -               sw7 {
> +               switch-7 {
>                         gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
>                         label = "BTN-Y";
>                         linux,code = <BTN_WEST>;
>                 };
> -               sw8 {
> +               switch-8 {
>                         gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
>                         label = "BTN-X";
>                         linux,code = <BTN_NORTH>;
>                 };
> -               sw9 {
> +               switch-9 {
>                         gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
>                         label = "F1";
>                         linux,code = <BTN_TRIGGER_HAPPY1>;
>                 };
> -               sw10 {
> +               switch-10 {
>                         gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
>                         label = "F2";
>                         linux,code = <BTN_TRIGGER_HAPPY2>;
>                 };
> -               sw11 {
> +               switch-11 {
>                         gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
>                         label = "F3";
>                         linux,code = <BTN_TRIGGER_HAPPY3>;
>                 };
> -               sw12 {
> +               switch-12 {
>                         gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
>                         label = "F4";
>                         linux,code = <BTN_TRIGGER_HAPPY4>;
>                 };
> -               sw13 {
> +               switch-13 {
>                         gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
>                         label = "F5";
>                         linux,code = <BTN_TRIGGER_HAPPY5>;
>                 };
> -               sw14 {
> +               switch-14 {
>                         gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
>                         label = "F6";
>                         linux,code = <BTN_TRIGGER_HAPPY6>;
>                 };
> -               sw15 {
> +               switch-15 {
>                         gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
>                         label = "TOP-LEFT";
>                         linux,code = <BTN_TL>;
>                 };
> -               sw16 {
> +               switch-16 {
>                         gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
>                         label = "TOP-RIGHT";
>                         linux,code = <BTN_TR>;
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
> index 3857d487ab84..1445b879ac7a 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
> @@ -34,7 +34,7 @@ keys {
>                 pinctrl-0 = <&reset_button_pin>;
>                 pinctrl-names = "default";
>
> -               reset {
> +               key-reset {
>                         label = "reset";
>                         gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
>                         linux,code = <KEY_RESTART>;

[snip]
Krzysztof Kozlowski June 9, 2022, 2:15 p.m. UTC | #2
On 09/06/2022 15:57, Maya Matuszczyk wrote:
> czw., 9 cze 2022 o 13:56 Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> napisał(a):
>>
>> The node names should be generic and DT schema expects certain pattern
>> (e.g. with key/button/switch).
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  arch/arm64/boot/dts/rockchip/rk3308-evb.dts   |  2 +-
>>  .../boot/dts/rockchip/rk3326-odroid-go2.dts   | 32 +++++++++----------
>>  .../boot/dts/rockchip/rk3328-nanopi-r2s.dts   |  2 +-
>>  arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi  |  2 +-
>>  .../boot/dts/rockchip/rk3368-geekbox.dts      |  2 +-
>>  .../dts/rockchip/rk3368-orion-r68-meta.dts    |  2 +-
>>  .../boot/dts/rockchip/rk3368-px5-evb.dts      |  2 +-
>>  arch/arm64/boot/dts/rockchip/rk3368-r88.dts   |  2 +-
>>  .../boot/dts/rockchip/rk3399-firefly.dts      |  2 +-
>>  .../dts/rockchip/rk3399-gru-chromebook.dtsi   |  2 +-
>>  .../boot/dts/rockchip/rk3399-gru-kevin.dts    |  2 +-
>>  .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi |  2 +-
>>  .../boot/dts/rockchip/rk3399-khadas-edge.dtsi |  2 +-
>>  .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   |  4 +--
>>  .../boot/dts/rockchip/rk3399-nanopi4.dtsi     |  2 +-
>>  .../boot/dts/rockchip/rk3399-orangepi.dts     |  2 +-
>>  .../boot/dts/rockchip/rk3399-pinebook-pro.dts |  4 +--
>>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      |  2 +-
>>  .../boot/dts/rockchip/rk3399-rockpro64.dtsi   |  2 +-
>>  .../boot/dts/rockchip/rk3399-sapphire.dtsi    |  2 +-
>>  .../boot/dts/rockchip/rk3566-pinenote.dtsi    |  2 +-
>>  21 files changed, 38 insertions(+), 38 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
>> index 9b4f855ea5d4..4b5413b12bfa 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
>> @@ -75,7 +75,7 @@ gpio-keys {
>>                 pinctrl-names = "default";
>>                 pinctrl-0 = <&pwr_key>;
>>
>> -               power {
>> +               power-key {
>>                         gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
>>                         linux,code = <KEY_POWER>;
>>                         label = "GPIO Key Power";
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
>> index ea0695b51ecd..72328dd993ee 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
>> @@ -71,82 +71,82 @@ gpio-keys {
>>                  * |------------------------------------------------|
>>                  */
>>
>> -               sw1 {
>> +               switch-1 {
> Wouldn't it make more sense to rename this and all other
> renamed nodes in this dts into "button-dpad-up" or "button-1",
> as on the physical device those are buttons and the naming
> scheme of "sw" + number seems to be a carryover from
> downstream sources.

Can be buttons. I assumed SW comes from some kind of switch.
I assume you mean only this Odroid Go2 DTS, because some other DTSes
(like EVB above) explicitly call it "Key Power".


Best regards,
Krzysztof
Heiko Stuebner June 9, 2022, 2:56 p.m. UTC | #3
Am Donnerstag, 9. Juni 2022, 16:15:25 CEST schrieb Krzysztof Kozlowski:
> On 09/06/2022 15:57, Maya Matuszczyk wrote:
> > czw., 9 cze 2022 o 13:56 Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> napisał(a):
> >>
> >> The node names should be generic and DT schema expects certain pattern
> >> (e.g. with key/button/switch).
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> ---
> >>  arch/arm64/boot/dts/rockchip/rk3308-evb.dts   |  2 +-
> >>  .../boot/dts/rockchip/rk3326-odroid-go2.dts   | 32 +++++++++----------
> >>  .../boot/dts/rockchip/rk3328-nanopi-r2s.dts   |  2 +-
> >>  arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi  |  2 +-
> >>  .../boot/dts/rockchip/rk3368-geekbox.dts      |  2 +-
> >>  .../dts/rockchip/rk3368-orion-r68-meta.dts    |  2 +-
> >>  .../boot/dts/rockchip/rk3368-px5-evb.dts      |  2 +-
> >>  arch/arm64/boot/dts/rockchip/rk3368-r88.dts   |  2 +-
> >>  .../boot/dts/rockchip/rk3399-firefly.dts      |  2 +-
> >>  .../dts/rockchip/rk3399-gru-chromebook.dtsi   |  2 +-
> >>  .../boot/dts/rockchip/rk3399-gru-kevin.dts    |  2 +-
> >>  .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi |  2 +-
> >>  .../boot/dts/rockchip/rk3399-khadas-edge.dtsi |  2 +-
> >>  .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   |  4 +--
> >>  .../boot/dts/rockchip/rk3399-nanopi4.dtsi     |  2 +-
> >>  .../boot/dts/rockchip/rk3399-orangepi.dts     |  2 +-
> >>  .../boot/dts/rockchip/rk3399-pinebook-pro.dts |  4 +--
> >>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      |  2 +-
> >>  .../boot/dts/rockchip/rk3399-rockpro64.dtsi   |  2 +-
> >>  .../boot/dts/rockchip/rk3399-sapphire.dtsi    |  2 +-
> >>  .../boot/dts/rockchip/rk3566-pinenote.dtsi    |  2 +-
> >>  21 files changed, 38 insertions(+), 38 deletions(-)
> >>
> >> diff --git a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> >> index 9b4f855ea5d4..4b5413b12bfa 100644
> >> --- a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> >> +++ b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> >> @@ -75,7 +75,7 @@ gpio-keys {
> >>                 pinctrl-names = "default";
> >>                 pinctrl-0 = <&pwr_key>;
> >>
> >> -               power {
> >> +               power-key {

hmm, it looks like all the others below are named key-power, while
only this uses power-key ?


> >>                         gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
> >>                         linux,code = <KEY_POWER>;
> >>                         label = "GPIO Key Power";
> >> diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> >> index ea0695b51ecd..72328dd993ee 100644
> >> --- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> >> +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> >> @@ -71,82 +71,82 @@ gpio-keys {
> >>                  * |------------------------------------------------|
> >>                  */
> >>
> >> -               sw1 {
> >> +               switch-1 {
> > Wouldn't it make more sense to rename this and all other
> > renamed nodes in this dts into "button-dpad-up" or "button-1",
> > as on the physical device those are buttons and the naming
> > scheme of "sw" + number seems to be a carryover from
> > downstream sources.

The naming actually carries over from the device itself.
In the schematics the relevant keys are also named sw1, sw2, etc.

And I do believe it is way nicer when devicetree names correspond to the
things you find in device schematics and not be named "arbitarily" to
only conform to some schema ;-)

So personally I'd actually prefer going with switch-sw1 (or button-sw1 if
you prefer) as being able to just use the search function in schematic pdfs
is a helpful tool.


Heiko

> Can be buttons. I assumed SW comes from some kind of switch.
> I assume you mean only this Odroid Go2 DTS, because some other DTSes
> (like EVB above) explicitly call it "Key Power".
> 
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski June 9, 2022, 3:05 p.m. UTC | #4
On 09/06/2022 16:56, Heiko Stübner wrote:
> Am Donnerstag, 9. Juni 2022, 16:15:25 CEST schrieb Krzysztof Kozlowski:
>> On 09/06/2022 15:57, Maya Matuszczyk wrote:
>>> czw., 9 cze 2022 o 13:56 Krzysztof Kozlowski
>>> <krzysztof.kozlowski@linaro.org> napisał(a):
>>>>
>>>> The node names should be generic and DT schema expects certain pattern
>>>> (e.g. with key/button/switch).
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>> ---
>>>>  arch/arm64/boot/dts/rockchip/rk3308-evb.dts   |  2 +-
>>>>  .../boot/dts/rockchip/rk3326-odroid-go2.dts   | 32 +++++++++----------
>>>>  .../boot/dts/rockchip/rk3328-nanopi-r2s.dts   |  2 +-
>>>>  arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi  |  2 +-
>>>>  .../boot/dts/rockchip/rk3368-geekbox.dts      |  2 +-
>>>>  .../dts/rockchip/rk3368-orion-r68-meta.dts    |  2 +-
>>>>  .../boot/dts/rockchip/rk3368-px5-evb.dts      |  2 +-
>>>>  arch/arm64/boot/dts/rockchip/rk3368-r88.dts   |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-firefly.dts      |  2 +-
>>>>  .../dts/rockchip/rk3399-gru-chromebook.dtsi   |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-gru-kevin.dts    |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-khadas-edge.dtsi |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   |  4 +--
>>>>  .../boot/dts/rockchip/rk3399-nanopi4.dtsi     |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-orangepi.dts     |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-pinebook-pro.dts |  4 +--
>>>>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-rockpro64.dtsi   |  2 +-
>>>>  .../boot/dts/rockchip/rk3399-sapphire.dtsi    |  2 +-
>>>>  .../boot/dts/rockchip/rk3566-pinenote.dtsi    |  2 +-
>>>>  21 files changed, 38 insertions(+), 38 deletions(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
>>>> index 9b4f855ea5d4..4b5413b12bfa 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
>>>> @@ -75,7 +75,7 @@ gpio-keys {
>>>>                 pinctrl-names = "default";
>>>>                 pinctrl-0 = <&pwr_key>;
>>>>
>>>> -               power {
>>>> +               power-key {
> 
> hmm, it looks like all the others below are named key-power, while
> only this uses power-key ?
> 

Because a bit earlier in DTS, there are two adc-keys nodes with "key"
suffix, so I kept that approach to be consistent within one DTS. If you
prefer, I can change it to key-power.

> 
>>>>                         gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
>>>>                         linux,code = <KEY_POWER>;
>>>>                         label = "GPIO Key Power";
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
>>>> index ea0695b51ecd..72328dd993ee 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
>>>> @@ -71,82 +71,82 @@ gpio-keys {
>>>>                  * |------------------------------------------------|
>>>>                  */
>>>>
>>>> -               sw1 {
>>>> +               switch-1 {
>>> Wouldn't it make more sense to rename this and all other
>>> renamed nodes in this dts into "button-dpad-up" or "button-1",
>>> as on the physical device those are buttons and the naming
>>> scheme of "sw" + number seems to be a carryover from
>>> downstream sources.
> 
> The naming actually carries over from the device itself.
> In the schematics the relevant keys are also named sw1, sw2, etc.
> 
> And I do believe it is way nicer when devicetree names correspond to the
> things you find in device schematics and not be named "arbitarily" to
> only conform to some schema ;-)

Then you are entirely depending on hardware engineers which might start
calling their buttons "cute-pony-xxx" :)

> 
> So personally I'd actually prefer going with switch-sw1 (or button-sw1 if
> you prefer) as being able to just use the search function in schematic pdfs
> is a helpful tool.

Both are fine with me, let's just pick one - switch-sw1 or button-sw1.
Since these are physically buttons, I propose the latter.


Best regards,
Krzysztof
Heiko Stuebner June 9, 2022, 3:55 p.m. UTC | #5
Am Donnerstag, 9. Juni 2022, 17:05:49 CEST schrieb Krzysztof Kozlowski:
> On 09/06/2022 16:56, Heiko Stübner wrote:
> > Am Donnerstag, 9. Juni 2022, 16:15:25 CEST schrieb Krzysztof Kozlowski:
> >> On 09/06/2022 15:57, Maya Matuszczyk wrote:
> >>> czw., 9 cze 2022 o 13:56 Krzysztof Kozlowski
> >>> <krzysztof.kozlowski@linaro.org> napisał(a):
> >>>>
> >>>> The node names should be generic and DT schema expects certain pattern
> >>>> (e.g. with key/button/switch).
> >>>>
> >>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>>> ---
> >>>>  arch/arm64/boot/dts/rockchip/rk3308-evb.dts   |  2 +-
> >>>>  .../boot/dts/rockchip/rk3326-odroid-go2.dts   | 32 +++++++++----------
> >>>>  .../boot/dts/rockchip/rk3328-nanopi-r2s.dts   |  2 +-
> >>>>  arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi  |  2 +-
> >>>>  .../boot/dts/rockchip/rk3368-geekbox.dts      |  2 +-
> >>>>  .../dts/rockchip/rk3368-orion-r68-meta.dts    |  2 +-
> >>>>  .../boot/dts/rockchip/rk3368-px5-evb.dts      |  2 +-
> >>>>  arch/arm64/boot/dts/rockchip/rk3368-r88.dts   |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-firefly.dts      |  2 +-
> >>>>  .../dts/rockchip/rk3399-gru-chromebook.dtsi   |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-gru-kevin.dts    |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-khadas-edge.dtsi |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   |  4 +--
> >>>>  .../boot/dts/rockchip/rk3399-nanopi4.dtsi     |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-orangepi.dts     |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-pinebook-pro.dts |  4 +--
> >>>>  .../boot/dts/rockchip/rk3399-roc-pc.dtsi      |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-rockpro64.dtsi   |  2 +-
> >>>>  .../boot/dts/rockchip/rk3399-sapphire.dtsi    |  2 +-
> >>>>  .../boot/dts/rockchip/rk3566-pinenote.dtsi    |  2 +-
> >>>>  21 files changed, 38 insertions(+), 38 deletions(-)
> >>>>
> >>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> >>>> index 9b4f855ea5d4..4b5413b12bfa 100644
> >>>> --- a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> >>>> +++ b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
> >>>> @@ -75,7 +75,7 @@ gpio-keys {
> >>>>                 pinctrl-names = "default";
> >>>>                 pinctrl-0 = <&pwr_key>;
> >>>>
> >>>> -               power {
> >>>> +               power-key {
> > 
> > hmm, it looks like all the others below are named key-power, while
> > only this uses power-key ?
> > 
> 
> Because a bit earlier in DTS, there are two adc-keys nodes with "key"
> suffix, so I kept that approach to be consistent within one DTS. If you
> prefer, I can change it to key-power.

I just saw that discrepancy and was not sure if that was intentional.
Although with the below, I guess it makes sense to go with
$type-$name, aka key-power, same as button-sw1 etc.


> >>>>                         gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
> >>>>                         linux,code = <KEY_POWER>;
> >>>>                         label = "GPIO Key Power";
> >>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> >>>> index ea0695b51ecd..72328dd993ee 100644
> >>>> --- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> >>>> +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
> >>>> @@ -71,82 +71,82 @@ gpio-keys {
> >>>>                  * |------------------------------------------------|
> >>>>                  */
> >>>>
> >>>> -               sw1 {
> >>>> +               switch-1 {
> >>> Wouldn't it make more sense to rename this and all other
> >>> renamed nodes in this dts into "button-dpad-up" or "button-1",
> >>> as on the physical device those are buttons and the naming
> >>> scheme of "sw" + number seems to be a carryover from
> >>> downstream sources.
> > 
> > The naming actually carries over from the device itself.
> > In the schematics the relevant keys are also named sw1, sw2, etc.
> > 
> > And I do believe it is way nicer when devicetree names correspond to the
> > things you find in device schematics and not be named "arbitarily" to
> > only conform to some schema ;-)
> 
> Then you are entirely depending on hardware engineers which might start
> calling their buttons "cute-pony-xxx" :)

What's wrong with cute-ponies?
Though it should be button-cute-pony-xxx then ;-)


> > So personally I'd actually prefer going with switch-sw1 (or button-sw1 if
> > you prefer) as being able to just use the search function in schematic pdfs
> > is a helpful tool.
> 
> Both are fine with me, let's just pick one - switch-sw1 or button-sw1.
> Since these are physically buttons, I propose the latter.

fine by me, button-sw1, etc it is then :-)

Heiko
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
index 9b4f855ea5d4..4b5413b12bfa 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3308-evb.dts
@@ -75,7 +75,7 @@  gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwr_key>;
 
-		power {
+		power-key {
 			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_POWER>;
 			label = "GPIO Key Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
index ea0695b51ecd..72328dd993ee 100644
--- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
@@ -71,82 +71,82 @@  gpio-keys {
 		 * |------------------------------------------------|
 		 */
 
-		sw1 {
+		switch-1 {
 			gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
 			label = "DPAD-UP";
 			linux,code = <BTN_DPAD_UP>;
 		};
-		sw2 {
+		switch-2 {
 			gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
 			label = "DPAD-DOWN";
 			linux,code = <BTN_DPAD_DOWN>;
 		};
-		sw3 {
+		switch-3 {
 			gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
 			label = "DPAD-LEFT";
 			linux,code = <BTN_DPAD_LEFT>;
 		};
-		sw4 {
+		switch-4 {
 			gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
 			label = "DPAD-RIGHT";
 			linux,code = <BTN_DPAD_RIGHT>;
 		};
-		sw5 {
+		switch-5 {
 			gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
 			label = "BTN-A";
 			linux,code = <BTN_EAST>;
 		};
-		sw6 {
+		switch-6 {
 			gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "BTN-B";
 			linux,code = <BTN_SOUTH>;
 		};
-		sw7 {
+		switch-7 {
 			gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
 			label = "BTN-Y";
 			linux,code = <BTN_WEST>;
 		};
-		sw8 {
+		switch-8 {
 			gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
 			label = "BTN-X";
 			linux,code = <BTN_NORTH>;
 		};
-		sw9 {
+		switch-9 {
 			gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
 			label = "F1";
 			linux,code = <BTN_TRIGGER_HAPPY1>;
 		};
-		sw10 {
+		switch-10 {
 			gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
 			label = "F2";
 			linux,code = <BTN_TRIGGER_HAPPY2>;
 		};
-		sw11 {
+		switch-11 {
 			gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
 			label = "F3";
 			linux,code = <BTN_TRIGGER_HAPPY3>;
 		};
-		sw12 {
+		switch-12 {
 			gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
 			label = "F4";
 			linux,code = <BTN_TRIGGER_HAPPY4>;
 		};
-		sw13 {
+		switch-13 {
 			gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
 			label = "F5";
 			linux,code = <BTN_TRIGGER_HAPPY5>;
 		};
-		sw14 {
+		switch-14 {
 			gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "F6";
 			linux,code = <BTN_TRIGGER_HAPPY6>;
 		};
-		sw15 {
+		switch-15 {
 			gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
 			label = "TOP-LEFT";
 			linux,code = <BTN_TL>;
 		};
-		sw16 {
+		switch-16 {
 			gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
 			label = "TOP-RIGHT";
 			linux,code = <BTN_TR>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
index 3857d487ab84..1445b879ac7a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
@@ -34,7 +34,7 @@  keys {
 		pinctrl-0 = <&reset_button_pin>;
 		pinctrl-names = "default";
 
-		reset {
+		key-reset {
 			label = "reset";
 			gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi b/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
index 15d1fc541c38..083452c67711 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
@@ -76,7 +76,7 @@  keys: gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwr_key>;
 
-		power {
+		key-power {
 			wakeup-source;
 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
 			label = "GPIO Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
index 62aa97a0b8c9..be06e6e64d18 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
@@ -43,7 +43,7 @@  keys: gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwr_key>;
 
-		power {
+		key-power {
 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
 			label = "GPIO Power";
 			linux,code = <KEY_POWER>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
index 3ebe15e03cf4..f4c60623c905 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
@@ -44,7 +44,7 @@  keys: gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwr_key>;
 
-		power {
+		key-power {
 			wakeup-source;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
 			label = "GPIO Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
index 5ccaa5f7a370..29df84b81552 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
@@ -30,7 +30,7 @@  keys: gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwr_key>;
 
-		power {
+		key-power {
 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
 			label = "GPIO Power";
 			linux,code = <KEY_POWER>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
index 959d3cc801f2..38d757c00548 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
@@ -37,7 +37,7 @@  keys: gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwr_key>;
 
-		power {
+		key-power {
 			wakeup-source;
 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
 			label = "GPIO Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index b340c9e246c4..c5db64f3e124 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -87,7 +87,7 @@  gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwrbtn>;
 
-		power {
+		key-power {
 			debounce-interval = <100>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "GPIO Key Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
index 50d459ee4831..cd074641884b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
@@ -206,7 +206,7 @@  gpio_keys: gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_l>;
 
-		wake_on_bt: wake-on-bt {
+		wake_on_bt: key-wake-on-bt {
 			label = "Wake-on-Bluetooth";
 			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_WAKEUP>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
index 6863689df06f..2cc9b3386c16 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
@@ -92,7 +92,7 @@  &gpio_keys {
 	pinctrl-names = "default";
 	pinctrl-0 = <&bt_host_wake_l>, <&cpu1_pen_eject>;
 
-	pen-insert {
+	switch-pen-insert {
 		label = "Pen Insert";
 		/* Insert = low, eject = high */
 		gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
index 913d845eb51a..0dadac51daa6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
@@ -183,7 +183,7 @@  gpio_keys: gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pen_eject_odl>;
 
-		pen-insert {
+		switch-pen-insert {
 			label = "Pen Insert";
 			/* Insert = low, eject = high */
 			gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
index 46c4581deb8d..2a332763c35c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
@@ -136,7 +136,7 @@  gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwrbtn>;
 
-		power {
+		key-power {
 			debounce-interval = <100>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "GPIO Key Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
index cef4d18b599d..fe5b52610010 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
@@ -46,9 +46,9 @@  wan_led: led-wan {
 	gpio-keys {
 		pinctrl-0 = <&reset_button_pin>;
 
-		/delete-node/ power;
+		/delete-node/ key-power;
 
-		reset {
+		key-reset {
 			debounce-interval = <50>;
 			gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
 			label = "reset";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
index 248ad41a976b..278123b4f911 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
@@ -111,7 +111,7 @@  gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&power_key>;
 
-		power {
+		key-power {
 			debounce-interval = <100>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "GPIO Key Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
index ed856bfcfc33..9e2e246e0bab 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
@@ -78,7 +78,7 @@  keys: gpio-keys {
 		compatible = "gpio-keys";
 		autorepeat;
 
-		power {
+		key-power {
 			debounce-interval = <100>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "GPIO Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
index d6b68d77d63a..194e48c755f6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
@@ -76,7 +76,7 @@  gpio-key-lid {
 		pinctrl-names = "default";
 		pinctrl-0 = <&lidbtn_pin>;
 
-		lid {
+		switch-lid {
 			debounce-interval = <20>;
 			gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>;
 			label = "Lid";
@@ -92,7 +92,7 @@  gpio-key-power {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwrbtn_pin>;
 
-		power {
+		key-power {
 			debounce-interval = <20>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
index 0e45cc2d195b..acb174d3a8c5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
@@ -54,7 +54,7 @@  gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwr_key_l>;
 
-		power {
+		key-power {
 			debounce-interval = <100>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "GPIO Key Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
index 6fdeee7d5f6d..78157521e944 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
@@ -42,7 +42,7 @@  gpio-keys {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pwrbtn>;
 
-		power {
+		key-power {
 			debounce-interval = <100>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "GPIO Key Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index 2aa0fad8f893..e6ac292ce645 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -53,7 +53,7 @@  keys: gpio-keys {
 		compatible = "gpio-keys";
 		autorepeat;
 
-		power {
+		key-power {
 			debounce-interval = <100>;
 			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 			label = "GPIO Power";
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
index e01668e6e5f9..ea0fa627c464 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
@@ -49,7 +49,7 @@  gpio-keys {
 		pinctrl-0 = <&hall_int_l>;
 		pinctrl-names = "default";
 
-		cover {
+		switch {
 			label = "cover";
 			gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>;
 			linux,input-type = <EV_SW>;