Skip to content

Commit

Permalink
spi: lantiq-ssc: Convert to use GPIO descriptors
Browse files Browse the repository at this point in the history
This switches the Lantiq SSC driver over to use GPIO descriptor
handling in the core.

The driver was already utilizing the core to look up and request
GPIOs from the device tree so this is a pretty small change
just switching it over to use descriptors directly instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://lore.kernel.org/r/20200625202149.209276-1-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Linus Walleij authored and Mark Brown committed Jul 1, 2020
1 parent 27e23ca commit 95f2fd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-lantiq-ssc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <linux/completion.h>
#include <linux/spinlock.h>
#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/pm_runtime.h>
#include <linux/spi/spi.h>

Expand Down Expand Up @@ -391,7 +390,7 @@ static int lantiq_ssc_setup(struct spi_device *spidev)
u32 gpocon;

/* GPIOs are used for CS */
if (gpio_is_valid(spidev->cs_gpio))
if (spidev->cs_gpiod)
return 0;

dev_dbg(spi->dev, "using internal chipselect %u\n", cs);
Expand Down Expand Up @@ -888,6 +887,7 @@ static int lantiq_ssc_probe(struct platform_device *pdev)

master->dev.of_node = pdev->dev.of_node;
master->num_chipselect = num_cs;
master->use_gpio_descriptors = true;
master->setup = lantiq_ssc_setup;
master->set_cs = lantiq_ssc_set_cs;
master->handle_err = lantiq_ssc_handle_err;
Expand Down

0 comments on commit 95f2fd2

Please sign in to comment.