summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dw-mmio.c
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2024-04-24 17:06:45 +0200
committerMark Brown <broonie@kernel.org>2024-05-03 04:09:25 +0200
commit98d75b9ef282f6b9bfa1ea06d8a0824e0edaea97 (patch)
treea055629aa537f080e20d62db68a94f1220dddf1e /drivers/spi/spi-dw-mmio.c
parentspi: dw: Convert dw_spi::num_cs to u32 (diff)
downloadlinux-98d75b9ef282f6b9bfa1ea06d8a0824e0edaea97.tar.xz
linux-98d75b9ef282f6b9bfa1ea06d8a0824e0edaea97.zip
spi: dw: Drop default number of CS setting
DW APB/AHB SSI core now supports the procedure automatically detecting the number of native chip-select lines. Thus there is no longer point in defaulting to four CS if the platform doesn't specify the real number especially seeing the default number didn't correspond to any original DW APB/AHB databook. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240424150657.9678-5-fancer.lancer@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw-mmio.c')
-rw-r--r--drivers/spi/spi-dw-mmio.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
index cc74cbe03431..c56de35eca98 100644
--- a/drivers/spi/spi-dw-mmio.c
+++ b/drivers/spi/spi-dw-mmio.c
@@ -320,7 +320,6 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
struct resource *mem;
struct dw_spi *dws;
int ret;
- int num_cs;
dwsmmio = devm_kzalloc(&pdev->dev, sizeof(struct dw_spi_mmio),
GFP_KERNEL);
@@ -364,11 +363,8 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
&dws->reg_io_width))
dws->reg_io_width = 4;
- num_cs = 4;
-
- device_property_read_u32(&pdev->dev, "num-cs", &num_cs);
-
- dws->num_cs = num_cs;
+ /* Rely on the auto-detection if no property specified */
+ device_property_read_u32(&pdev->dev, "num-cs", &dws->num_cs);
init_func = device_get_match_data(&pdev->dev);
if (init_func) {