Hi,
Thanks in advance for any help I can get. I have a NIOS2 w/MMU running uClinux v3.7. It's a DE2-115 development kit with Cyclone IV FPGA. I use the PIO megafunction to monitor input rising edge from the SMA pin and generate interrupt IRQ. I developed an uClinux device driver in the misc folder. All seem correct and compile, but the handler function doesn't seem like it was executed when I generate a pulse signal to the SMA.
Here is my device driver code:
in the probe function call
- res_mem = platform_get_resource(pdev, IORESURCE_MEM, 0)
- request_mem_region(res_mem->start, resource_size(res_mem), "GPIO_NAME")
- of_iomap(pdev->dev.of_node, 0);
- irq = irq_ofparse_and_map(pdev->dev.of_node, 0)
- request_irq(irq, pps_gpio_irq_handler, 1, "GPIO_NAME", NULL);
in the interrupt handler call
static irqreturn_t pps_gpio_irq_handler(int irq, void *dev_id)
{
printk(KERN_ALERT "Trigger");
return IRQ_HANDLED;
}
If I execute command "cat /proc/interrupt", the driver was successful requested.
2: 0 NIOS2-INTC GPIO_NAME
As you can see, the interrupt count didn't get incremented and "Trigger" was never print out after I apply a pulse signal to the SMA port. Is there a function call I am missing? or anything that I miss?
Thanks in advance for any help I can get. I have a NIOS2 w/MMU running uClinux v3.7. It's a DE2-115 development kit with Cyclone IV FPGA. I use the PIO megafunction to monitor input rising edge from the SMA pin and generate interrupt IRQ. I developed an uClinux device driver in the misc folder. All seem correct and compile, but the handler function doesn't seem like it was executed when I generate a pulse signal to the SMA.
Here is my device driver code:
in the probe function call
- res_mem = platform_get_resource(pdev, IORESURCE_MEM, 0)
- request_mem_region(res_mem->start, resource_size(res_mem), "GPIO_NAME")
- of_iomap(pdev->dev.of_node, 0);
- irq = irq_ofparse_and_map(pdev->dev.of_node, 0)
- request_irq(irq, pps_gpio_irq_handler, 1, "GPIO_NAME", NULL);
in the interrupt handler call
static irqreturn_t pps_gpio_irq_handler(int irq, void *dev_id)
{
printk(KERN_ALERT "Trigger");
return IRQ_HANDLED;
}
If I execute command "cat /proc/interrupt", the driver was successful requested.
2: 0 NIOS2-INTC GPIO_NAME
As you can see, the interrupt count didn't get incremented and "Trigger" was never print out after I apply a pulse signal to the SMA port. Is there a function call I am missing? or anything that I miss?