Re: [PATCH v2 03/13] spi: dw: Add support for Pensando Elba SoC SPI

From: Brad Larson
Date: Sun Aug 22 2021 - 21:25:50 EST


Hi Andy,

On Mon, Mar 29, 2021 at 3:43 AM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, Mar 29, 2021 at 5:01 AM Brad Larson <brad@xxxxxxxxxxx> wrote:
> >
> > The Pensando Elba SoC uses a GPIO based chip select
> > for two DW SPI busses with each bus having two
> > chip selects.
...
> > +static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable)
> > +{
> > + struct dw_spi *dws = spi_master_get_devdata(spi->master);
> > +
> > + if (!enable) {
>
> Can you use positive conditional?

This function has been re-written to use the existing dw_spi_set_cs().
This is what I currently plan for the v3 patchset.

static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable)
{
spi->chip_select = 0;
dw_spi_set_cs(spi, enable);
}

Regards,
Brad