summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorximingc <ximingc@nvidia.com>2014-01-23 14:12:37 +0800
committerMartin Chi <mchi@nvidia.com>2014-01-26 23:08:43 -0800
commit85653b40549f57dbf60371e7b3d5f761f2579403 (patch)
treec14c29f6a3b86e44fa7d7547c585526489f49ff9 /arch
parent2e9f249d65d3fca96a18137cb193643ba5197577 (diff)
ARM:Tegra:Add sleep GPIO function
Some GPIO pins need re-configure while system enters LP0. Bug 1439735 Change-Id: I2d21e4119c7a9d762db17b0b753ba12781547a27 Signed-off-by: ximingc <ximingc@nvidia.com> Reviewed-on: http://git-master/r/359078 Reviewed-by: Martin Chi <mchi@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/include/mach/gpio-tegra.h8
-rw-r--r--arch/arm/mach-tegra/pinmux-t11-tables.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
index 953ec31cae85..606715dfff78 100644
--- a/arch/arm/mach-tegra/include/mach/gpio-tegra.h
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -6,6 +6,8 @@
* Author:
* Erik Gilling <konkers@google.com>
*
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
+ *
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
@@ -46,4 +48,10 @@ int tegra_gpio_get_bank_int_nr(int gpio);
int tegra_gpio_resume_init(void);
int tegra_is_gpio(int);
+#ifdef CONFIG_PM_SLEEP
+void tegra11x_set_sleep_gpio(struct gpio_init_pin_info *config, int size);
+#else
+static inline void
+tegra11x_set_sleep_gpio(struct gpio_init_pin_info *config, int size) {}
+#endif
#endif
diff --git a/arch/arm/mach-tegra/pinmux-t11-tables.c b/arch/arm/mach-tegra/pinmux-t11-tables.c
index 7246352e6c4a..911f8300b6e5 100644
--- a/arch/arm/mach-tegra/pinmux-t11-tables.c
+++ b/arch/arm/mach-tegra/pinmux-t11-tables.c
@@ -3,7 +3,7 @@
*
* Common pinmux configurations for Tegra11x SoCs
*
- * Copyright (C) 2011-2013 NVIDIA CORPORATION. All rights reserved.
+ * Copyright (C) 2011-2014 NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -395,7 +395,7 @@ static int tegra11x_pinmux_suspend(void)
tegra_soc_drive_pingroups[i].reg);
/* change to sleep pinmux settings */
- if (sleep_pinmux)
+ if (sleep_pinmux && sleep_pinmux_size > 0)
tegra_pinmux_config_table(sleep_pinmux, sleep_pinmux_size);
return 0;
}