Re: [PATCH v1 1/1] spi: Assume GPIO CS active high in ACPI case

From: Andy Shevchenko
Date: Tue May 11 2021 - 08:55:42 EST


On Tue, May 11, 2021 at 12:13:30PM +0100, Mark Brown wrote:
> On Mon, May 10, 2021 at 05:10:22PM +0300, Andy Shevchenko wrote:
>
> > + bool value = has_acpi_companion(&spi->dev) ? !enable : activate;
>
> Please write normal conditional statements to improve legibility.

OK!

> > if (spi->cs_gpiod)
> > - /* polarity handled by gpiolib */
> > - gpiod_set_value_cansleep(spi->cs_gpiod, activate);
> > + /* Polarity handled by GPIO library */
> > + gpiod_set_value_cansleep(spi->cs_gpiod, value);
> > else
> > /*
> > - * invert the enable line, as active low is
> > + * Invert the enable line, as active low is
> > * default for SPI.
>
> The change would be clearer with the documentation formatting changes
> split out from the rest of it.

Will remove these changes from a fix in v2.

P.S> something is odd about the series I have submitted, i.e. half of the
patches simply didn't make it. I would wait with any new submission until it
will be clarified, otherwise it's a chance to miss more patches without any
reason why.

--
With Best Regards,
Andy Shevchenko