+/*!instead of doing this, you could use the gpio-keys driver which will configure the IRQ as a wakeup source and also send keys to the input layer.
+ * Power Key interrupt handler.
+ */
+static irqreturn_t power_key_int(int irq, void *dev_id)
+{
+ printk(KERN_INFO "PWR key pressed\n");
+ return 0;
+}
+
+/*!
+ * Power Key initialization.
+ */
+static int __init mxc_init_power_key(void)
+{
+ /* Set power key as wakeup resource */
+ int irq, ret;
+
+ /* power key */
+ ret = gpio_request(BABBAGE_POWER_KEY, "power-key");
+ if (ret) {
+ printk(KERN_ERR"failed to get BABBAGE_POWER_KEY: %d\n", ret);
+ return ret;
+ }
+ gpio_direction_input(BABBAGE_POWER_KEY);
+
+ irq = IOMUX_TO_IRQ(BABBAGE_POWER_KEY);
+ set_irq_type(irq, IRQF_TRIGGER_RISING);
+ ret = request_irq(irq, power_key_int, 0, "power-key", 0);
+ if (ret)
+ pr_info("register on-off key interrupt failed\n");
+ else
+ enable_irq_wake(irq);
+ return ret;
+}
+late_initcall(mxc_init_power_key);
+