summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2017-12-21 15:05:32 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-22 14:31:46 +0100
commit8e1745b5e506ddae43a4d8bb8cadbd0cb5e3d8a0 (patch)
tree145f25b54334c3bee12c454ad68f7521c4757575
parent55c0858aeac78f4d4b088d8380ae98605fc02137 (diff)
Adds compile time option to enable support for Toradex Capacitive Touch Adapter. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20-pinmux.c5
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20.c4
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20.h4
-rw-r--r--arch/arm/mach-tegra/board-colibri_t30.c9
-rw-r--r--arch/arm/mach-tegra/board-colibri_t30.h4
5 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t20-pinmux.c b/arch/arm/mach-tegra/board-colibri_t20-pinmux.c
index d6c8bb9872a2..4739f1ede095 100644
--- a/arch/arm/mach-tegra/board-colibri_t20-pinmux.c
+++ b/arch/arm/mach-tegra/board-colibri_t20-pinmux.c
@@ -382,8 +382,13 @@ int __init colibri_t20_pinmux_init(void)
gpio_request(TEGRA_GPIO_PT6, "GMI_WR_N on 93 RDnWR");
gpio_direction_output(TEGRA_GPIO_PT6, 0);
+#ifdef USE_CAPACITIVE_TOUCH_ADAPTER
+ gpio_request(TEGRA_GPIO_PA6, "Capacitive Touch Reset");
+ gpio_direction_output(TEGRA_GPIO_PA6, 1);
+#else
gpio_request(TEGRA_GPIO_PK4, "Capacitive Touch Reset");
gpio_direction_output(TEGRA_GPIO_PK4, 1);
+#endif
return 0;
}
diff --git a/arch/arm/mach-tegra/board-colibri_t20.c b/arch/arm/mach-tegra/board-colibri_t20.c
index d55867883ada..71892627b587 100644
--- a/arch/arm/mach-tegra/board-colibri_t20.c
+++ b/arch/arm/mach-tegra/board-colibri_t20.c
@@ -666,7 +666,11 @@ static struct i2c_board_info colibri_t20_i2c_bus1_board_info[] __initdata = {
/* Atmel MAX TS 7 multi-touch controller */
I2C_BOARD_INFO("atmel_mxt_ts", 0x4a),
.platform_data = &colibri_atmel_pdata,
+#ifdef USE_CAPACITIVE_TOUCH_ADAPTER
+ .irq = TEGRA_GPIO_TO_IRQ( TEGRA_GPIO_PB5 ),
+#else
.irq = TEGRA_GPIO_TO_IRQ( TEGRA_GPIO_PK3 ),
+#endif
},
};
diff --git a/arch/arm/mach-tegra/board-colibri_t20.h b/arch/arm/mach-tegra/board-colibri_t20.h
index 020670d424fd..8240940e79d2 100644
--- a/arch/arm/mach-tegra/board-colibri_t20.h
+++ b/arch/arm/mach-tegra/board-colibri_t20.h
@@ -80,6 +80,10 @@
#define TPS6586X_INT_BASE TEGRA_NR_IRQS
#define TPS6586X_INT_END (TPS6586X_INT_BASE + 32)
+/* Uncoment line bellow to enable support for
+ * Capacitive Touch Adapter */
+//#define USE_CAPACITIVE_TOUCH_ADAPTER
+
int colibri_t20_emc_init(void);
int colibri_t20_panel_init(void);
int colibri_t20_pinmux_init(void);
diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index 6014b62e62a8..8c77150c16c2 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -640,7 +640,11 @@ static struct i2c_board_info colibri_t30_i2c_bus1_board_info[] __initdata = {
/* Atmel MAX TS 7 multi-touch controller */
I2C_BOARD_INFO("atmel_mxt_ts", 0x4a),
.platform_data = &colibri_atmel_pdata,
+#ifdef USE_CAPACITIVE_TOUCH_ADAPTER
+ .irq = TEGRA_GPIO_TO_IRQ( TEGRA_GPIO_PB5 ),
+#else
.irq = TEGRA_GPIO_TO_IRQ( TEGRA_GPIO_PR4 ),
+#endif
},
};
@@ -1791,8 +1795,13 @@ static void __init colibri_t30_init(void)
gpio_direction_output(EN_MIC_GND, 1);
/* Release touch controller reset */
+#ifdef USE_CAPACITIVE_TOUCH_ADAPTER
+ gpio_request(TEGRA_GPIO_PA6, "Capacitive Touch Reset");
+ gpio_direction_output(TEGRA_GPIO_PA6, 1);
+#else
gpio_request(TEGRA_GPIO_PR7, "Capacitive Touch Reset");
gpio_direction_output(TEGRA_GPIO_PR7, 1);
+#endif
tegra_soc_device_init("Colibri T30");
}
diff --git a/arch/arm/mach-tegra/board-colibri_t30.h b/arch/arm/mach-tegra/board-colibri_t30.h
index 94179b4938b1..afb96a6aa0b1 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.h
+++ b/arch/arm/mach-tegra/board-colibri_t30.h
@@ -102,6 +102,10 @@
#define TPS6591X_IRQ_BASE STMPE811_IRQ_END
#define TPS6591X_IRQ_END (TPS6591X_IRQ_BASE + 18)
+/* Uncoment line bellow to enable support for
+ * Capacitive Touch Adapter */
+//#define USE_CAPACITIVE_TOUCH_ADAPTER
+
int colibri_t30_regulator_init(void);
int colibri_t30_suspend_init(void);
int colibri_t30_pinmux_init(void);