[PATCH] add-ar6k-wake-interrupt.patch
Samuel Ortiz
sameo at openedhand.com
Thu Jun 26 16:02:42 CEST 2008
Hi Matt,
On Thu, Jun 26, 2008 at 09:45:39PM +0800, matt_hsu wrote:
> Attached patch is to add wakeup interrupt which is from ar6k module.
>
> Cheers,
>
> Matt
> add-ar6k-wake-interrupt.patch
>
> From: Matt <matt_hsu at openmoko.org>
>
> Signed-off-by: Matt Hsu <matt_hsu at openmoko.org>
>
> - add wakeup interrupt for ar6k
> ---
>
> .../sdio/function/wlan/ar6000/ar6000/ar6000_drv.c | 12 ++++++++++++
> .../sdio/function/wlan/ar6000/ar6000/ar6000_drv.h | 4 ++++
> 2 files changed, 16 insertions(+), 0 deletions(-)
>
>
> diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
> index dacc00a..98e78aa 100644
> --- a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
> +++ b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
> @@ -494,6 +494,11 @@ ar6000_dbglog_event(AR_SOFTC_T *ar, A_UINT32 dropped,
> }
>
>
> +static irqreturn_t ar6000_wow_irq(int irq, void *param)
> +{
> + printk(KERN_DEBUG "ar6000_wow interrupt\n");
> + return IRQ_HANDLED;
> +}
>
> static int __init
> ar6000_init_module(void)
> @@ -501,6 +506,7 @@ ar6000_init_module(void)
> static int probed = 0;
> A_STATUS status;
> HTC_INIT_INFO initInfo;
> + int rc;
>
> A_MEMZERO(&initInfo,sizeof(initInfo));
> initInfo.AddInstance = ar6000_avail_ev;
> @@ -533,6 +539,12 @@ ar6000_init_module(void)
> if(status != A_OK)
> return -ENODEV;
>
> + set_irq_type(GTA02_IRQ_WLAN_GPIO1, IRQT_RISING);
> + rc = request_irq(GTA02_IRQ_WLAN_GPIO1, ar6000_wow_irq, IRQF_DISABLED,
> + "ar6000", NULL);
> + if (rc < 0)
> + printk(KERN_ERR "GTA02: can't request ar6k wakeup IRQ\n");
> + enable_irq_wake(GTA02_IRQ_WLAN_GPIO1);
I would add that to the GTA02 board file, mach-gta02.c. Otherwise, you're
making this driver gta02 specific.
Cheers,
Samuel.
> return 0;
> }
>
> diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h
> index 655288b..5413d08 100644
> --- a/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h
> +++ b/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h
> @@ -38,6 +38,10 @@
> #include <linux/wireless.h>
> #include <linux/module.h>
> #include <asm/io.h>
> +#include <linux/interrupt.h>
> +#include <linux/irq.h>
> +#include <asm/arch/gta02.h>
> +
>
> #include <a_config.h>
> #include <athdefs.h>
More information about the openmoko-kernel
mailing list