Index: arch/arm/mach-tegra/board-seaboard.c |
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c |
index 75fbab68ef61c0c117bb8dafa2aaca90947a860b..de272cc73794c6600994af3c0e834dd884f6b56b 100644 |
--- a/arch/arm/mach-tegra/board-seaboard.c |
+++ b/arch/arm/mach-tegra/board-seaboard.c |
@@ -303,6 +303,36 @@ static struct tegra_i2c_platform_data seaboard_dvc_platform_data = { |
.is_dvc = true, |
}; |
+/* for Cypress Trackpad. */ |
+#include <linux/cyapa.h> |
+ |
+static int cyapa_i2c_platform_init(void) |
+{ |
+ return 0; |
+} |
+ |
+static int cyapa_i2c_platform_wakeup(void) |
+{ |
+ return 0; |
+} |
+ |
+static struct cyapa_platform_data cyapa_i2c_platform_data = { |
+ .flag = 0, |
+ .gen = CYAPA_GEN2, |
+ .power_state = CYAPA_PWR_ACTIVE, |
+ .use_absolute_mode = false, |
+ .use_polling_mode = false, |
+ .polling_interval_time_active = CYAPA_ACTIVE_POLLING_INTVAL_TIME, |
+ .polling_interval_time_lowpower = CYAPA_LOWPOWER_POLLING_INTVAL_TIME, |
+ .active_touch_timeout = CYAPA_ACTIVE_TOUCH_TIMEOUT, |
+ .name = CYAPA_I2C_NAME, |
+ .irq_gpio = TEGRA_GPIO_CYTP_INT, |
+ .report_rate = CYAPA_REPORT_RATE, |
+ |
+ .wakeup = cyapa_i2c_platform_wakeup, |
+ .init = cyapa_i2c_platform_init, |
+}; |
+ |
static struct i2c_board_info __initdata seaboard_i2c0_devices[] = { |
{ |
I2C_BOARD_INFO("wm8903", 0x1a), |
@@ -311,6 +341,11 @@ static struct i2c_board_info __initdata seaboard_i2c0_devices[] = { |
I2C_BOARD_INFO("isl29018", 0x44), |
.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ), |
}, |
+ { |
+ I2C_BOARD_INFO(CYAPA_I2C_NAME, 0x67), |
+ .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CYTP_INT), |
+ .platform_data = &cyapa_i2c_platform_data, |
+ }, |
}; |
static struct i2c_board_info __initdata seaboard_i2c4_devices[] = { |
@@ -549,6 +584,11 @@ static void __init tegra_seaboard_init(void) |
tegra_gpio_enable(TEGRA_GPIO_LIDSWITCH); |
tegra_gpio_enable(TEGRA_GPIO_POWERKEY); |
+ |
+ /* for Cypress trackpad. */ |
+ tegra_gpio_enable(TEGRA_GPIO_CYTP_INT); |
+ gpio_request(TEGRA_GPIO_CYTP_INT, "gpio_cytp_int"); |
+ gpio_direction_input(TEGRA_GPIO_CYTP_INT); |
} |
MACHINE_START(SEABOARD, "seaboard") |