Re: spi: spi-synquacer: fix set_cs handling

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

 



On Sun, Jan 24, 2021 at 04:17:55PM -0600, jassisinghbrar@xxxxxxxxx wrote:

> Respect the set_cs() request by actually flushing the FIFOs
> and start/stop the SPI instance.

set_cs() is a request to set the chip select not flush the FIFOs or
restart the hardware - what's the actual issue here?  Transfers should
happen in the transfer callback, the driver shouldn't be assuming there
is anything going on with chip select when completing transfers.

>  	struct synquacer_spi *sspi = spi_master_get_devdata(spi->master);
>  	u32 val;
>  
> +	if (!(spi->mode & SPI_CS_HIGH))
> +		enable = !enable;
> +

Let the core handle SET_CS_HIGH, this will double invert so is buggy.
It's also not called out in the changelog.

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