Event generation fails AT91SAM9G20 i2c-gpio kernel 3.7

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

Posts: 2
Joined: Sat Jun 23, 2007 4:14 am

Event generation fails AT91SAM9G20 i2c-gpio kernel 3.7

Fri May 17, 2013 7:52 pm

Have written a working i2c input driver that monitors the MMA8452q chip via i2c-gpio in linux kernel 2.6.39-rc1. I can read the events generated by the accelerometer via evdev, /dev/input/event0. The accelerometer interrupt is based on GPIO 30 in the AT91SAM9G20.

Have had to move to kernel 3.7-rc1 due to other issues. In porting the accelerometer driver to 3.7-rc1, some board init changes were required. One, gpio_to_irq(), has changed from a #define to a function call, and thus i2c_board_info does not allow assigning the GPIO to irq in the definition.

GPIO definitions have changed between the kernel versions so what was 62 (GPIO PA30) in kernel 2.6.39-rc1 is now 30 in kernel 3.7-rc1.

Does anyone know of an issue with any of the following:
a. incorrect gpio_to_irq selection in the code?
b. i2c devices not registering interrupts with evdev?

In checking the initialization of the driver, the i2c framework is NOT retrieving the irq in the i2c_boardinfo.


Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 3 guests