diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:13:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:16:12 -0400 |
commit | a3d52136ee8f7399859f9a0824470fd49b1d1a00 (patch) | |
tree | ac0fd3d1efc356029cbbc5e413f778f7231cd909 /drivers/input/touchscreen/ads7846.c | |
parent | 5b339915762d30b21995aa7263e74081f2f1110a (diff) | |
parent | 84767d00a8fd54dd97866561f6e2ee246c8e1cdc (diff) |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (65 commits)
Input: gpio_keys - add support for switches (EV_SW)
Input: cobalt_btns - convert to use polldev library
Input: add skeleton for simple polled devices
Input: update some documentation
Input: wistron - fix typo in keymap for Acer TM610
Input: add input_set_capability() helper
Input: i8042 - add Fujitsu touchscreen/touchpad PNP IDs
Input: i8042 - add Panasonic CF-29 to nomux list
Input: lifebook - split into 2 devices
Input: lifebook - add signature of Panasonic CF-29
Input: lifebook - activate 6-byte protocol on select models
Input: lifebook - work properly on Panasonic CF-18
Input: cobalt buttons - separate device and driver registration
Input: ati_remote - make button repeat sensitivity configurable
Input: pxa27x - do not use deprecated SA_INTERRUPT flag
Input: ucb1400 - make delays configurable
Input: misc devices - switch to using input_dev->dev.parent
Input: joysticks - switch to using input_dev->dev.parent
Input: touchscreens - switch to using input_dev->dev.parent
Input: mice - switch to using input_dev->dev.parent
...
Fixed up conflicts with core device model removal of "struct subsystem" manually.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 0a26e0663542..693e3b2a65a3 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -39,7 +39,8 @@ | |||
39 | /* | 39 | /* |
40 | * This code has been heavily tested on a Nokia 770, and lightly | 40 | * This code has been heavily tested on a Nokia 770, and lightly |
41 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). | 41 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). |
42 | * Support for ads7843 and ads7845 has only been stubbed in. | 42 | * Support for ads7843 tested on Atmel at91sam926x-EK. |
43 | * Support for ads7845 has only been stubbed in. | ||
43 | * | 44 | * |
44 | * IRQ handling needs a workaround because of a shortcoming in handling | 45 | * IRQ handling needs a workaround because of a shortcoming in handling |
45 | * edge triggered IRQs on some platforms like the OMAP1/2. These | 46 | * edge triggered IRQs on some platforms like the OMAP1/2. These |
@@ -246,18 +247,16 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
246 | 247 | ||
247 | /* REVISIT: take a few more samples, and compare ... */ | 248 | /* REVISIT: take a few more samples, and compare ... */ |
248 | 249 | ||
249 | /* maybe off internal vREF */ | 250 | /* converter in low power mode & enable PENIRQ */ |
250 | if (use_internal) { | 251 | req->ref_off = PWRDOWN; |
251 | req->ref_off = REF_OFF; | 252 | req->xfer[4].tx_buf = &req->ref_off; |
252 | req->xfer[4].tx_buf = &req->ref_off; | 253 | req->xfer[4].len = 1; |
253 | req->xfer[4].len = 1; | 254 | spi_message_add_tail(&req->xfer[4], &req->msg); |
254 | spi_message_add_tail(&req->xfer[4], &req->msg); | 255 | |
255 | 256 | req->xfer[5].rx_buf = &req->scratch; | |
256 | req->xfer[5].rx_buf = &req->scratch; | 257 | req->xfer[5].len = 2; |
257 | req->xfer[5].len = 2; | 258 | CS_CHANGE(req->xfer[5]); |
258 | CS_CHANGE(req->xfer[5]); | 259 | spi_message_add_tail(&req->xfer[5], &req->msg); |
259 | spi_message_add_tail(&req->xfer[5], &req->msg); | ||
260 | } | ||
261 | 260 | ||
262 | ts->irq_disabled = 1; | 261 | ts->irq_disabled = 1; |
263 | disable_irq(spi->irq); | 262 | disable_irq(spi->irq); |
@@ -536,6 +535,9 @@ static void ads7846_rx(void *ads) | |||
536 | } else | 535 | } else |
537 | Rt = 0; | 536 | Rt = 0; |
538 | 537 | ||
538 | if (ts->model == 7843) | ||
539 | Rt = ts->pressure_max / 2; | ||
540 | |||
539 | /* Sample found inconsistent by debouncing or pressure is beyond | 541 | /* Sample found inconsistent by debouncing or pressure is beyond |
540 | * the maximum. Don't report it to user space, repeat at least | 542 | * the maximum. Don't report it to user space, repeat at least |
541 | * once more the measurement | 543 | * once more the measurement |
@@ -897,7 +899,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
897 | 899 | ||
898 | input_dev->name = "ADS784x Touchscreen"; | 900 | input_dev->name = "ADS784x Touchscreen"; |
899 | input_dev->phys = ts->phys; | 901 | input_dev->phys = ts->phys; |
900 | input_dev->cdev.dev = &spi->dev; | 902 | input_dev->dev.parent = &spi->dev; |
901 | 903 | ||
902 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 904 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
903 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 905 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |