imx8 linux gpio-keys using gpio interrupt example

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

imx8 linux gpio-keys using gpio interrupt example

Jump to solution
312 Views
flobro
Contributor III

I would like to use a GPIO on the IMX8M plus as an input for the Linux gpio-keys driver. I have not been able to find any examples of the device tree entries required to enable the interrupts  for a GPIO input bit to act as a "keypress".

0 Kudos
1 Solution
235 Views
flobro
Contributor III

Thanks for the response. I found out that there is GPIO support (gpio-mxc.c) that appears to handle the GPIO setup for interrupts properly, so I get a event from the "gpio-keys" config I set up in the device tree.

The only issue (not) is that there is more than just one or more bytes that get sent as an event. Good thing all I care about is that there is an event after the gpio changes state (vary rarely) which allow a blocking read to monitor it.

View solution in original post

0 Kudos
2 Replies
284 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @flobro!

Thank you for contacting NXP Support!

 

For our boards, we don´t have examples, but you can see the documentation of the kernel following the link:

 

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/Documentation/devicetree/bindings/gpio/gpio.txt

 

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/Documentation/devicetree/bindings/gpio/fsl-imx-gp...

 

Best Regards!

 

Chavira

0 Kudos
236 Views
flobro
Contributor III

Thanks for the response. I found out that there is GPIO support (gpio-mxc.c) that appears to handle the GPIO setup for interrupts properly, so I get a event from the "gpio-keys" config I set up in the device tree.

The only issue (not) is that there is more than just one or more bytes that get sent as an event. Good thing all I care about is that there is an event after the gpio changes state (vary rarely) which allow a blocking read to monitor it.

0 Kudos