[PATCH] spi: sun6i: Set SPI mode in prepare_message
Mark Brown
broonie at kernel.org
Wed Apr 22 07:57:01 PDT 2026
On Mon, Apr 20, 2026 at 10:46:04AM -0600, Kevin Mehall wrote:
> With a GPIO chip select, CS is asserted before entering transfer_one.
> The spi-sun6i driver previously configured the SPI mode (including clock
> polarity) and enabled the bus in transfer_one, which can cause an
> extraneous SCK transition with CS asserted, corrupting the transferred
> data.
> This patch moves the SPI mode configuration and bus enable to the
> spi_prepare_message callback, ensuring that SCK is driven to the correct
> level prior to asserting CS.
> + /* We want to control the chip select manually */
> + reg |= SUN6I_TFR_CTL_CS_MANUAL;
> +
> + sun6i_spi_write(sspi, SUN6I_TFR_CTL_REG, reg);
Might this cause the native chip select to get asserted, we didn't set
up values so it'll have defaults if it wasn't previously configured?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260422/76bc9f1f/attachment.sig>
More information about the linux-arm-kernel
mailing list