AnsweredAssumed Answered

How use Ethernet pin as gpio interrupt pin

Question asked by Matteo Fabiani on Nov 27, 2013
Latest reply on Nov 28, 2013 by Anson Huang

Hi!!!

 

I have a problem with my i.mx28 based custom board. My custom board works with Linux ed it is connected by NFS to my host computer.

I have connectet pin ENET0_TXD2 to an external device and I have configured this pin as a input gpio. In my driver I have set this pin as input,


gpio_direction_input(ENET0_TXD2);

 

and I have called the interrupt request function;

 

pin = gpio_to_irq(ENET0_TXD2);

request_irq ( pin, &interruptFunction, IRQF_TRIGGER_RISING, ..., NULL );

 

irqreturn_t interruptFunction (int irq, void *dev_id)

{

     irq handler....

}

 

The problem is that when there is a rising edge on the ENET0_TXD2 pin nothing happens, i.e. the interrupt function associated to a rising edge on the pin ENET0_TXD2 is never called.

 

I have repleced pin ENET0_TXD2 with another pin (LCD_HSYNC) and everything works perfectly.


Why with pin ENET_TXD2 the interrupt function is never called?

I have to change some particular setting in the kernel (ethernet driver ecc ecc)?


Do you have any suggestions?


Thanks,

Matteo.

Outcomes