Thanks anyway for sharing - it was instructive
On Wed, Dec 7, 2011 at 1:52 PM, Jean-Christian de Rivaz <j...@eclis.ch> wrote: > On a OMAP-L138 custom board, the GPIO 5,11 is used as an interrupt for the > wl12xx driver. It is declared this way in the board file: > > #define XBRD_WLAN_IRQ GPIO_TO_PIN(5, 11) > > static struct wl12xx_platform_data xbrd_wlan_data __initdata = > { > .irq = -1, > .board_ref_clock = WL12XX_REFCLOCK_38, > .platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_**IRQ, > }; > > In the init() of the board file: > > ret = gpio_request_one(XBRD_WLAN_**IRQ, GPIOF_IN, "wl12xx_irq"); > if (ret) { > pr_warning("error request wl12xx irq gpio: %d\n", ret); > } > xbrd_wlan_data.irq = gpio_to_irq(XBRD_WLAN_IRQ); > ret = wl12xx_set_platform_data(&**xbrd_wlan_data); > if (ret) { > pr_warning("error setting wl12xx data: %d\n", ret); > } > > The oscilloscope show that the electrical signal work exactly as expected > and described in http://www.lsr.com/downloads/** > tiwi_r1/TiWi_R1_Datasheet.pdf<http://www.lsr.com/downloads/tiwi_r1/TiWi_R1_Datasheet.pdf>, > page 19, "IRQ OPERATION". The /sys/kernel/debug/gpio entry show the correct > state of the line: > > GPIOs 64-95, DaVinci: > gpio-91 (wl12xx_irq ) in lo > > When the signal is low on the oscilloscope, and > > GPIOs 64-95, DaVinci: > gpio-91 (wl12xx_irq ) in hi > > When the signal is high on the oscilloscope. So far everything seem to be > ok. > > The problem is that when the wl12xx driver is loader, it complain with the > message: > > wl1271: ERROR ELP wakeup timeout! > > Reading the code drivers/net/wireless/wl12xx/**ps.c show that the driver > is clearly waiting for a interrupt at this point. But this is not happening > according to /proc/interrupts: > > 192: 0 GPIO wl1271 > > And stay always 0. I even connected a 10 Hz periodic square signal to the > GPIO 5,11 wire, and the /proc/interrupts never increase. But at the same > time, /sys/kernel/debug/gpio is always reporting the true signal state, > flipping between "lo" and "hi". > > I suspect that something is missing in order to connect the "wl12xx_irq" > from the GPIO to the "wl1271" of the wl12xx driver. But I can't figure what. > > Jean-Christian > ______________________________**_________________ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@**linux.davincidsp.com<Davinci-linux-open-source@linux.davincidsp.com> > http://linux.davincidsp.com/**mailman/listinfo/davinci-**linux-open-source<http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source> > -- Albert Burbea Harishonim 8 Ramat Gan 52502, Israel Tel/Fax + 972-3-7526016 Mobile: +972-52-3541842
_______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source