summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-10-18 22:02:25 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:31 +0200
commit75b6f30a8dd474f212352f081061566ecbd952f1 (patch)
treecf9a1937f165c0fc2e2f4dd7eedca8a0298eb0ab
parentea17b3ec968115040e365eed245606426d310df5 (diff)
bu21013: Proper reset implementation during suspend and resume
Proper reset implementation during suspend and resume for BU21013 touch screen driver by initializing the reset gpio pin. ST-Ericsson Id: ER 334949 Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Change-Id: I75469d92cf0d49d75500e0e24d34ca0bb5de6311 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/20840 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r--drivers/input/touchscreen/bu21013_ts.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/bu21013_ts.c b/drivers/input/touchscreen/bu21013_ts.c
index c803af206cb..d6ae75865e4 100644
--- a/drivers/input/touchscreen/bu21013_ts.c
+++ b/drivers/input/touchscreen/bu21013_ts.c
@@ -213,6 +213,14 @@ static int bu21013_enable(struct bu21013_ts_data *pdata)
if (pdata->regulator)
regulator_enable(pdata->regulator);
+ if (pdata->chip->cs_en) {
+ retval = pdata->chip->cs_en(pdata->chip->cs_pin);
+ if (retval < 0) {
+ dev_err(&pdata->client->dev, "enable hw failed\n");
+ return retval;
+ }
+ }
+
if (pdata->ext_clk_state)
retval = bu21013_ext_clk(pdata, true, true);
else
@@ -242,6 +250,8 @@ static void bu21013_disable(struct bu21013_ts_data *pdata)
(void) bu21013_ext_clk(pdata, false, false);
disable_irq(pdata->chip->irq);
+ if (pdata->chip->cs_dis)
+ pdata->chip->cs_dis(pdata->chip->cs_pin);
if (pdata->regulator)
regulator_disable(pdata->regulator);
}