/* WARNING: this area can be expanded. Do NOT add any member! */
};
+#if defined(CONFIG_MACH_GRANDE) || defined(CONFIG_MACH_IRON)
+extern int Is_folder_state(void);
+#endif
/*
* SYSFS interface for enabling/disabling keys and switches:
*
ATTR_SHOW_FN(disabled_keys, EV_KEY, true);
ATTR_SHOW_FN(disabled_switches, EV_SW, true);
+#ifdef CONFIG_SLP_WAKEUP_COUNT
+static int gpio_key_wakeup_irq;
+#endif
/*
* ATTRIBUTES:
*
if (state)
input_event(input, type, button->code, button->value);
} else {
+
+#if defined(CONFIG_MACH_GRANDE) || defined(CONFIG_MACH_IRON)
+ if(Is_folder_state() && (button->code == KEY_END))
+ {
+ printk(KERN_DEBUG"[keys] not report PWR %d : Folder is closed\n", !state);
+ return;
+ }
+#endif
+
if (bdata->wakeup && !state) {
input_event(input, type, button->code, !state);
if (button->code == KEY_POWER)
}
irq = gpio_to_irq(button->gpio);
+#ifdef CONFIG_SLP_WAKEUP_COUNT
+ gpio_key_wakeup_irq = irq;
+#endif
if (irq < 0) {
error = irq;
dev_err(dev, "Unable to get irq number for GPIO %d, error %d\n",
for (i = 0; i < pdata->nbuttons; i++)
gpio_keys_report_event(&ddata->data[i]);
input_sync(input);
-
+#ifdef CONFIG_SLP_WAKEUP_COUNT
+ device_init_wakeup_setirq(&pdev->dev, gpio_key_wakeup_irq);
+#else
device_init_wakeup(&pdev->dev, wakeup);
+#endif
return 0;