We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0ccf76 commit 25f00a1Copy full SHA for 25f00a1
drivers/spi/spi-fsl-dspi.c
@@ -1003,6 +1003,7 @@ static int dspi_setup(struct spi_device *spi)
1003
u32 cs_sck_delay = 0, sck_cs_delay = 0;
1004
struct fsl_dspi_platform_data *pdata;
1005
unsigned char pasc = 0, asc = 0;
1006
+ struct gpio_desc *gpio_cs;
1007
struct chip_data *chip;
1008
unsigned long clkrate;
1009
bool cs = true;
@@ -1077,7 +1078,10 @@ static int dspi_setup(struct spi_device *spi)
1077
1078
chip->ctar_val |= SPI_CTAR_LSBFE;
1079
}
1080
- gpiod_direction_output(spi_get_csgpiod(spi, 0), false);
1081
+ gpio_cs = spi_get_csgpiod(spi, 0);
1082
+ if (gpio_cs)
1083
+ gpiod_direction_output(gpio_cs, false);
1084
+
1085
dspi_deassert_cs(spi, &cs);
1086
1087
spi_set_ctldata(spi, chip);
0 commit comments