From: root Date: Wed, 4 May 2011 10:05:55 +0000 (+0800) Subject: xxm FIH:update touchpanel(when resume from suspend,read register of touchpanel) X-Git-Tag: firefly_0821_release~10365 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b4c284eb830e9a4a06e294837110b0fcc4f6d7be;p=firefly-linux-kernel-4.4.55.git xxm FIH:update touchpanel(when resume from suspend,read register of touchpanel) --- diff --git a/drivers/input/touchscreen/atmel_maxtouch.c b/drivers/input/touchscreen/atmel_maxtouch.c index f8a21e398f1a..c2a5fc55cda8 100644 --- a/drivers/input/touchscreen/atmel_maxtouch.c +++ b/drivers/input/touchscreen/atmel_maxtouch.c @@ -2156,7 +2156,11 @@ static int __devexit mxt_remove(struct i2c_client *client) static int mxt_suspend(struct i2c_client *client, pm_message_t mesg) { struct mxt_data *mxt = i2c_get_clientdata(client); + char t7_buf[2] = {0, 0}; + printk("Enter:%s, %d\n", __FUNCTION__, __LINE__); + + mxt_write_block(client, MXT_BASE_ADDR(MXT_GEN_POWERCONFIG_T7, mxt), 2, t7_buf); if (device_may_wakeup(&client->dev)) enable_irq_wake(mxt->irq); @@ -2166,7 +2170,14 @@ static int mxt_suspend(struct i2c_client *client, pm_message_t mesg) static int mxt_resume(struct i2c_client *client) { struct mxt_data *mxt = i2c_get_clientdata(client); + char t5_buf[16]; + char t7_buf[2] = {32, 16}; + + printk("Enter:%s, %d\n", __FUNCTION__, __LINE__); + mxt_write_block(client, MXT_BASE_ADDR(MXT_GEN_POWERCONFIG_T7, mxt), 2, t7_buf); + mxt_read_block(client, MXT_BASE_ADDR(MXT_GEN_MESSAGEPROCESSOR_T5, mxt), 10, t5_buf); + if (device_may_wakeup(&client->dev)) disable_irq_wake(mxt->irq);