diff options
author | kevin shen <b00984@freescale.com> | 2008-04-17 10:12:24 +0800 |
---|---|---|
committer | Daniel Schaeffer <daniel.schaeffer@timesys.com> | 2008-08-25 15:21:02 -0400 |
commit | ffdf5b9bf424939391096856fd13fd82af596010 (patch) | |
tree | ed8e1a30e54aba2f5f3caf361061b813e424194b | |
parent | 62b28042af2561b3728efed86c7edc1d58e447a9 (diff) |
ENGR00060279 CR can't wake up from suspend state by on/off key
fix this CR by configure on/off gpio pin
Signed-off-by: Kevin Shen <b00984@freescale.com>
-rw-r--r-- | arch/arm/mach-mx3/mx3_3stack_gpio.c | 14 | ||||
-rw-r--r-- | drivers/mxc/pmic/mc13783/pmic_power.c | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx3_3stack_gpio.c b/arch/arm/mach-mx3/mx3_3stack_gpio.c index c8a2fedd49a7..3e612122da5a 100644 --- a/arch/arm/mach-mx3/mx3_3stack_gpio.c +++ b/arch/arm/mach-mx3/mx3_3stack_gpio.c @@ -15,6 +15,7 @@ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/delay.h> +#include <linux/irq.h> #include <asm/io.h> #include <asm/hardware.h> #include <asm/arch/gpio.h> @@ -208,6 +209,19 @@ void gpio_keypad_inactive(void) EXPORT_SYMBOL(gpio_keypad_inactive); +void gpio_on_off_button_active(void) +{ + mxc_request_iomux(MX31_PIN_GPIO1_2, OUTPUTCONFIG_GPIO, + INPUTCONFIG_GPIO); + mxc_set_gpio_direction(MX31_PIN_GPIO1_2, 1); + mxc_iomux_set_pad(MX31_PIN_GPIO1_2, PAD_CTL_PKE_NONE); + set_irq_type(IOMUX_TO_IRQ(MX31_PIN_GPIO1_2), IRQF_TRIGGER_RISING); + set_irq_wake(IOMUX_TO_IRQ(MX31_PIN_GPIO1_2), 1); + /* gpio1 include on/off interrupt */ + set_irq_wake(52, 1); +} +EXPORT_SYMBOL(gpio_on_off_button_active); + /*! * Setup GPIO for a CSPI device to be active * diff --git a/drivers/mxc/pmic/mc13783/pmic_power.c b/drivers/mxc/pmic/mc13783/pmic_power.c index 33e77b412066..7b8c2998a84e 100644 --- a/drivers/mxc/pmic/mc13783/pmic_power.c +++ b/drivers/mxc/pmic/mc13783/pmic_power.c @@ -3064,12 +3064,15 @@ void pmic_power_key_callback(void) #endif } +extern void gpio_on_off_button_active(void); /* * Init and Exit */ static int pmic_power_probe(struct platform_device *pdev) { + /* configure on/off button */ + gpio_on_off_button_active(); printk(KERN_INFO "PMIC Power successfully probed\n"); return 0; } |