MPR121 touch sensing in Linux

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

MPR121 touch sensing in Linux

Jump to solution
1,580 Views
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 Solution
1,276 Views
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

View solution in original post

5 Replies
1,276 Views
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 Kudos
Reply
1,276 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

weidong

1,276 Views
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 Kudos
Reply
1,277 Views
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,276 Views
winstonrodrigue
Contributor IV

Hey thank you Weidong.

Its working Now.....

0 Kudos
Reply