From 553fc84e77e245eda41dd1e2f2ba6ed1055d4bcb Mon Sep 17 00:00:00 2001 From: cyliang tw Date: Thu, 10 Jul 2025 17:05:16 +0800 Subject: [PATCH] drivers: spi: fix numaker spi auto cs control As while there is no cs_gpio, it should enable H/W auto cs control. Signed-off-by: cyliang tw --- drivers/spi/spi_numaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi_numaker.c b/drivers/spi/spi_numaker.c index a6f726d5b98..5ce3d564467 100644 --- a/drivers/spi/spi_numaker.c +++ b/drivers/spi/spi_numaker.c @@ -129,7 +129,7 @@ static int spi_numaker_configure(const struct device *dev, const struct spi_conf /* Enable the automatic hardware slave select function. Select the SS pin and configure as * low-active. */ - if (data->ctx.num_cs_gpios != 0) { + if (data->ctx.num_cs_gpios == 0) { SPI_EnableAutoSS(dev_cfg->spi, SPI_SS, SPI_SS_ACTIVE_LOW); } else { SPI_DisableAutoSS(dev_cfg->spi);