Linux Interrupt / Hardware Embedded

On my AT91SAM9RL-EK ARM board running on Linux 2.6.30 buildroot, I have the following.

cat /proc/interrupts
           CPU0
  1:       6475         AIC  at91_tick, rtc0, ttyS0
 10:         11         AIC  mmc0
 13:          4         AIC  atmel_spi.0
 18:      23533         AIC  tc_clkevt
 20:          0         AIC  atmel_tsadcc
 22:          0         AIC  atmel_usba_udc
 23:          0         AIC  atmel_lcdfb
 24:          0         AIC  AC97C
 40:          1        GPIO  atmel_usba_udc
 47:          0        GPIO  mmc0
 64:          6        GPIO  Right Click
 65:         10        GPIO  Left Click

Right and left click are buttons on my board. Now I want to change the interrupt handlers for the buttons (for example, they give me the result when I click).

Where can I find interrupt handlers or drivers (or source files for them) for buttons?

Or can I write my own drivers and register them (while I'm in user space) for buttons and how?

This is some data from the PIO board manual.

IO... Per.... Application Usage............................................ Pow. by
PB0  TXD3 USER’S PUSH BUTTON 1 PB0 as LEFT CLICK VDDIOP
PB1  RXD3 USER’S PUSH BUTTON 2 PB1 as RIGHT CLICK VDDIOP
+3
source share
2 answers

I do not have a specific answer to your advice, but I can give you some pointers with the necessary information.

- " " GPIO. , root. , , /dev /proc.

, Linux. - Linux, http://lwn.net/Kernel/LDD3/

GPIO register_irq() . , , .

+3

buildroot, gpio.txt dir . , GPIO sysfs.

+1

Source: https://habr.com/ru/post/1790409/


All Articles