can: mcp251xfd: regmap: optimizing transfer size for CRC transfers size 1

For CRC transfers with size 1 it is more efficient to use the
write_safe command instead of the write_crc command. This saves the
length byte on the SPI transfer.

changes since v1: https://lore.kernel.org/all/20230127124258.2764-1-thomas.kopp@microchip.com
- change logic to remove 1 level of indention

Link: https://lore.kernel.org/all/20230202141811.2581795-1-mkl@pengutronix.de
Signed-off-by: Thomas Kopp <thomas.kopp@microchip.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
Thomas Kopp 2023-01-27 13:42:58 +01:00 • committed by Marc Kleine-Budde
commit 2e8ca20b40
2 changed files with 36 additions and 8 deletions