Hello,
We are working on dra7xx-evm(OMAP5777) board. Here we are using these things:
1. linux3.8
2. Toolchain- gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux.
We are trying to raise a software interrupt on gpio pin in linux. For this we have written a driver code.
This is what we have done.
We have configured gpio6_10 pin as input in dra7-evm.dts file as input like this:
vin5a_pins: pinmux_vin5a_pins {
pinctrl-single,pins = <
0x374 0x00060000 /* vin5a_clk0 INPUT | MODE0 */
After that we are using this pin(gpio6_10) as interrupt in our project.
We are using the following code to configure and enable gpio interrupt.
/* configuring the gpio pin as interrupt and irq request */
irqNum = gpio_to_irq(170); //gpio6_10 -> 170
printk("gpio_to_irq(170) = %d\n", irqNum);
err = request_irq( irqNum, buttons_interrupt, IRQF_TRIGGER_FALLING , "Test_hmi", NULL);
/* irq handler */
static irqreturn_t buttons_interrupt(int irq, void *dev_id)
{
unsigned int i;
printk (DEVICE_NAME"\t buttons_interrupt enter\n");
return IRQ_RETVAL(IRQ_HANDLED);
}
When we are inserting this driver, we are getting handler for this irq request.
But we want to raise a software interrupt on this gpio pin.
Please tell us how to do this in linux.
Regards
Naveen