LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   timer driver error! (https://www.linuxquestions.org/questions/linux-hardware-18/timer-driver-error-659000/)

raedbenz 07-29-2008 08:38 AM

timer driver error!
 
HI .
i am tying to build this module that generates periodic interrupts from a ARM's timer 2.
i defined interrupt like that:
Code:

request_irq(IRQ_EP93XX_TIMER2, interrupt_tick_update, 0,"t2int",NULL);
http://lxr.linux.no/linux/include/as...-ep93xx/irqs.h. the "device name "t2int" i selected it randomly.
here is what i get:
Code:

error: implicit declaration of function 'request_irq'
and
Code:

error: implicit declaration of function 'free_irq'
any hints?
thanks

ra2008 07-29-2008 02:37 PM

try to check if u had added the correct header file
<linux/interrupt.h>

cheers

raedbenz 07-29-2008 04:31 PM

yea thats worked.
but now, i defined interrupt like that:
Code:

request_irq( IRQ_EP93XX_TIMER2, interrupt_tick_update, 0,"t2int",NULL);
and the handler is :
Quote:

irqreturn_t interrupt_tick_update(int irq, void *dev_id, struct pt_regs *regs)
{
Tick_count_G++;
printk(<1>"Tick count %d" Tick_count_G++);
return IRQ_HANDLED ;
}
and i get this when i compile:
Quote:

warning: passing argument 2 of 'request_irq' from incompatible pointer type
any hints?
thanks


All times are GMT -5. The time now is 03:12 PM.