i.MX6sl evk button matrix access

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6sl evk button matrix access

714 Views
Contributor II

Greetings all,

I seem to be having some issues regarding how to access the gpio's attached to the button matrix on the i.mx6sl-evk from within user-space.

The ultimate goal here being to run an arbitrary shell script when a button is pressed.

I am running a 3.10.9 kernel built with Yocto and have sysfs enabled in my kernel.

Have read and tried the following directions: https://community.freescale.com/docs/DOC-1459

(Everything seems to work fine and I can export gpio's but values never change.)

I felt like this might shed some light on the problem: https://community.freescale.com/message/306257#306257 but I'm not entirely sure if it is relevant to my situation.

Have read the i.MX_6SoloLite_Linux_Reference_Manual.pdf

(Particularly Chapter 3 in regards to General Purpose I/O and IOMUX.)

Have looked through the imx6slevk schematic.

(Especially page 12 containing the button matrix sub-circuit and page 16 containing the IOMUX Table.)

A bump in the right direction would be greatly appreciated!

Labels (4)
0 Kudos
4 Replies

34 Views
NXP Employee
NXP Employee

Stephen,

The keypad pins on mx6slevk are configured as keypad functionality (using the built-in keypad controller), not GPIO.

Regards,

Fabio Estevam

0 Kudos

34 Views
Contributor II

UPDATE:

cat'ing /dev/input/event0 does appear to spit out repetitive (though inconsistent) data upon a button press. This would lead me to believe that it thinks the button matrix is a HID. (Perhaps a keyboard?)

In the event that a /sys/class/gpio/ solution doesn't pan out, does anyone have any thoughts on how to make some kind of ineligible sense out of the data coming from /dev/input/ ?

0 Kudos

34 Views
NXP Employee
NXP Employee

Hello Stephen,

For i.MX6SL EVK button matrix, its driver is the file drivers/input/keyboard/imx_keypad.c. Please check if the button is detected properly in the driver.

Thanks,

Peter

0 Kudos

34 Views
Contributor II

Peter, thank you very much for your reply.

Unfortunately, that path/file does not seem to exist for me.

I have:

root@linaro-ubuntu-desktop:/# find -name "*keypad*"

./etc/brltty/brl-ht-keypad.kti

./etc/brltty/kbd-keypad.ktb

./unit_tests/autorun-keypad.sh

./usr/share/X11/xkb/symbols/keypad

./usr/share/X11/xkb/compat/keypad

./sys/bus/platform/drivers/imx-keypad

The data is definitely getting there, as I can obtain meaningful output from hexdump/xxd/evtest.

As a fallback I can always pipe the data through one of these and parse out the relevant keycodes/ascii character, but a working driver sure would be a whole lot more convenient.

Thoughts?

0 Kudos