Thread (7 messages) 7 messages, 3 authors, 2012-01-30

[PATCH 4/4] input: mc13xxx_ts: intersperse delays between ts samples

flat view
STALE5379d

From: Marc Reilly <hidden>
Date: 2012-01-29 22:51:04
Also in: linux-input
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

The mc13xxx ICs have the ability to add a small delay in between each
sample taken in a set of TS samples. This allows time for the ts to be
biased correctly, and improved accuracy of raw readings.

Signed-off-by: Marc Reilly <redacted>
---
 drivers/input/touchscreen/mc13xxx_ts.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/mc13xxx_ts.c b/drivers/input/touchscreen/mc13xxx_ts.c
index 8924d66..f46e49d 100644
--- a/drivers/input/touchscreen/mc13xxx_ts.c
+++ b/drivers/input/touchscreen/mc13xxx_ts.c
@@ -197,9 +197,13 @@ static void mc13xxx_ts_work(struct work_struct *work)
 		container_of(work, struct mc13xxx_ts_priv, work.work);
 	unsigned int mode = MC13XXX_ADC_MODE_TS;
 	unsigned int channel = 12;
+	u32 adc1_mask = MC13XXX_ADC1_ATOX | MC13XXX_ADC1_ATO_MASK;
+	u32 adc1_val = MC13XXX_ADC1_ATOX | (3 << MC13XXX_ADC1_ATO_SHIFT);
 
-	if (mc13xxx_adc_do_conversion(priv->mc13xxx,
-				mode, channel, priv->sample) == 0) {
+	if (mc13xxx_adc_do_conversion_ex(priv->mc13xxx,
+				mode, channel, priv->sample,
+				0, 0,
+				adc1_mask, adc1_val) == 0) {
 		mc13xxx_ts_report_sample(priv);
 	} else {
 		dev_warn(&priv->idev->dev, "bad conversion");
-- 
1.7.3.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help