diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2010-06-30 14:51:09 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-07-03 13:13:20 -0700 |
commit | 447b9065b418cbeb6a03ebdcd08629ac26ed8e4a (patch) | |
tree | 815552189a433103ef1ded48700be528428b64fa /drivers/input/touchscreen/ad7879-spi.c | |
parent | 16ea10a7d557a0177cbbd716b4a06e5373d513ba (diff) | |
download | kernel_samsung_tuna-447b9065b418cbeb6a03ebdcd08629ac26ed8e4a.zip kernel_samsung_tuna-447b9065b418cbeb6a03ebdcd08629ac26ed8e4a.tar.gz kernel_samsung_tuna-447b9065b418cbeb6a03ebdcd08629ac26ed8e4a.tar.bz2 |
Input: ad7879 - fix spi word size to 16 bit
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen/ad7879-spi.c')
-rw-r--r-- | drivers/input/touchscreen/ad7879-spi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c index 9fa8e5d..59c6e68 100644 --- a/drivers/input/touchscreen/ad7879-spi.c +++ b/drivers/input/touchscreen/ad7879-spi.c @@ -134,6 +134,7 @@ 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) { @@ -141,6 +142,13 @@ static int __devinit ad7879_spi_probe(struct spi_device *spi) 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); |