spi: mtk_spim: check slave device mode in spi-mem's supports_op

Call spi_mem_default_supports_op() in supports_op to honor the
slave's supported single/dual/quad mode settings.

Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
This commit is contained in:
Weijie Gao
2025-01-17 17:17:55 +08:00
committed by Tom Rini
parent a2c2ac46ca
commit 7725d4ba16

View File

@@ -359,6 +359,9 @@ static bool mtk_spim_supports_op(struct spi_slave *slave,
struct udevice *bus = dev_get_parent(slave->dev);
struct mtk_spim_priv *priv = dev_get_priv(bus);
if (!spi_mem_default_supports_op(slave, op))
return false;
if (op->cmd.buswidth == 0 || op->cmd.buswidth > 4 ||
op->addr.buswidth > 4 || op->dummy.buswidth > 4 ||
op->data.buswidth > 4)