Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53392
b: refs/heads/master
c: 969111e
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Ferre authored and Dmitry Torokhov committed Mar 1, 2007
1 parent ffd1f95 commit e85c468
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bebb8a2bc180a4c920c57e89b2d713a34c1d096c
refs/heads/master: 969111e900226a8dbd1f596f34c09eecd20afc7d
28 changes: 15 additions & 13 deletions trunk/drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
/*
* This code has been heavily tested on a Nokia 770, and lightly
* tested on other ads7846 devices (OSK/Mistral, Lubbock).
* Support for ads7843 and ads7845 has only been stubbed in.
* Support for ads7843 tested on Atmel at91sam926x-EK.
* Support for ads7845 has only been stubbed in.
*
* IRQ handling needs a workaround because of a shortcoming in handling
* edge triggered IRQs on some platforms like the OMAP1/2. These
Expand Down Expand Up @@ -246,18 +247,16 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)

/* REVISIT: take a few more samples, and compare ... */

/* maybe off internal vREF */
if (use_internal) {
req->ref_off = REF_OFF;
req->xfer[4].tx_buf = &req->ref_off;
req->xfer[4].len = 1;
spi_message_add_tail(&req->xfer[4], &req->msg);

req->xfer[5].rx_buf = &req->scratch;
req->xfer[5].len = 2;
CS_CHANGE(req->xfer[5]);
spi_message_add_tail(&req->xfer[5], &req->msg);
}
/* converter in low power mode & enable PENIRQ */
req->ref_off = PWRDOWN;
req->xfer[4].tx_buf = &req->ref_off;
req->xfer[4].len = 1;
spi_message_add_tail(&req->xfer[4], &req->msg);

req->xfer[5].rx_buf = &req->scratch;
req->xfer[5].len = 2;
CS_CHANGE(req->xfer[5]);
spi_message_add_tail(&req->xfer[5], &req->msg);

ts->irq_disabled = 1;
disable_irq(spi->irq);
Expand Down Expand Up @@ -536,6 +535,9 @@ static void ads7846_rx(void *ads)
} else
Rt = 0;

if (ts->model == 7843)
Rt = ts->pressure_max / 2;

/* Sample found inconsistent by debouncing or pressure is beyond
* the maximum. Don't report it to user space, repeat at least
* once more the measurement
Expand Down

0 comments on commit e85c468

Please sign in to comment.