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 <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
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;