]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: mt65xx: add dual and quad mode for standard spi device
authorTim Kuo <Tim.Kuo@mediatek.com>
Wed, 17 Sep 2025 05:58:39 +0000 (13:58 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 17 Sep 2025 11:53:47 +0000 (12:53 +0100)
commitab63e9910d2d3ea4b8e6c08812258a676defcb9c
tree3d2e7b61cc0124bcae5f66e7913f1b2299a7c4f4
parentb28a55db452edb1d997edee723d8dcbef7f065a3
spi: mt65xx: add dual and quad mode for standard spi device

Mediatek SPI hardware natively supports dual and quad modes, and these
modes are already enabled for SPI flash devices under spi-mem framework
in MTK SPI controller spi-mt65xx. However, other SPI devices, such as
touch panels, are limited to single mode because spi-mt65xx lacks SPI
mode argument parsing from SPI framework for these SPI devices outside
spi-mem framework.

This patch adds dual and quad mode support for these SPI devices by
introducing a new API, mtk_spi_set_nbits, for SPI mode argument parsing.

Signed-off-by: Tim Kuo <Tim.Kuo@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20250917055839.500615-1-Tim.Kuo@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mt65xx.c