diff options
| author | Weijie Gao <[email protected]> | 2025-01-17 17:17:55 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-23 12:11:49 -0600 |
| commit | 7725d4ba16577b74567f7cffb2faffa8bdc5ad61 (patch) | |
| tree | 43a7d784f57e69e095e10ffb0c84fc789295e9c1 /drivers | |
| parent | a2c2ac46ca4c4ef5fe043e584cf867a20e93226d (diff) | |
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 <[email protected]>
Signed-off-by: Weijie Gao <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/spi/mtk_spim.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/mtk_spim.c b/drivers/spi/mtk_spim.c index cd9b9d305ef..2b2c31b4b3f 100644 --- a/drivers/spi/mtk_spim.c +++ b/drivers/spi/mtk_spim.c @@ -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) |
