[ARM]:tegra: add touch uC suspend function to toggle wake-line
authormakarand.karvekar <makarand.karvekar@motorola.com>
Tue, 2 Nov 2010 16:37:47 +0000 (11:37 -0500)
committerBenoit Goby <benoit@android.com>
Fri, 5 Nov 2010 22:11:50 +0000 (15:11 -0700)
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
arch/arm/mach-tegra/board-stingray-touch.c

index 01d0b18998dda54111cc2a769957fbbdbf88e682..e50aabe73d33cd238a77b9f6f459b44dee1e715a 100644 (file)
@@ -47,6 +47,13 @@ static int stingray_touch_reset(void)
        return 0;
 }
 
+static int stingray_touch_suspend(int enable)
+{
+       gpio_set_value(STINGRAY_TOUCH_WAKE_N_GPIO, enable);
+       msleep(20);
+       return 0;
+}
+
 /* mortable M1 */
 struct qtouch_ts_platform_data stingray_touch_data_m1 = {
 
@@ -248,6 +255,7 @@ struct qtouch_ts_platform_data stingray_touch_data_p0 = {
        .fuzz_w                 = 2,
        .boot_i2c_addr  = XMEGAT_BL_I2C_ADDR,
        .hw_reset               = stingray_touch_reset,
+       .hw_suspend             = stingray_touch_suspend,
        .key_array = {
                .cfg            = NULL,
                .keys           = NULL,
@@ -429,6 +437,7 @@ struct qtouch_ts_platform_data stingray_touch_data_p1_or_later = {
        .fuzz_w                 = 2,
        .boot_i2c_addr  = XMEGAT_BL_I2C_ADDR,
        .hw_reset               = stingray_touch_reset,
+       .hw_suspend             = stingray_touch_suspend,
        .key_array = {
                .cfg            = NULL,
                .keys           = NULL,