MPR121 touch sensing in Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPR121 touch sensing in Linux

跳至解决方案
1,582 次查看
winstonrodrigue
Contributor IV

Dear Friends,

         I am working on Freescale SABRE tablet (IMX53-SMD board). Which has a MPR121 touch sensor keyboard

with 4 keys( OPTIONS, HOME, BACK, SEARCH ). The driver for this device is already built and its present.

But I dont know how to use it. Can anyone give some idea how this touch keyboard can be used in application ?

  Thanks,

   Winston.

1 解答
1,277 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Winston,

      Adjust Key mapping in mx53_smd.c like the following :

static u16 smd_touchkey_martix[4] = {

KEY_OPTION, KEY_HOME, KEY_BACK, KEY_SEARCH,

};

Regard,

Weidong

在原帖中查看解决方案

5 回复数
1,277 次查看
winstonrodrigue
Contributor IV

in boot log I could see these messages :

mpr121 1-005a: mpr121: config as enable 4 of electrode.                   

mpr121 1-005a: Mpr121 touch keyboard init success.

0 项奖励
回复
1,277 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Yes,But Original key mappling should be changed like above !

weidong

1,277 次查看
winstonrodrigue
Contributor IV

Hi Weidong,

    Now whenever I press any of the touch keys I get the message on terminal as follows..

mpr121 1-005a: key 2 158 pressed                                          
mpr121 1-005a: key 2 158 released                                         
mpr121 1-005a: key 1 102 pressed                                          
mpr121 1-005a: key 1 102 released                                         
mpr121 1-005a: key 0 357 pressed                                          
mpr121 1-005a: key 0 357 released                                         
mpr121 1-005a: key 3 217 pressed                                          

mpr121 1-005a: key 3 217 released

I have two questions..

1. Now the driver is configured for 4 keys, How can i do it for 12 keys. Our hardware is not yet ready but

     Where exactly I need to modify the code ?

2. So is there any way that I can read the inputs from a file or something..

  like when I get an interrupt I can read the file and get the readings...

Thank you.

0 项奖励
回复
1,278 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Winston,

      Adjust Key mapping in mx53_smd.c like the following :

static u16 smd_touchkey_martix[4] = {

KEY_OPTION, KEY_HOME, KEY_BACK, KEY_SEARCH,

};

Regard,

Weidong

1,277 次查看
winstonrodrigue
Contributor IV

Hey thank you Weidong.

Its working Now.....

0 项奖励
回复