Skip to content

Commit

Permalink
star: Add GPIO pins G0, G1, and W2 to wakeup pad
Browse files Browse the repository at this point in the history
Accept wake events from these pins (vol+/vol-/proximity)
  • Loading branch information
rmcc committed Nov 28, 2011
1 parent 24528aa commit 5299142
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-tegra/board-nvodm.c
Expand Up @@ -2695,6 +2695,7 @@ static void __init tegra_setup_suspend(void)
gpio_to_irq(TEGRA_GPIO_PS4), gpio_to_irq(TEGRA_GPIO_PS5),
INT_SDMMC2, gpio_to_irq(TEGRA_GPIO_PQ6),
gpio_to_irq(TEGRA_GPIO_PQ7), gpio_to_irq(TEGRA_GPIO_PN2),
gpio_to_irq(TEGRA_GPIO_PG0), gpio_to_irq(TEGRA_GPIO_PG1),
};
#endif
const NvOdmWakeupPadInfo *w;
Expand Down Expand Up @@ -2781,6 +2782,8 @@ static void __init tegra_setup_suspend(void)
#endif
enable_irq_wake(gpio_to_irq(TEGRA_GPIO_PG3)); //earjack sensor
enable_irq_wake(gpio_to_irq(TEGRA_GPIO_PD3)); //hook detect
enable_irq_wake(gpio_to_irq(TEGRA_GPIO_PG0)); //vol-up
enable_irq_wake(gpio_to_irq(TEGRA_GPIO_PG1)); //vol-down
#endif
//20101117, cs77, gpio wakeup from LP1 [END]

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-tegra/gpio.c
Expand Up @@ -471,8 +471,8 @@ const struct tegra_init_gpio_info tegra_sleep_gpio_info_array[] = {
{ 'x'-'a', 6, GPIO_ENABLE, GPIO_INPUT, GPIO_SLEEP_LOW, SPIE}, // TOUCH_INT
#ifdef CONFIG_MACH_STAR_REV_F
{ 'r'-'a', 1, GPIO_ENABLE, GPIO_INPUT, GPIO_SLEEP_LOW, KBCA}, // IFX2_AP20 (LGP990)
{ 'r'-'a', 2, GPIO_ENABLE, GPIO_INPUT, GPIO_SLEEP_LOW, KBCA}, // PROXI_OUT
#endif
{ 'w'-'a', 2, GPIO_ENABLE, GPIO_INPUT, GPIO_SLEEP_LOW, KBCA}, // PROXI_OUT
/* group tristate or input */
#if 1
{ 'j'-'a', 5, GPIO_ENABLE, GPIO_INPUT, GPIO_SLEEP_LOW, IRTX}, // LCD_MAKER_ID
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-tegra/odm_kit/star/query/nvodm_query.c
Expand Up @@ -774,7 +774,7 @@ static NvOdmWakeupPadInfo s_NvOdmWakeupPadInfo[] =
{NV_TRUE, 9, NvOdmWakeupPadPolarity_AnyEdge}, // Wake Event 9 - gp3_ps[2] (CHG_STATUS_N_AP20)
{NV_FALSE, 10, NvOdmWakeupPadPolarity_High}, // Wake Event 10 - gmi_ad21
{NV_TRUE, 11, NvOdmWakeupPadPolarity_Low}, // Wake Event 11 - spi2_cs2 (BATT_LOW_INT_N)
{NV_FALSE, 12, NvOdmWakeupPadPolarity_Low}, // Wake Event 12 - spi2_cs1 (AUDIO_INT_N)
{NV_TRUE, 12, NvOdmWakeupPadPolarity_Low}, // Wake Event 12 - proxi_out
{NV_TRUE/*NV_FALSE*/, 13, NvOdmWakeupPadPolarity_Low}, // Wake Event 13 - sdio1_dat1
{NV_FALSE, 14, NvOdmWakeupPadPolarity_AnyEdge}, // Wake Event 14 - gp3_pv[6]
{NV_FALSE, 15, NvOdmWakeupPadPolarity_AnyEdge}, // Wake Event 15 - gmi_ad16
Expand Down

0 comments on commit 5299142

Please sign in to comment.