ARM: pxa: hx4700: Enable ASIC3 GPIO as a wakeup source

This patch enables the ASIC3 GPIO (12) as a wakeup source:
1. Set the WAKEUP_ON_EDGE_RISE MFP config bits for GPIO12 in
hx4700_pin_config[].
2. Call gpio_set_wake() for GPIO12.

With GPIO12 thus enabled, the mfd/asic3 driver can enable its own GPIOs
as wakeup sources by implementing a irq_set_wake() handler.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
This commit is contained in:
Paul Parsons 2012-05-02 16:49:24 +01:00 committed by Haojian Zhuang
parent 89619d44ee
commit e949f93c59
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,7 @@ static unsigned long hx4700_pin_config[] __initdata = {
GPIO88_GPIO, GPIO88_GPIO,
/* HX4700 specific input GPIOs */ /* HX4700 specific input GPIOs */
GPIO12_GPIO, /* ASIC3_IRQ */ GPIO12_GPIO | WAKEUP_ON_EDGE_RISE, /* ASIC3_IRQ */
GPIO13_GPIO, /* W3220_IRQ */ GPIO13_GPIO, /* W3220_IRQ */
GPIO14_GPIO, /* nWLAN_IRQ */ GPIO14_GPIO, /* nWLAN_IRQ */
@ -860,6 +860,7 @@ static void __init hx4700_init(void)
int ret; int ret;
pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1);
ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
if (ret) if (ret)
pr_err ("hx4700: Failed to request GPIOs.\n"); pr_err ("hx4700: Failed to request GPIOs.\n");