AnsweredAssumed Answered

iMX6Q kpp matrix keyboard driver not work -help

Question asked by piyush ashtikar on Dec 16, 2016
Latest reply on Dec 16, 2016 by piyush ashtikar
We are working on custom iMX6Q board and have interfaced 4 x 4 Matrix keyboard.


I am using fsl-community-bsp daisy branch.


I tested if hardware is correct by making all pins gpio, it works well.
Now, I need to use kpp driver, which does not work.
My device tree entry looks like this
        compatible = "fsl,imx6q-kpp", "fsl,imx21-kpp";
        reg = <0x020b8000 0x4000>;
        interrupts = <0 82 0x04>;
        clocks = <&clks 62>;
        pinctrl-0 = <&pinctrl_kpp_2>;
        linux,keymap = <
                0x01010032      /*  KEY_M*/
                0x01020014      /*  KEY_T */
                0x0100001F      /*  KEY_S */
                0x01050012      /*  KEY_E */
        keypad,num-rows = <4>;
        keypad,num-columns = <4>;




    kpp {
        pinctrl_kpp_2: kpp_grp_2 {
            fsl,pins = <
                MX6QDL_PAD_KEY_ROW0__KEY_ROW0       0x1b010
                MX6QDL_PAD_KEY_ROW1__KEY_ROW1      0x1b010
                MX6QDL_PAD_KEY_ROW2__KEY_ROW2      0x1b0b0
                MX6QDL_PAD_KEY_ROW4__KEY_ROW4      0x1b0b0
                MX6QDL_PAD_KEY_COL0__KEY_COL0      0x1b0b0
                MX6QDL_PAD_KEY_COL1__KEY_COL1      0x1b0b0
                MX6QDL_PAD_KEY_COL2__KEY_COL2      0x1b0b0
                MX6QDL_PAD_GPIO_0__KEY_COL5      0x1b0b0




in file imx_keypad.c   
   dev_dbg(&pdev->dev, "enabled rows mask: %x\n", keypad->rows_en_mask);
    dev_dbg(&pdev->dev, "enabled cols mask: %x\n", keypad->cols_en_mask);


Messages print 0x17 and 0x27 which I guess is correct.


Now I tried putting message in function imx_keypad_check_for_events() and in imx_keypad_scan_matrix()
which does not print even once.


Here is my dmesg log.


Nov 25 13:21:00 imx6qsabresd user.debug kernel: imx-keypad 20b8000.kpp: enabled rows mask: 17                                                                  
Nov 25 13:21:00 imx6qsabresd user.debug kernel: imx-keypad 20b8000.kpp: enabled cols mask: 27                                                                  
Nov 25 13:21:00 imx6qsabresd kernel: input: 20b8000.kpp as /devices/soc0/soc.1/2000000.aips-bus/20b8000.kpp/input/input0


I guess my setup_timer fails, any help is appreciated.