[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210511111330.GH4496@sirena.org.uk>
Date: Tue, 11 May 2021 12:13:30 +0100
From: Mark Brown <broonie@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Liguang Zhang <zhangliguang@...ux.alibaba.com>,
Jay Fang <f.fangjian@...wei.com>,
Sven Van Asbroeck <thesven73@...il.com>,
Xin Hao <xhao@...ux.alibaba.com>
Subject: Re: [PATCH v1 1/1] spi: Assume GPIO CS active high in ACPI case
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.
> 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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists