summaryrefslogtreecommitdiff
path: root/drivers/nfc/trf7970a.c
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2014-09-03 02:12:17 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-09-08 01:13:42 +0400
commit24707296c762d1828c4a51aa1872dc275dc3fccc (patch)
tree284cfa02797d75ef9a8eb0c2d101e2ed46b9dfda /drivers/nfc/trf7970a.c
parentcc8d7158644c439d946bfc65778a507b6f12b10d (diff)
downloadlinux-24707296c762d1828c4a51aa1872dc275dc3fccc.tar.xz
NFC: trf7970a: Call spi_setup() to configure SPI communication
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>
Diffstat (limited to 'drivers/nfc/trf7970a.c')
-rw-r--r--drivers/nfc/trf7970a.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index 509acac26afd..159b0a3f965b 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -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;