Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2012
Handling interrupt on a gpio pin.
I want to configure a gpio pin (ARM 11 processor) as interrupt in my kernel code. I intend to create a platform_device struct for the gpio pin and register it. I have also created a new platform driver and registered it(both driver and device have the same "name" parameter...) Then i've written code to allocate resources for it using platform_get_resource() followed by invoking gpio_request(), gpio_direction_input() , request_mem_region() and ioremap(). Finally i have called the request_irq() with its associated handler. The code is similar to the watchdog timer code dw_wdt.c : lxr.free-electrons.com/source/drivers/watchdog/dw_wdt.c
Once the kernel is up, all resources are getting allocated, but when i interrupt, the handler is not called. Pls help me figure out what i have missed out...
What is the role of the driver's probe function exactly? When is it really invoked? (I have left my driver's probe func empty for time being...)
Also, how can i check if the driver is bound to the device?
Note: I am completey a newbie to linux device drivers