]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: rockchip: Fix voltage threshold for volume keys for Pinephone Pro
authorOndrej Jirman <megi@xff.cz>
Tue, 25 Nov 2025 03:47:03 +0000 (19:47 -0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 15 Dec 2025 11:42:51 +0000 (12:42 +0100)
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

Fixes: d3150ed53580 ("arm64: dts: rockchip: Add support for volume keys to rk3399-pinephone-pro")
Cc: stable@vger.kernel.org
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Link: https://patch.msgid.link/20251124-ppp_light_accel_mag_vol-down-v5-4-f9a10a0a50eb@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts

index 2dca1dca20b8ba3daa2779a57441c69891f208ed..5de964d369b09a768dd9a5a541ed89299afd98a7 100644 (file)
                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>;
                };
        };