summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-apalis_t30-power.c19
-rw-r--r--arch/arm/mach-tegra/board-apalis_t30.c2
-rw-r--r--arch/arm/mach-tegra/board-apalis_t30.h2
3 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-apalis_t30-power.c b/arch/arm/mach-tegra/board-apalis_t30-power.c
index 7b2744a0fe8b..064c438b4b64 100644
--- a/arch/arm/mach-tegra/board-apalis_t30-power.c
+++ b/arch/arm/mach-tegra/board-apalis_t30-power.c
@@ -246,7 +246,11 @@ static struct tps6591x_platform_data tps_platform = {
.gpio_base = TPS6591X_GPIO_BASE,
.dev_slp_en = true,
.slp_keepon = &tps_slp_keepon,
+#ifdef FORCE_OFF_GPIO
+ .use_power_off = false,
+#else
.use_power_off = true,
+#endif
};
static struct i2c_board_info __initdata apalis_t30_regulators[] = {
@@ -418,6 +422,13 @@ static struct platform_device *fixed_reg_devs_apalis_t30[] = {
ADD_FIXED_REG(v3_3),
};
+#ifdef FORCE_OFF_GPIO
+static void apalis_t30_power_off(void)
+{
+ gpio_set_value(FORCE_OFF_GPIO, 0);
+}
+#endif /* FORCE_OFF_GPIO */
+
int __init apalis_t30_regulator_init(void)
{
void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
@@ -442,6 +453,14 @@ int __init apalis_t30_regulator_init(void)
pr_info("Registering the device TPS62360\n");
i2c_register_board_info(4, tps6236x_boardinfo, 1);
+#ifdef FORCE_OFF_GPIO
+ if (!pm_power_off) {
+ gpio_request(FORCE_OFF_GPIO, "FORCE_OFF_N");
+ gpio_direction_output(FORCE_OFF_GPIO, 1);
+ pm_power_off = apalis_t30_power_off;
+ }
+#endif /* FORCE_OFF_GPIO */
+
return 0;
}
diff --git a/arch/arm/mach-tegra/board-apalis_t30.c b/arch/arm/mach-tegra/board-apalis_t30.c
index f119ec7724df..a114e4773e12 100644
--- a/arch/arm/mach-tegra/board-apalis_t30.c
+++ b/arch/arm/mach-tegra/board-apalis_t30.c
@@ -366,7 +366,9 @@ static struct gpio apalis_t30_gpios[] = {
{APALIS_GPIO3, GPIOF_IN, "GPIO3 X1-5"},
{APALIS_GPIO4, GPIOF_IN, "GPIO4 X1-7"},
{APALIS_GPIO5, GPIOF_IN, "GPIO5 X1-9"},
+#ifndef FORCE_OFF_GPIO
{APALIS_GPIO6, GPIOF_IN, "GPIO6 X1-11"},
+#endif
/* GPIO7 is used by PCIe driver on Evaluation board */
/* {APALIS_GPIO7, GPIOF_IN, "GPIO7 X1-13"}, */
{APALIS_GPIO8, GPIOF_IN, "GPIO8 X1-15, FAN"},
diff --git a/arch/arm/mach-tegra/board-apalis_t30.h b/arch/arm/mach-tegra/board-apalis_t30.h
index 9fde9ef1d89e..a62bab002ae0 100644
--- a/arch/arm/mach-tegra/board-apalis_t30.h
+++ b/arch/arm/mach-tegra/board-apalis_t30.h
@@ -26,6 +26,8 @@
#include <mach/gpio.h>
#include <mach/irqs.h>
+//#define FORCE_OFF_GPIO APALIS_GPIO6
+
/* GPIO */
#define APALIS_GPIO1 TEGRA_GPIO_PS2