From c130bdba585cff185919cc5c82c126fc58aab7a6 Mon Sep 17 00:00:00 2001 From: Satoru Takeuchi Date: Mon, 14 May 2007 23:52:07 -0400 Subject: Input: ucb1400_ts - use sched_setscheduler() Fix Philips UCB1400 driver to use sched_setscheduler() instead of setting the fields of task_struct directly. Signed-off-by: Satoru Takeuchi Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/ucb1400_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input/touchscreen') diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 6582816a0477..f0cbcdb008ed 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c @@ -288,9 +288,9 @@ static int ucb1400_ts_thread(void *_ucb) struct ucb1400 *ucb = _ucb; struct task_struct *tsk = current; int valid = 0; + struct sched_param param = { .sched_priority = 1 }; - tsk->policy = SCHED_FIFO; - tsk->rt_priority = 1; + sched_setscheduler(tsk, SCHED_FIFO, ¶m); while (!kthread_should_stop()) { unsigned int x, y, p; -- cgit v1.2.1 From bff0de5f59ff935138eb41c397a7e50468028b83 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Tue, 22 May 2007 23:28:40 -0400 Subject: Input: ads7846 - document that it handles tsc2046 too The TSC2046 is an updated version of the ADS7846 ... mention that in the Kconfig helptext and driver source. Signed-off-by: David Brownell Acked-by: Kevin Hilman Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/Kconfig | 8 ++++---- drivers/input/touchscreen/ads7846.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/input/touchscreen') diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 5e640aeb03cd..c0b36cc5ff0a 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -12,17 +12,17 @@ menuconfig INPUT_TOUCHSCREEN if INPUT_TOUCHSCREEN config TOUCHSCREEN_ADS7846 - tristate "ADS 7846/7843 based touchscreens" + tristate "ADS7846/TSC2046 and ADS7843 based touchscreens" depends on SPI_MASTER depends on HWMON = n || HWMON help Say Y here if you have a touchscreen interface using the - ADS7846 or ADS7843 controller, and your board-specific setup - code includes that in its table of SPI devices. + ADS7846/TSC2046 or ADS7843 controller, and your board-specific + setup code includes that in its table of SPI devices. If HWMON is selected, and the driver is told the reference voltage on your board, you will also get hwmon interfaces for the voltage - (and on ads7846, temperature) sensors of this chip. + (and on ads7846/tsc2046, temperature) sensors of this chip. If unsure, say N (but it's safe to say "Y"). diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 693e3b2a65a3..b0110fe65dae 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -39,6 +39,7 @@ /* * This code has been heavily tested on a Nokia 770, and lightly * tested on other ads7846 devices (OSK/Mistral, Lubbock). + * TSC2046 is just newer ads7846 silicon. * Support for ads7843 tested on Atmel at91sam926x-EK. * Support for ads7845 has only been stubbed in. * -- cgit v1.2.1 From 230ffc8e348e7841b79fd7c659d16aa5d7ec8a69 Mon Sep 17 00:00:00 2001 From: Semih Hazar Date: Tue, 22 May 2007 23:35:12 -0400 Subject: Input: ads7846 - SPI_CPHA mode bugfix In commit [1] the SPI mode is set to 1, but it should be 0. As stated in the commit, ads784x samples the data on the rising edge. SPI mode 1 samples on the falling edge [2] though. The root cause of this is a bug in the omap_uwire code, which treats CPHA=1 incorrectly; so these two bugs cancel each other out on one of the main regression test platforms for this driver. [1] kernel.org GIT 7937e86a70235e1584486654687dc9908a11e00a [2] http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus Signed-off-by: David Brownell Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/ads7846.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/touchscreen') diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index b0110fe65dae..1c9069cd3bae 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -848,7 +848,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) * may not. So we stick to very-portable 8 bit words, both RX and TX. */ spi->bits_per_word = 8; - spi->mode = SPI_MODE_1; + spi->mode = SPI_MODE_0; err = spi_setup(spi); if (err < 0) return err; -- cgit v1.2.1