提交 447b9065 编写于 作者: M Michael Hennerich 提交者: Dmitry Torokhov

Input: ad7879 - fix spi word size to 16 bit

Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 16ea10a7
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册