From 3e92242a32071782749f9b189fb1c0d4dbf56378 Mon Sep 17 00:00:00 2001 From: phc Date: Tue, 31 May 2011 11:51:22 +0800 Subject: [PATCH] RK29SmartPhone:23d bpstatus wakeup changed, remove additional wakeup --- drivers/misc/mtk23d.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/misc/mtk23d.c b/drivers/misc/mtk23d.c index cd2f6260dc33..9aaa5b3a2eeb 100755 --- a/drivers/misc/mtk23d.c +++ b/drivers/misc/mtk23d.c @@ -45,6 +45,7 @@ MODULE_LICENSE("GPL"); //#define AP_BP_WAKEUP RK2818_PIN_PF5 //output AP wake up BP used rising edge //#define BP_AP_WAKEUP RK2818_PIN_PE0 //input BP wake up AP +static bool bpstatus_irq_enable = false; static bool wakelock_inited; static struct wake_lock mtk23d_wakelock; @@ -226,8 +227,12 @@ static irqreturn_t BBwakeup_isr(int irq, void *dev_id) // disable_irq_wake(irq); - if(wakelock_inited == true) + if(bpstatus_irq_enable == true) + { + MODEMDBG("mtk23d_wakelock 3s \n"); wake_lock_timeout(&mtk23d_wakelock, 3 * HZ); + } + return IRQ_HANDLED; } @@ -393,6 +398,7 @@ int mtk23d_suspend(struct platform_device *pdev) else { printk("enable pdata->bp_statue irq_wake!! \n"); + bpstatus_irq_enable = true; enable_irq_wake(irq); } @@ -405,17 +411,18 @@ int mtk23d_resume(struct platform_device *pdev) int irq = 0; MODEMDBG("%s \n", __FUNCTION__); - //disable_irq_wake(irq); - ap_wakeup(pdev); - ap_wakeup_bp(pdev, 1); irq = gpio_to_irq(pdata->bp_statue); if(irq) { printk("disable pdata->bp_statue irq_wake!! \n"); + bpstatus_irq_enable = false; disable_irq_wake(irq); } + ap_wakeup(pdev); + ap_wakeup_bp(pdev, 1); + return 0; } -- 2.34.1