Message ID | 20210824104041.708945-3-tanureal@opensource.cirrus.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Improve support for AMD SPI controllers | expand |
On Tue, Aug 24, 2021 at 11:40:34AM +0100, Lucas Tanure wrote: > Create a flag for a controller that has an automatic cs selection and > can't hold cs activated between transfers > Some messages send address and data split between two transfers, see > regmap-spi, and without the cs held the data loses it`s meaning These controllers just plain can't support multiple transfers in any useful fashion, the flag name should reflect that as well as being a bit less long for legibility reasons.
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 8371bca13729..f5b55c237634 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -514,6 +514,7 @@ struct spi_controller { #define SPI_CONTROLLER_MUST_TX BIT(4) /* requires tx */ #define SPI_MASTER_GPIO_SS BIT(5) /* GPIO CS must select slave */ +#define SPI_CONTROLLER_CS_PER_TRANSFER BIT(6) /* SPI controller can not hold CS between transfers */ /* flag indicating if the allocation of this struct is devres-managed */ bool devm_allocated;
Create a flag for a controller that has an automatic cs selection and can't hold cs activated between transfers Some messages send address and data split between two transfers, see regmap-spi, and without the cs held the data loses it`s meaning Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> --- include/linux/spi/spi.h | 1 + 1 file changed, 1 insertion(+)