NFC: trf7970a: Call spi_setup() to configure SPI communication
authorMark A. Greer <mgreer@animalcreek.com>
Tue, 2 Sep 2014 22:12:17 +0000 (15:12 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 7 Sep 2014 21:13:42 +0000 (23:13 +0200)
Call spi_setup() to configure SPI communication
with the trf7970a.  This will ensure that the
correct SPI parameters are used.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/trf7970a.c

index 509acac26afd84b1fb444734de30e6b08a547a39..159b0a3f965b2beb3bfe57946ce777d9e02bd882 100644 (file)
@@ -1272,6 +1272,12 @@ static int trf7970a_probe(struct spi_device *spi)
        spi->mode = SPI_MODE_1;
        spi->bits_per_word = 8;
 
+       ret = spi_setup(spi);
+       if (ret < 0) {
+               dev_err(trf->dev, "Can't set up SPI Communication\n");
+               return ret;
+       }
+
        if (of_property_read_bool(np, "irq-status-read-quirk"))
                trf->quirks |= TRF7970A_QUIRK_IRQ_STATUS_READ;