mirror of
https://github.com/armbian/build.git
synced 2025-08-09 20:56:57 +02:00
* Bumping EDGE kernel to 5.14.y Meson64: - removing Odroid reboot shutdown patch since its probably not needed anymore Rockchip64: - removing Rockpi S. No interest to maintain this any further - removing PBP suspend. Doesn’t align. Need inspection if some other way was mainstreamed - temporally removing Orangepi R1 * Re-adding rockpis, pbp suspend, HFLPS170 wifi and cleanup * Removing deprecated patch, fixing ap6256 wifi * Re-enable Opi R1 plus, untest * Add and fix Radxa Zero
25 lines
870 B
Diff
25 lines
870 B
Diff
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
|
|
index 5e4c453..028ef66 100644
|
|
--- a/drivers/spi/spi.c
|
|
+++ b/drivers/spi/spi.c
|
|
@@ -3262,6 +3262,19 @@ int spi_setup(struct spi_device *spi)
|
|
if (spi->controller->setup)
|
|
status = spi->controller->setup(spi);
|
|
|
|
+ if (gpio_is_valid(spi->cs_gpio)) {
|
|
+ dev_info(&spi->dev, "spi_setup / gpio_is_valid(%d) ... doing gpio_request ...\n", spi->cs_gpio);
|
|
+ int ret = gpio_request(spi->cs_gpio, dev_name(&spi->dev));
|
|
+ if (ret) {
|
|
+ dev_err(&spi->dev, "failed to request gpio\n");
|
|
+ }
|
|
+ else {
|
|
+ gpio_direction_output(spi->cs_gpio,
|
|
+ !(spi->mode & SPI_CS_HIGH));
|
|
+ dev_info(&spi->dev, "spi_setup / gpio_direction_output(%d) done !\n", spi->cs_gpio);
|
|
+ }
|
|
+ }
|
|
+
|
|
if (spi->controller->auto_runtime_pm && spi->controller->set_cs) {
|
|
status = pm_runtime_get_sync(spi->controller->dev.parent);
|
|
if (status < 0) {
|