summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2011-02-04 14:35:54 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-02-04 14:02:36 -0800
commit90e0104943940d9ad9b227f4598147e3faecbec8 (patch)
treecec9b6317702da63802e37137bc45e38e5404f54
parentb6b1f33f279fcb1c4a751f981153affa6469e94c (diff)
input: touch: fix suspend/resume of atmel maxtouchtegra-10.11.4tegra-10.11.3
Add support for atmel's maxtouch to enter/exit sleep mode BUG 788286 Change-Id: I4d043d4a19147dd11c426b13ac5ef6eea77fe820 Reviewed-on: http://git-master/r/18336 Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Robert R Collins <rcollins@nvidia.com>
-rwxr-xr-xdrivers/input/touchscreen/atmel_maxtouch.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/atmel_maxtouch.c b/drivers/input/touchscreen/atmel_maxtouch.c
index 44ef974575d1..94c778368956 100755
--- a/drivers/input/touchscreen/atmel_maxtouch.c
+++ b/drivers/input/touchscreen/atmel_maxtouch.c
@@ -1984,12 +1984,26 @@ static int __devexit mxt_remove(struct i2c_client *client)
}
#if defined(CONFIG_PM)
+static void mxt_start(struct mxt_data *mxt)
+{
+ mxt_write_byte(mxt->client,
+ MXT_BASE_ADDR(MXT_TOUCH_MULTITOUCHSCREEN_T9, mxt), 0x83);
+}
+
+static void mxt_stop(struct mxt_data *mxt)
+{
+ mxt_write_byte(mxt->client,
+ MXT_BASE_ADDR(MXT_TOUCH_MULTITOUCHSCREEN_T9, mxt), 0x0);
+}
+
static int mxt_suspend(struct i2c_client *client, pm_message_t mesg)
{
struct mxt_data *mxt = i2c_get_clientdata(client);
if (device_may_wakeup(&client->dev))
enable_irq_wake(mxt->irq);
+ else
+ mxt_stop(mxt);
return 0;
}
@@ -2000,6 +2014,8 @@ static int mxt_resume(struct i2c_client *client)
if (device_may_wakeup(&client->dev))
disable_irq_wake(mxt->irq);
+ else
+ mxt_start(mxt);
return 0;
}