Re: [PATCH 2/4] spi: stm32: support per-transfer bits per word switching

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

 



On Thu, Mar 30, 2023 at 12:33:57PM +0200, Philipp Zabel wrote:
> Allow dynamically switching data size between transfers.
> 
> Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> ---
>  drivers/spi/stm32_spi.c | 50 ++++++++++++++++++++++++++++++++---------
>  1 file changed, 39 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
> index 0d7407c279a2..1ac86fbe11e6 100644
> --- a/drivers/spi/stm32_spi.c
> +++ b/drivers/spi/stm32_spi.c
[...]
> @@ -543,6 +570,7 @@ static int stm32_spi_probe(struct device *dev)
>  	master->transfer = stm32_spi_transfer;
>  	master->mem_ops = &stm32_spi_mem_ops;
>  
> +	master->bits_per_word_mask = stm32_spi_get_bpw_mask(priv);

This has to be moved down a few lines, after the clock is enabled and
the device is reset. I'll fix this in v2.

regards
Philipp




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux