From: "Cliff Brake" <cliff.brake@gmail.com>
To: linux-input@atrey.karlin.mff.cuni.cz
Subject: [PATCH] UCB1400 add module parameters for settling delays
Date: Fri, 6 Apr 2007 18:04:14 -0400 [thread overview]
Message-ID: <f96d234e0704061504q84b7bc9pdf4178c32a55a549@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 316 bytes --]
This patch adds module parameters for several delay values used in the driver.
These delays need to vary based on the hardware design and how much capacitive
filtering there is on the touch panel inputs, and the resistance of the panel.
Thanks,
Cliff
--
=======================
Cliff Brake
http://bec-systems.com
[-- Attachment #2: ucb1400_ts_delay_attributes.patch --]
[-- Type: application/octet-stream, Size: 2422 bytes --]
This patch adds module parameters for several timing values used in the driver.
These values can vary based on the hardware design and how much capacitive
filtering there is on the touch panel inputs, and the resistance of the panel.
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
---
drivers/input/touchscreen/ucb1400_ts.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
base 100716c0f1cd4724b35e25b325ea5b3b07d12b75
last fe2614e9c3f181fd3f18b2ca6ef3952be8f93b47
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index e09f366b199342bcf5deb7508f7c87fbd31d4493..d94b2a31fb933e98324776d7260d7b3f746c0c59 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -97,6 +97,8 @@ struct ucb1400 {
};
static int adcsync;
+static int ts_delay_us = 55;
+static int ts_delay_pressure_us = 0;
static inline u16 ucb1400_reg_read(struct ucb1400 *ucb, u16 reg)
{
@@ -159,6 +161,7 @@ static inline unsigned int ucb1400_ts_read_pressure(struct ucb1400 *ucb)
UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW |
UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND |
UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
+ udelay(ts_delay_pressure_us);
return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY);
}
@@ -180,7 +183,7 @@ static inline unsigned int ucb1400_ts_read_xpos(struct ucb1400 *ucb)
UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
- udelay(55);
+ udelay(ts_delay_us);
return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY);
}
@@ -203,7 +206,7 @@ static inline unsigned int ucb1400_ts_read_ypos(struct ucb1400 *ucb)
UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
- udelay(55);
+ udelay(ts_delay_us);
return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPX);
}
@@ -572,6 +575,14 @@ static void __exit ucb1400_ts_exit(void)
}
module_param(adcsync, int, 0444);
+MODULE_PARM_DESC(adcsync, "set to 1 to synchronize touch readings with ADCSYNC pin");
+
+module_param(ts_delay_us, int, 0444);
+MODULE_PARM_DESC(ts_delay_us, "delay between panel setup and position read (us). Default = 55us.");
+
+module_param(ts_delay_pressure_us, int, 0444);
+MODULE_PARM_DESC(ts_delay_pressure_us,
+ "delay between panel setup and pressure read (us). Default = 0us.");
module_init(ucb1400_ts_init);
module_exit(ucb1400_ts_exit);
--
1.4.4.4
next reply other threads:[~2007-04-06 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-06 22:04 Cliff Brake [this message]
2007-04-10 5:01 ` [PATCH] UCB1400 add module parameters for settling delays Dmitry Torokhov
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=f96d234e0704061504q84b7bc9pdf4178c32a55a549@mail.gmail.com \
--to=cliff.brake@gmail.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
/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).