]> git.ipfire.org Git - thirdparty/openwrt.git/blob
c30105bb5fad011bd0bc3364405d80de33c4652b
[thirdparty/openwrt.git] /
1 From 7725d4ba16577b74567f7cffb2faffa8bdc5ad61 Mon Sep 17 00:00:00 2001
2 From: Weijie Gao <weijie.gao@mediatek.com>
3 Date: Fri, 17 Jan 2025 17:17:55 +0800
4 Subject: [PATCH 06/15] spi: mtk_spim: check slave device mode in spi-mem's
5 supports_op
6
7 Call spi_mem_default_supports_op() in supports_op to honor the
8 slave's supported single/dual/quad mode settings.
9
10 Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
11 Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
12 ---
13 drivers/spi/mtk_spim.c | 3 +++
14 1 file changed, 3 insertions(+)
15
16 --- a/drivers/spi/mtk_spim.c
17 +++ b/drivers/spi/mtk_spim.c
18 @@ -359,6 +359,9 @@ static bool mtk_spim_supports_op(struct
19 struct udevice *bus = dev_get_parent(slave->dev);
20 struct mtk_spim_priv *priv = dev_get_priv(bus);
21
22 + if (!spi_mem_default_supports_op(slave, op))
23 + return false;
24 +
25 if (op->cmd.buswidth == 0 || op->cmd.buswidth > 4 ||
26 op->addr.buswidth > 4 || op->dummy.buswidth > 4 ||
27 op->data.buswidth > 4)