소스 검색

Input: ad714xx-spi - force SPI bus into the default 8-bit mode

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Michael Hennerich 14 년 전
부모
커밋
5b9063b19c
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      drivers/input/misc/ad714x-spi.c

+ 6 - 0
drivers/input/misc/ad714x-spi.c

@@ -54,6 +54,12 @@ static int ad714x_spi_write(struct device *dev, unsigned short reg,
 static int __devinit ad714x_spi_probe(struct spi_device *spi)
 static int __devinit ad714x_spi_probe(struct spi_device *spi)
 {
 {
 	struct ad714x_chip *chip;
 	struct ad714x_chip *chip;
+	int err;
+
+	spi->bits_per_word = 8;
+	err = spi_setup(spi);
+	if (err < 0)
+		return err;
 
 
 	chip = ad714x_probe(&spi->dev, BUS_SPI, spi->irq,
 	chip = ad714x_probe(&spi->dev, BUS_SPI, spi->irq,
 			    ad714x_spi_read, ad714x_spi_write);
 			    ad714x_spi_read, ad714x_spi_write);