2023-10-17 10:19:09

by Raymond Hackley

[permalink] [raw]
Subject: [PATCH v2 0/2] ARM: dts: samsung: exynos4412-midas: fix key-ok and use Linux event codes

Input event code 139 stands for KEY_MENU, instead of KEY_OK as node name
key-ok inplies. Fix it with correct event code 0x160.

Use event codes with linux-event-codes.h included for input keys on midas
in addition.

---
v2: Fix the event code before applying linux-event-codes.h


2023-10-17 10:21:00

by Raymond Hackley

[permalink] [raw]
Subject: [PATCH v2 2/2] ARM: dts: samsung: exynos4412-midas: use Linux event codes for input keys

Use event codes with linux-event-codes.h included for input keys on midas.

Signed-off-by: Raymond Hackley <[email protected]>
---
arch/arm/boot/dts/samsung/exynos4412-midas.dtsi | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
index 3c1ae3c19828..d00b500254ab 100644
--- a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
@@ -15,6 +15,7 @@

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/maxim,max77686.h>
#include "exynos-pinctrl.h"
@@ -137,21 +138,21 @@ gpio-keys {

key-down {
gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
- linux,code = <114>;
+ linux,code = <KEY_VOLUMEDOWN>;
label = "volume down";
debounce-interval = <10>;
};

key-up {
gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
- linux,code = <115>;
+ linux,code = <KEY_VOLUMEUP>;
label = "volume up";
debounce-interval = <10>;
};

key-power {
gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
- linux,code = <116>;
+ linux,code = <KEY_POWER>;
label = "power";
debounce-interval = <10>;
wakeup-source;
@@ -159,7 +160,7 @@ key-power {

key-ok {
gpios = <&gpx0 1 GPIO_ACTIVE_LOW>;
- linux,code = <0x160>;
+ linux,code = <KEY_OK>;
label = "ok";
debounce-interval = <10>;
wakeup-source;
--
2.39.2


2023-10-17 10:26:16

by Raymond Hackley

[permalink] [raw]
Subject: [PATCH v2 1/2] ARM: dts: samsung: exynos4412-midas: fix key-ok event code

Input event code 139 stands for KEY_MENU, instead of KEY_OK as node name
key-ok inplies. Fix it with correct event code 0x160.

Signed-off-by: Raymond Hackley <[email protected]>
---
arch/arm/boot/dts/samsung/exynos4412-midas.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
index 7daf25865551..3c1ae3c19828 100644
--- a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
@@ -159,7 +159,7 @@ key-power {

key-ok {
gpios = <&gpx0 1 GPIO_ACTIVE_LOW>;
- linux,code = <139>;
+ linux,code = <0x160>;
label = "ok";
debounce-interval = <10>;
wakeup-source;
--
2.39.2


2023-10-18 06:26:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ARM: dts: samsung: exynos4412-midas: fix key-ok and use Linux event codes


On Tue, 17 Oct 2023 10:16:37 +0000, Raymond Hackley wrote:
> Input event code 139 stands for KEY_MENU, instead of KEY_OK as node name
> key-ok inplies. Fix it with correct event code 0x160.
>
> Use event codes with linux-event-codes.h included for input keys on midas
> in addition.
>

Applied, thanks!

It is however very late in the cycle, so there is a chance this will miss the
merge window. If this happens, I will keep it for the next cycle (no need for
resending).

[1/2] ARM: dts: samsung: exynos4412-midas: fix key-ok event code
https://git.kernel.org/krzk/linux/c/25e20eedc1d63dcdf6f781588e8dbc37cd0aad16
[2/2] ARM: dts: samsung: exynos4412-midas: use Linux event codes for input keys
https://git.kernel.org/krzk/linux/c/4a48fa417abc5b86da393c93ab63a9160076a248

Best regards,
--
Krzysztof Kozlowski <[email protected]>

2023-10-23 16:51:26

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ARM: dts: samsung: exynos4412-midas: fix key-ok event code

On 17/10/2023 12:18, Raymond Hackley wrote:
> Input event code 139 stands for KEY_MENU, instead of KEY_OK as node name
> key-ok inplies. Fix it with correct event code 0x160.
>
> Signed-off-by: Raymond Hackley <[email protected]>
> ---
> arch/arm/boot/dts/samsung/exynos4412-midas.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
> index 7daf25865551..3c1ae3c19828 100644
> --- a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
> +++ b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi
> @@ -159,7 +159,7 @@ key-power {
>
> key-ok {
> gpios = <&gpx0 1 GPIO_ACTIVE_LOW>;
> - linux,code = <139>;
> + linux,code = <0x160>;

I applied this and was about to send in pull request, but it does not
seem right, sorry. The button was always called "menu" button. Why
changing it to OK? Just because of node name? The node name does not
matter, this could be called "key-1" as well..

Best regards,
Krzysztof

2023-10-24 12:38:33

by Raymond Hackley

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ARM: dts: samsung: exynos4412-midas: fix key-ok event code

Hi Krzysztof,

This key-ok is the hardware middle button on midas, and there is also
touchkey, which already provides <KEY_BACK KEY_MENU>, so I assume the other
KEY_MENU in key-ok is duplicated. Fixing it with KEY_OK as the node name
implies would make more sense.

Regards,
Raymond

2023-10-24 13:25:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ARM: dts: samsung: exynos4412-midas: fix key-ok event code

On 24/10/2023 14:37, Raymond Hackley wrote:
> Hi Krzysztof,
>
> This key-ok is the hardware middle button on midas, and there is also
> touchkey, which already provides <KEY_BACK KEY_MENU>, so I assume the other
> KEY_MENU in key-ok is duplicated. Fixing it with KEY_OK as the node name
> implies would make more sense.

Ah, ok, that makes sense.

Best regards,
Krzysztof