Message ID | 1486740584-17875-3-git-send-email-fisaksen@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Feb 10, 2017 at 04:29:38PM +0100, Frode Isaksen wrote: > if the channels are not defined in it. > > Signed-off-by: Fabien Parent <fparent@baylibre.com> > --- This patch doesn't have your signoff so I can't do anything with it, please see SubmittingPatches for details of what the signoff means and why it's important.
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 84c0d76..b7b2da1 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -389,6 +389,7 @@ static int davinci_spi_of_setup(struct spi_device *spi) { struct davinci_spi_config *spicfg = spi->controller_data; struct device_node *np = spi->dev.of_node; + struct davinci_spi *dspi = spi_master_get_devdata(spi->master); u32 prop; if (spicfg == NULL && np) { @@ -400,6 +401,9 @@ static int davinci_spi_of_setup(struct spi_device *spi) if (!of_property_read_u32(np, "ti,spi-wdelay", &prop)) spicfg->wdelay = (u8)prop; spi->controller_data = spicfg; + + if (dspi->dma_rx && dspi->dma_tx) + spicfg->io_type = SPI_IO_TYPE_DMA; } return 0;