summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/rc5t583-regulator.c
diff options
context:
space:
mode:
authorLeonard Göhrs <l.goehrs@pengutronix.de>2023-03-10 10:20:53 +0100
committerMark Brown <broonie@kernel.org>2023-03-16 13:10:56 +0000
commit1e4929112507f145951f4c356161ab80ad9c1f0e (patch)
tree13269a58723836fd1e938a9b4899c15195481b2a /drivers/regulator/rc5t583-regulator.c
parent027781f3920ad16f40133890fc87247b8baa2d8d (diff)
downloadlinux-stable-1e4929112507f145951f4c356161ab80ad9c1f0e.tar.gz
linux-stable-1e4929112507f145951f4c356161ab80ad9c1f0e.tar.bz2
linux-stable-1e4929112507f145951f4c356161ab80ad9c1f0e.zip
spi: stm32: split large transfers based on word size instead of bytes
The TSIZE register in CR2, to which the number of words to transfer is written, is only 16 Bit. This limits transfers to 65535 SPI _words_ at a time. The existing code uses spi_split_transfers_maxsize to limit transfers to 65535 _bytes_ at a time. This breaks large transfers with bits_per_word > 8, as they are split inside of a word boundary by the odd size limit. Split transfers based on the number of words instead. This has the added benefit of not artificially limiting the maximum length of bpw > 8 transfers to half or a quarter of the actual limit. The combination of very large transfers and bits_per_word = 16 is triggered e.g. by MIPI DBI displays when updating large parts of the screen. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de> Acked-by: Alain Volmat <alain.volmat@foss.st.com> Link: https://lore.kernel.org/r/20230310092053.1006459-2-l.goehrs@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/rc5t583-regulator.c')
0 files changed, 0 insertions, 0 deletions