Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202196
b: refs/heads/master
c: 447b906
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Dmitry Torokhov committed Jul 3, 2010
1 parent 0e5181e commit ddfe317
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16ea10a7d557a0177cbbd716b4a06e5373d513ba
refs/heads/master: 447b9065b418cbeb6a03ebdcd08629ac26ed8e4a
8 changes: 8 additions & 0 deletions trunk/drivers/input/touchscreen/ad7879-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,21 @@ static const struct ad7879_bus_ops ad7879_spi_bus_ops = {
static int __devinit ad7879_spi_probe(struct spi_device *spi)
{
struct ad7879 *ts;
int err;

/* don't exceed max specified SPI CLK frequency */
if (spi->max_speed_hz > MAX_SPI_FREQ_HZ) {
dev_err(&spi->dev, "SPI CLK %d Hz?\n", spi->max_speed_hz);
return -EINVAL;
}

spi->bits_per_word = 16;
err = spi_setup(spi);
if (err) {
dev_dbg(&spi->dev, "spi master doesn't support 16 bits/word\n");
return err;
}

ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, &ad7879_spi_bus_ops);
if (IS_ERR(ts))
return PTR_ERR(ts);
Expand Down

0 comments on commit ddfe317

Please sign in to comment.