summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhuvanchandra DV <bhuvanchandra.dv@toradex.com>2017-09-06 14:24:55 +0530
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-09-26 17:32:23 +0200
commit0cba15864f7a7011852472a6ff175ff420ec40d6 (patch)
tree365cb19d73f0b9c9965068343eebb4761670a738
parentd783b17fe2b01ca42068e43a9783e22aa53bb10d (diff)
ARM: mach-tegra: apalis_t30: integrate atmel mxt multitouch controller
Integrate Atmel MXT multitouch controller driver which is interfaced over I2C bus. The driver supports the 7" multitouch variant available from Logic Technologies. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--arch/arm/configs/apalis_t30_defconfig2
-rw-r--r--arch/arm/mach-tegra/board-apalis_t30.c21
2 files changed, 21 insertions, 2 deletions
diff --git a/arch/arm/configs/apalis_t30_defconfig b/arch/arm/configs/apalis_t30_defconfig
index f4490fcaa073..d6133579fbfe 100644
--- a/arch/arm/configs/apalis_t30_defconfig
+++ b/arch/arm/configs/apalis_t30_defconfig
@@ -198,6 +198,7 @@ CONFIG_INPUT_KEYRESET=y
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=m
CONFIG_TOUCHSCREEN_STMPE=y
CONFIG_TOUCHSCREEN_FUSION_F0710A=m
CONFIG_INPUT_MISC=y
@@ -372,7 +373,6 @@ CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_SQUASHFS=m
CONFIG_SQUASHFS_XATTR=y
-CONFIG_SQUASHFS_ZLIB=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
CONFIG_NFS_FS=y
diff --git a/arch/arm/mach-tegra/board-apalis_t30.c b/arch/arm/mach-tegra/board-apalis_t30.c
index c2e54e73b240..bfd9a5346f2c 100644
--- a/arch/arm/mach-tegra/board-apalis_t30.c
+++ b/arch/arm/mach-tegra/board-apalis_t30.c
@@ -16,6 +16,7 @@
#include <linux/i2c.h>
#include <linux/i2c-tegra.h>
#include <linux/input/fusion_F0710A.h>
+#include <linux/platform_data/atmel_mxt_ts.h>
#include <linux/input.h>
#include <linux/io.h>
#include <linux/leds.h>
@@ -476,7 +477,7 @@ static struct gpio apalis_t30_gpios[] = {
{APALIS_GPIO5, GPIOF_IN, "GPIO5 X1-9"},
#endif
#ifndef FORCE_OFF_GPIO
- {APALIS_GPIO6, GPIOF_IN, "GPIO6 X1-11"},
+ {APALIS_GPIO6, GPIOF_OUT_INIT_HIGH, "GPIO6 X1-11"},
#endif
/* GPIO7 is used by PCIe driver on Evaluation board */
/* {APALIS_GPIO7, GPIOF_IN, "GPIO7 X1-13"}, */
@@ -546,6 +547,18 @@ static int pinmux_fusion_pins(void)
return 0;
}
+/*
+ * Atmel touch screen GPIOs (using Toradex display/touch adapter)
+ * Apalis GPIO 5, MXM-11, Ixora X27-17, pen down interrupt
+ * Apalis GPIO 6, MXM-13, Ixora X27-18, reset
+ * gpio_request muxes the GPIO function automatically, we only have to make
+ * sure input/output muxing is done and the GPIO is freed here.
+ */
+static struct mxt_platform_data apalis_atmel_pdata = {
+ .suspend_mode = MXT_SUSPEND_T9_CTRL,
+ .irqflags = IRQF_TRIGGER_FALLING,
+};
+
/* I2C */
/* Make sure that the pinmuxing enable the 'open drain' feature for pins used
@@ -563,6 +576,12 @@ static struct i2c_board_info apalis_t30_i2c_bus1_board_info[] __initdata = {
I2C_BOARD_INFO("fusion_F0710A", 0x10),
.platform_data = &apalis_fusion_pdata,
},
+ {
+ /* Atmel MAX TS 7 multi-touch controller */
+ I2C_BOARD_INFO("atmel_mxt_ts", 0x4a),
+ .platform_data = &apalis_atmel_pdata,
+ .irq = TEGRA_GPIO_TO_IRQ( APALIS_GPIO5 ),
+ },
};
static struct tegra_i2c_platform_data apalis_t30_i2c1_platform_data = {