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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux