[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230807001621.196776-1-hayashi.kunihiko@socionext.com>
Date: Mon, 7 Aug 2023 09:16:21 +0900
From: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
To: Serge Semin <fancer.lancer@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
Subject: [PATCH] spi: dw: Set default value if reg-io-width isn't specified
According to the dt-bindings, the default value of reg-io-width is 4.
However, the value becomes zero when reg-io-width isn't specified.
Should set the actual value to dws->reg_io_width, considering it
referenced.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
---
drivers/spi/spi-dw-mmio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
index a963bc96c223..7eafc07ef7aa 100644
--- a/drivers/spi/spi-dw-mmio.c
+++ b/drivers/spi/spi-dw-mmio.c
@@ -369,7 +369,9 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
dws->max_freq = clk_get_rate(dwsmmio->clk);
- device_property_read_u32(&pdev->dev, "reg-io-width", &dws->reg_io_width);
+ if (device_property_read_u32(&pdev->dev, "reg-io-width",
+ &dws->reg_io_width))
+ dws->reg_io_width = 4;
num_cs = 4;
--
2.25.1
Powered by blists - more mailing lists