keypad controller in imx6sl

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

keypad controller in imx6sl

1,031件の閲覧回数
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 .

ラベル(4)
0 件の賞賛
2 返答(返信)

801件の閲覧回数
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 件の賞賛

801件の閲覧回数
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 件の賞賛