This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCA8418 keypad controller with i.MX6 processor

Other Parts Discussed in Thread: TCA8418

Hi,

I have a custom board based on i.MX6 quad core. I am using the Yocto 1.6 having kernel version 3.10.17. TCA8418 driver is already present in the BSP and kernel supports the device tree concept. There is I2C interface b/w processor and TCA8418 controller. So I want to make the entry of TCA8418 controller in device tree file. I just referred to some post of TCA8418 to make the changes in device tree; but not got the enough information.

Below is the my implementation:

        /* keypad scanner */
        tca8418@34 {
                compatible = "ti,tca8418"; /* this translates into request_module (i2c:tca8418) */
                reg = <0x34>;
                interrupt-parent = <&gpio1>;
                interrupts = <2 1>; /* gpio1_2 low-to-high edge */
                keypad,num-rows = <5>;
                keypad,num-columns = <10>;
                };

My driver probe function is calling; but not able to map the keypad matrix. So please tell me what are the changes required in device tree to communicate with keypad controller and binding for matrix-connected keyboards.

I have also seen some example like:

row << 24 | column << 16 | key-code

linux,keymap = < 0x00030012; 0x0102003a >


But can not understand that how to implement it. Please suggest me how can I achieve it.

  • You said "I just referred to some post of TCA8418 to make the changes in device tree; but not got the enough information."

    Can you provide a link to this post?

    It is not common for our team to debug software-related questions, especially if the processor is not produced by TI.

    It may be easier for your to rephrase your question more generally about the device, not specifically about the code.

  • Hi Brian;

    Thanks for your quick reply.

    I have followed the below link
    http://dev.pyra-handheld.com/index.php/p/pyra-kernel/source/tree/e20a43f968367b66aa297b780729d19bf771138a/arch/arm/boot/dts/omap5-pyra.dts

    I think the TCA8418 driver is the part of kernel 3.10.17 version. I am assuming that src/kernel-3.10-17-ro/git/drivers/input/keyboard/tca8418_keypad.c is the path of keyboard driver.

    So I do not think this issue is specific to processor. I have never worked on the keypad controller. So my main concern is how to map the keypad matrix. In may case; I am using the 5 rows and 10 columns. But in the above posted link they are mapping the keypad matrix having 8 rows and 10 columns; but i did not understand; how they are mapping.

    Please correct me; if there is something wrong.
  • Again, if you can phrase your question in terms of the TCA8418 device and its register map, using phrases like " Reg. 0x00" to refer to Register 0 and "data = 0xFF" to refer to data with decimal value 255, then we can offer more assistance on this forum.

    We are not responsible for the Pyra Handheld forum and cannot comment on the validity of code posted on their website. If you need coding help, then the Pyra Handheld site may be the place to post your question.