On Fri, Aug 01, 2014 at 07:40:32PM +0300, Grygorii Strashko wrote: > From: Murali Karicheri <m-karicheri2@xxxxxx> > > Currently driver supports only configuration of GPIO CS through > platform data. This patch enhances the driver to configure GPIO > CS through DT. Also update the DT binding documentation to > reflect the availability of cs-gpios. Ah, sorry - this is the unapplied patch from before. It would have been much better to submit this as the second patch after your rework patch since this... > - if (pdata->chip_sel && chip_sel < pdata->num_chipselect && > - pdata->chip_sel[chip_sel] != SPI_INTERN_CS) > + if (np && master->cs_gpios != NULL && spi->cs_gpio >= 0) { > + /* SPI core parse and update master->cs_gpio */ > gpio_chipsel = true; > + gpio = spi->cs_gpio; > + } else if (pdata->chip_sel && > + chip_sel < pdata->num_chipselect && > + pdata->chip_sel[chip_sel] != SPI_INTERN_CS) { > + /* platform data defines chip_sel */ > + gpio_chipsel = true; > + gpio = pdata->chip_sel[chip_sel]; > + } ...still looks excessively confusing - it is way more logic than I'd expect to see on every chip select.
Attachment:
signature.asc
Description: Digital signature