diff mbox series

[12/18] arm64: dts: renesas: beacon: Better describe keys

Message ID 20201213183759.223246-13-aford173@gmail.com
State Accepted
Commit e718d563750db293e84f826be9e7ab49d8e4b97e
Headers show
Series arm64: dts: renesas: Cleanup Beacon Kit and support more SoC's | expand

Commit Message

Adam Ford Dec. 13, 2020, 6:37 p.m. UTC
The keys on the baseboard are laid out in an diamond pattern, up, down,
left, right and center.  Update the descriptions to make it easier to
read.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 .../dts/renesas/beacon-renesom-baseboard.dtsi | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Geert Uytterhoeven Dec. 17, 2020, 11:31 a.m. UTC | #1
Hi Adam,

On Sun, Dec 13, 2020 at 7:38 PM Adam Ford <aford173@gmail.com> wrote:
> The keys on the baseboard are laid out in an diamond pattern, up, down,

> left, right and center.  Update the descriptions to make it easier to

> read.

>

> Signed-off-by: Adam Ford <aford173@gmail.com>


Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi

> +++ b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi

> @@ -40,38 +40,38 @@ hdmi0_con: endpoint {

>         keys {

>                 compatible = "gpio-keys";

>

> -               key-1 {

> +               key-1 { /* S19 */

>                         gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;

>                         linux,code = <KEY_1>;

> -                       label = "Switch-1";

> +                       label = "Up";

>                         wakeup-source;

>                         debounce-interval = <20>;

>                 };

> -               key-2 {

> +               key-2 { /*S20 */

>                         gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;

>                         linux,code = <KEY_2>;

> -                       label = "Switch-2";

> +                       label = "Left";

>                         wakeup-source;

>                         debounce-interval = <20>;

>                 };

> -               key-3 {

> +               key-3 { /* S21 */

>                         gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;

>                         linux,code = <KEY_3>;

> -                       label = "Switch-3";

> +                       label = "Down";

>                         wakeup-source;

>                         debounce-interval = <20>;

>                 };

> -               key-4 {

> +               key-4 { /* S22 */

>                         gpios = <&gpio5 20 GPIO_ACTIVE_LOW>;

>                         linux,code = <KEY_4>;

> -                       label = "Switch-4";

> +                       label = "Right";

>                         wakeup-source;

>                         debounce-interval = <20>;

>                 };

> -               key-5 {

> +               key-5 { /* S23 */

>                         gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;

>                         linux,code = <KEY_5>;

> -                       label = "Switch-4";

> +                       label = "Center";

>                         wakeup-source;

>                         debounce-interval = <20>;

>                 };


Wouldn't it make sense for the linux,code properties to reflect this, and thus
change them to KEY_{UP,LEFT,DOWN,RIGHT,ENTER} (or SELECT, or OK)?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
index beaea6de547b..db3ef33faac5 100644
--- a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
+++ b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
@@ -40,38 +40,38 @@  hdmi0_con: endpoint {
 	keys {
 		compatible = "gpio-keys";
 
-		key-1 {
+		key-1 { /* S19 */
 			gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_1>;
-			label = "Switch-1";
+			label = "Up";
 			wakeup-source;
 			debounce-interval = <20>;
 		};
-		key-2 {
+		key-2 { /*S20 */
 			gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_2>;
-			label = "Switch-2";
+			label = "Left";
 			wakeup-source;
 			debounce-interval = <20>;
 		};
-		key-3 {
+		key-3 { /* S21 */
 			gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_3>;
-			label = "Switch-3";
+			label = "Down";
 			wakeup-source;
 			debounce-interval = <20>;
 		};
-		key-4 {
+		key-4 { /* S22 */
 			gpios = <&gpio5 20 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_4>;
-			label = "Switch-4";
+			label = "Right";
 			wakeup-source;
 			debounce-interval = <20>;
 		};
-		key-5 {
+		key-5 { /* S23 */
 			gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_5>;
-			label = "Switch-4";
+			label = "Center";
 			wakeup-source;
 			debounce-interval = <20>;
 		};