From: Ondrej Jirman <[email protected]>

Previously sometimes pressing the volume-down button would register as
a volume-up button. Match the thresholds as shown in the Pinephone Pro
schematic.

Tests:

~ $ evtest
    // Mashed the volume down ~100 times with varying intensity
    Event: time xxx, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
    Event: time xxx, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
    // Mashed the volume up ~100 times with varying intensity
    Event: time xxx, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
    Event: time xxx, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0

Signed-off-by: Ondrej Jirman <[email protected]>
Signed-off-by: Rudraksha Gupta <[email protected]>
Reviewed-by: Pavel Machek <[email protected]>
---
 arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts 
b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index 03721d71766c..5de08a155d10 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -40,13 +40,13 @@ adc-keys {
                button-up {
                        label = "Volume Up";
                        linux,code = <KEY_VOLUMEUP>;
-                       press-threshold-microvolt = <100000>;
+                       press-threshold-microvolt = <2000>;
                };
 
                button-down {
                        label = "Volume Down";
                        linux,code = <KEY_VOLUMEDOWN>;
-                       press-threshold-microvolt = <600000>;
+                       press-threshold-microvolt = <300000>;
                };
        };
 

-- 
2.52.0



Reply via email to