Userspace notification

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

Userspace notification

724 Views
mathew_k_t
Contributor II

Hi,

I'm working with imx6ull board. Currently, I'm developing a device driver for an SPI device.

In my driver, I'm using a GPIO interrupt. The interrupt is very fast and occurs at every 5ms. I would like to notify userspace application regarding this interrupt.

  1. Please suggest a suitable method for this type of notification(fast and efficient).
  2. Whether asynchronous notification is a good solution?
  3. Is there any way to enable or disable interrupts from userspace?

Thanks and Regrads

Labels (3)
Tags (1)
0 Kudos
1 Reply

627 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi mathew,

there are many approaches, I think the easiest one would be to create an input to a file created in some path inside /sys/... Then you will be able to read this file in user space, you would need to have a thread polling this flag. The problem here is that the time it may took to read the flag wont be always the same. In this case I would suggest to use an RTOS.

You could consider i.MX6SX or i.MX7D wich have a M4 core that can run a RTOS. You can download FreeRTOS BSP for i.MX6SX and i.MX7D from our web page.


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos