msm8916-mainline/lk2nd

Keys are working backwards

Opened this issue · 2 comments

Hello. I boot the image from fastboot mode, there is no problem, but after booting, I cannot start the process. I'm stuck on the start screen. When I press the volume up button it changes options. When I press the power button, it changes the option, but when I press the volume down button, it does not respond at all. Normally it should start when I press the power button. Can you fix the problem? Phone with MSM8939 chipset. Its brand is Vestel Venus v3 5570.

Hi! This device probably have non-standard keys pins and it was never added to lk2nd, so lk2nd doesn't know how to handle it.
You will need to add a node for your device with the keys correctly defined, similar to this:

c50 {
model = "LG Leon LTE";
compatible = "lg,c50";
lk2nd,match-cmdline = "* model.name=LG-H34*";
lk2nd,dtb-files = "msm8916-lg-c50";
gpio-keys {
compatible = "gpio-keys";
vol-down {
lk2nd,code = <KEY_VOLUMEDOWN>;
gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
vol-up {
lk2nd,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};

Note that gpio number values are device-specific, you may need to check downstream devicetree to find the correct ones.

You can find lk2nd specific dts documentation here: https://github.com/msm8916-mainline/lk2nd/blob/main/Documentation/dt-bindings.md

Consider joining #msm8916-mainline:matrix.org for helps with porting.