* [PATCH] input: touchscreen: ad7879: Fix deficient device disable
@ 2011-08-02 12:46 michael.hennerich
2011-08-03 5:20 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: michael.hennerich @ 2011-08-02 12:46 UTC (permalink / raw)
To: dmitry.torokhov
Cc: linux-input, device-drivers-devel, drivers, Michael Hennerich
From: Michael Hennerich <michael.hennerich@analog.com>
Input close or device disable should not interact with the exported gpiolib
functionality. However that's the case. __ad7879_disable() clears the
entire AD7879_REG_CTRL2, while it should just power down the ADC and
its reference.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
drivers/input/touchscreen/ad7879.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index bc3b518..131f9d1 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -249,12 +249,14 @@ static void __ad7879_enable(struct ad7879 *ts)
static void __ad7879_disable(struct ad7879 *ts)
{
+ u16 reg = (ts->cmd_crtl2 & ~AD7879_PM(-1)) |
+ AD7879_PM(AD7879_PM_SHUTDOWN);
disable_irq(ts->irq);
if (del_timer_sync(&ts->timer))
ad7879_ts_event_release(ts);
- ad7879_write(ts, AD7879_REG_CTRL2, AD7879_PM(AD7879_PM_SHUTDOWN));
+ ad7879_write(ts, AD7879_REG_CTRL2, reg);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] input: touchscreen: ad7879: Fix deficient device disable
2011-08-02 12:46 [PATCH] input: touchscreen: ad7879: Fix deficient device disable michael.hennerich
@ 2011-08-03 5:20 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2011-08-03 5:20 UTC (permalink / raw)
To: michael.hennerich; +Cc: linux-input, device-drivers-devel, drivers
On Tue, Aug 02, 2011 at 02:46:45PM +0200, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
>
> Input close or device disable should not interact with the exported gpiolib
> functionality. However that's the case. __ad7879_disable() clears the
> entire AD7879_REG_CTRL2, while it should just power down the ADC and
> its reference.
>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Applied, thanks Michael.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-03 5:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-02 12:46 [PATCH] input: touchscreen: ad7879: Fix deficient device disable michael.hennerich
2011-08-03 5:20 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).