diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2014-02-04 10:37:42 +0100 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2014-02-04 10:37:42 +0100 |
commit | 54d1c20e1b2486164a7afab44fd6dff37b1b38f3 (patch) | |
tree | 296752927f6955d83b0f5a638bab7867c696484f /arch/arm | |
parent | 81465d86db70e169edb1dc59b0d6bc7a34cd13c7 (diff) |
apalis_t30: add Fusion touchscreen driver
Activate Fusion touchscreen driver. Use GPIO 5/6 as pen down/reset
GPIO and provide a helper function to free the GPIO before the
driver requests them.
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/configs/apalis_t30_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-apalis_t30.c | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/configs/apalis_t30_defconfig b/arch/arm/configs/apalis_t30_defconfig index ee513a932fc9..d1c2e57384a9 100644 --- a/arch/arm/configs/apalis_t30_defconfig +++ b/arch/arm/configs/apalis_t30_defconfig @@ -204,6 +204,7 @@ CONFIG_KEYBOARD_GPIO=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_TOUCHSCREEN_FUSION_F0710A=m CONFIG_INPUT_MISC=y CONFIG_INPUT_UINPUT=y CONFIG_INPUT_GPIO=y diff --git a/arch/arm/mach-tegra/board-apalis_t30.c b/arch/arm/mach-tegra/board-apalis_t30.c index 87a4b1a975a3..f7340b91eb8d 100644 --- a/arch/arm/mach-tegra/board-apalis_t30.c +++ b/arch/arm/mach-tegra/board-apalis_t30.c @@ -40,6 +40,7 @@ #include <media/soc_camera.h> #include <media/tegra_v4l2_camera.h> +#include <linux/input/fusion_F0710A.h> #include "board-apalis_t30.h" #include "board.h" @@ -272,6 +273,30 @@ static void apalis_t30_gpio_init(void) } } + +/* + * Fusion touch screen GPIOs (using Toradex display/touch adapater) + * 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 int pinmux_fusion_pins(void); + +static struct fusion_f0710a_init_data apalis_fusion_pdata = { + .pinmux_fusion_pins = &pinmux_fusion_pins, + .gpio_int = APALIS_GPIO5, /* MXM-11, Pen down interrupt */ + .gpio_reset = APALIS_GPIO6, /* MXM-13, Reset interrupt */ +}; + +static int pinmux_fusion_pins(void) +{ + gpio_free(apalis_fusion_pdata.gpio_int); + gpio_free(apalis_fusion_pdata.gpio_reset); + apalis_fusion_pdata.pinmux_fusion_pins = NULL; + return 0; +} + /* I2C */ /* Make sure that the pinmuxing enable the 'open drain' feature for pins used @@ -284,6 +309,11 @@ static struct i2c_board_info apalis_t30_i2c_bus1_board_info[] __initdata = { I2C_BOARD_INFO("rtc-ds1307", 0x68), .type = "m41t00", }, + { + /* TouchRevolution Fusion 7 and 10 multi-touch controller */ + I2C_BOARD_INFO("fusion_F0710A", 0x10), + .platform_data = &apalis_fusion_pdata, + }, }; static struct tegra_i2c_platform_data apalis_t30_i2c1_platform_data = { |