From: Markus Niebel <list-09_linux_input@tqsc.de>
To: michael.hennerich@analog.com
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: [PATCH] ads7846: enable usage of internal vref for AD7873
Date: Tue, 29 May 2012 17:22:31 +0200 [thread overview]
Message-ID: <4FC4E9B7.7050100@tqsc.de> (raw)
Touchscreen samples are taken in differential mode.
Therefore an external reference is not needed.
When working with internal vref disabling vref after
every touchscreen sample leads to settling effects in sampling
and errors in position data.
This patch disables the internal vref only if keep_vref_on us
is not set in platform_data.
Tested on i.MX35 with costum board
Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
---
drivers/input/touchscreen/ads7846.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index f02028e..b271633 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1001,15 +1001,14 @@ static void __devinit ads7846_setup_spi_msg(struct ads7846 *ts,
struct ads7846_packet *packet = ts->packet;
int vref = pdata->keep_vref_on;
- if (ts->model == 7873) {
+ if (ts->model == 7873)
/*
* The AD7873 is almost identical to the ADS7846
- * keep VREF off during differential/ratiometric
- * conversion modes.
+ * set VREF off during differential/ratiometric
+ * conversion modes if keep_vref_on is not set.
+ * TODO: does keep_vref_on collide with usage of external vref?
*/
ts->model = 7846;
- vref = 0;
- }
ts->msg_count = 1;
spi_message_init(m);
--
1.7.0.4
next reply other threads:[~2012-05-29 15:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 15:22 Markus Niebel [this message]
2012-05-30 12:45 ` [PATCH] ads7846: enable usage of internal vref for AD7873 Michael Hennerich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FC4E9B7.7050100@tqsc.de \
--to=list-09_linux_input@tqsc.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=michael.hennerich@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).