keypad controller in imx6sl

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

keypad controller in imx6sl

776 Views
thangameenaraje
Contributor II

Hi 

i am started to work in keypad interface with sololite

my kernel is 3.0. and kitkat 4.4.2.

i have keypad controller tca8418..  in this controller int pin is connected to processor gpio.

i have compiled successfully with tca8418_keypad.c driver file. and while booting keypad is probing,

in the /dev/input/event0 is created.

but when i run cat /dev/input/event0 there is no data .. then i added executable file.

int main()

{

    int fd;

   

    fd = open("/dev/input/event0", O_RDONLY);

    struct input_event ev;

    while (1)

    {

        read(fd, &ev, sizeof(struct input_event));

        if(ev.type == 1)

            //printf("key %i state %i\n", ev.code, ev.value);

            if(ev.value == 0)

                printf("Pressed key value:%d\n ", ev.code);

    }

}

i didnt get anything its not entering into while...

can you suggest me how to check keypad controller with sololite .

Labels (4)
0 Kudos
2 Replies

546 Views
igorpadykov
NXP Employee
NXP Employee

Hi THANGAMEENA

as this is i2c device one can check its pinctrl settings, in particular SION

bit should be set. It is recommended to verify if processor can communicate

with keypad controller using SDK i2c/test/imx6_i2c_device.c test

"MX6_PLATFORM_SDK "

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&nodeId=018rH3ZrDRB24A&fpsp=1&t...

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

546 Views
thangameenaraje
Contributor II

Hi igorpadykov,

static struct tca8418_keypad_platform_data tca8418_data =
{
.keymap_data = &mx6sl_evk_map_data, //tca8418_mkdata,//&mx6sl_evk_map_data,//imx6_keymap_data,
.rows = 8,
.cols = 7,
.rep = 1,
.irq_is_gpio = 1,

};

i used this as platform data. also i attached my driver file and keypad connection.  is this driver will support 3.0 kernel and 4.4.2 kitkat.?  becoz on 3.10 kernel the keypad driver is inbuilt.

my keypad controller INT pin  connected to my processor . how can i define this  processor gpio in platform data

if i gave like this i am getting error

I2C_BOARD_INFO(TCA8418_NAME, 0x34),

                .platform_data = &tca8418_data,

                .irq = gpio_to_irq(MX6SL_BRD_KEYPAD_INT),

then i commented  //.irq = gpio_to_irq(MX6SL_BRD_KEYPAD_INT),

0 Kudos