Skip to content

Commit 553fc84

Browse files
cyliangtwdanieldegrasse
authored andcommitted
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 <cyliang@nuvoton.com>
1 parent 255e7f9 commit 553fc84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi_numaker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int spi_numaker_configure(const struct device *dev, const struct spi_conf
129129
/* Enable the automatic hardware slave select function. Select the SS pin and configure as
130130
* low-active.
131131
*/
132-
if (data->ctx.num_cs_gpios != 0) {
132+
if (data->ctx.num_cs_gpios == 0) {
133133
SPI_EnableAutoSS(dev_cfg->spi, SPI_SS, SPI_SS_ACTIVE_LOW);
134134
} else {
135135
SPI_DisableAutoSS(dev_cfg->spi);

0 commit comments

Comments
 (0)