diff options
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c index 61c01c90a8f..06471aefe7d 100644 --- a/arch/arm/mach-omap2/board-omap3h1.c +++ b/arch/arm/mach-omap2/board-omap3h1.c @@ -787,7 +787,7 @@ static struct i2c_board_info __initdata omap3h1_i2c3_board_info[] = { }, }; -#ifdef ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS +/* #ifdef ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS */ /* --------------------------------------------------------------------------- */ /* Create debugfs entry @@ -907,21 +907,25 @@ static irqreturn_t acc_irq_handler_thr(int irq, void * omap3h1_d) { if (jiffies_to_msecs(now - previous) < OLIO_DOUBLE_TAP) { - /* ignore double clicks that happens too soon from the previous one */ + /* ignore double clicks that happens too soon from the previous one - + * filters out inadvertent wake-ups + */ + if (jiffies_to_msecs (now - previous_double) < OLIO_DT_WAIT) { previous = 0; return IRQ_HANDLED; } - + printk (KERN_DEBUG "Double tap detected!\n"); /* We want to wake up. Take wake lock (and send signal to user space?) * BT driver only takes wake lock, then lets higher levels handle * everything ... but what if there's nothing there to take the lock? */ - + send_wake_signal(); + wake_lock_timeout (&acc_wake.lock, msecs_to_jiffies (20 * OLIO_ONE_SECOND)); previous_double = now; @@ -972,7 +976,7 @@ static int __init omap3_wake_init (void) { } -#endif /* ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS */ +/* #endif ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS */ /*************************************************************************** @@ -1214,15 +1218,13 @@ static void __init omap3_h1_init(void) /* For handling interrupts from the accelerometer */ - /* previous = jiffies; */ + previous = jiffies; /* Init the code that handles wake ups */ - - /* + omap3_wake_init(); omap3_acc_irq_init(omap3h1_i2c2_board_info[0].irq, (void *) &omap3h1_devices); - */ /* #endif ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS*/ |