summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-colibri_t20.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/board-colibri_t20.c')
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t20.c b/arch/arm/mach-tegra/board-colibri_t20.c
index 05075d385374..edf1e72d3cc1 100644
--- a/arch/arm/mach-tegra/board-colibri_t20.c
+++ b/arch/arm/mach-tegra/board-colibri_t20.c
@@ -122,6 +122,9 @@ static struct tegra_clk_init_table colibri_t20_clk_init_table[] __initdata = {
#define FF_DCD TEGRA_GPIO_PC6 /* SODIMM 31 */
#define FF_DSR TEGRA_GPIO_PC1 /* SODIMM 29 */
+#define FUSION_PEN_DOWN TEGRA_GPIO_PL1 /* SODIMM 103 */
+#define FUSION_RESET TEGRA_GPIO_PL0 /* SODIMM 101 */
+
#define I2C_SCL TEGRA_GPIO_PC4 /* SODIMM 196 */
#define I2C_SDA TEGRA_GPIO_PC5 /* SODIMM 194 */
@@ -180,11 +183,14 @@ static struct gpio colibri_t20_gpios[] = {
{TEGRA_GPIO_PK4, GPIOF_IN, "SODIMM pin 106"},
// {TEGRA_GPIO_PK5, GPIOF_IN, "USBC_DET"},
#ifndef CONFIG_KEYBOARD_GPIO
+//conflicts with menu key
{TEGRA_GPIO_PK6, GPIOF_IN, "SODIMM pin 135"},
#endif
#ifndef COLIBRI_T20_VI
+#ifndef CONFIG_TOUCHSCREEN_FUSION_F0710A
{TEGRA_GPIO_PL0, GPIOF_IN, "SOD-101, Iris X16-16"},
{TEGRA_GPIO_PL1, GPIOF_IN, "SOD-103, Iris X16-15"},
+#endif /* !CONFIG_TOUCHSCREEN_FUSION_F0710A */
//conflicts with Ethernet interrupt on Protea
{TEGRA_GPIO_PL2, GPIOF_IN, "SODI-79, Iris X16-19"},
{TEGRA_GPIO_PL3, GPIOF_IN, "SODI-97, Iris X16-17"},
@@ -282,6 +288,12 @@ static struct i2c_board_info colibri_t20_i2c_bus1_board_info[] __initdata = {
I2C_BOARD_INFO("rtc-ds1307", 0x68),
.type = "m41t00",
},
+#ifdef CONFIG_TOUCHSCREEN_FUSION_F0710A
+ {
+ /* TouchRevolution Fusion 7 and 10 multi-touch controller */
+ I2C_BOARD_INFO("fusion_F0710A", 0x10),
+ },
+#endif /* CONFIG_TOUCHSCREEN_FUSION_F0710A */
#ifdef CONFIG_VIDEO_ADV7180
{
I2C_BOARD_INFO("adv7180", 0x21),
@@ -358,8 +370,32 @@ static void colibri_t20_i2c_init(void)
platform_device_register(&tegra_i2c_device2);
platform_device_register(&tegra_i2c_device4);
- i2c_register_board_info(0, colibri_t20_i2c_bus1_board_info, ARRAY_SIZE(colibri_t20_i2c_bus1_board_info));
- i2c_register_board_info(4, colibri_t20_i2c_bus4_board_info, ARRAY_SIZE(colibri_t20_i2c_bus4_board_info));
+#ifdef CONFIG_TOUCHSCREEN_FUSION_F0710A
+ if ((gpio_request(FUSION_PEN_DOWN, "103, Iris X16-15 Pen") == 0) &&
+ (gpio_direction_input(FUSION_PEN_DOWN) == 0)) {
+ gpio_export(FUSION_PEN_DOWN, 0);
+ } else {
+ printk(KERN_ERR "Could not obtain GPIO for Fusion pen down\n");
+ return;
+ }
+
+ if ((gpio_request(FUSION_RESET, "101, Iris X16-16 RST") == 0) &&
+ (gpio_direction_output(FUSION_RESET, 1) == 0)) {
+ gpio_direction_output(FUSION_RESET, 0);
+ mdelay(10);
+ gpio_direction_output(FUSION_RESET, 1);
+ } else {
+ printk(KERN_ERR "Could not obtain GPIO for Fusion reset\n");
+ return;
+ }
+
+ colibri_t20_i2c_bus1_board_info[1].irq = gpio_to_irq(FUSION_PEN_DOWN);
+#endif /* CONFIG_TOUCHSCREEN_FUSION_F0710A */
+
+ i2c_register_board_info(0, colibri_t20_i2c_bus1_board_info,
+ ARRAY_SIZE(colibri_t20_i2c_bus1_board_info));
+ i2c_register_board_info(4, colibri_t20_i2c_bus4_board_info,
+ ARRAY_SIZE(colibri_t20_i2c_bus4_board_info));
}
/* Keys