aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx/simone.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-04-20 13:05:59 +0200
committerMark Brown <broonie@kernel.org>2019-05-02 10:37:59 +0900
commit1dfbf334f12361ebe6269c5918328b755ee960c7 (patch)
tree618248d5bb12a03322895255cb2dccc1f29bf153 /arch/arm/mach-ep93xx/simone.c
parentspi: AD ASoC: declare missing of table (diff)
downloadlinux-dev-1dfbf334f12361ebe6269c5918328b755ee960c7.tar.xz
linux-dev-1dfbf334f12361ebe6269c5918328b755ee960c7.zip
spi: ep93xx: Convert to use CS GPIO descriptors
This converts the EP93xx SPI master driver to use GPIO descriptors for chip select handling. EP93xx was using platform data to pass in GPIO lines, by converting all board files to use GPIO descriptor tables the core will look up the GPIO lines from the SPI device in the same manner as for device tree. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'arch/arm/mach-ep93xx/simone.c')
-rw-r--r--arch/arm/mach-ep93xx/simone.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 80ccb984d521..f0f38c0dba52 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -77,13 +77,15 @@ static struct spi_board_info simone_spi_devices[] __initdata = {
* low between multi-message command blocks. From v1.4, it uses a GPIO instead.
* v1.3 parts will still work, since the signal on SFRMOUT is automatic.
*/
-static int simone_spi_chipselects[] __initdata = {
- EP93XX_GPIO_LINE_EGPIO1,
+static struct gpiod_lookup_table simone_spi_cs_gpio_table = {
+ .dev_id = "ep93xx-spi.0",
+ .table = {
+ GPIO_LOOKUP("A", 1, "cs", GPIO_ACTIVE_LOW),
+ { },
+ },
};
static struct ep93xx_spi_info simone_spi_info __initdata = {
- .chipselect = simone_spi_chipselects,
- .num_chipselect = ARRAY_SIZE(simone_spi_chipselects),
.use_dma = 1,
};
@@ -113,6 +115,7 @@ static void __init simone_init_machine(void)
ep93xx_register_i2c(simone_i2c_board_info,
ARRAY_SIZE(simone_i2c_board_info));
gpiod_add_lookup_table(&simone_mmc_spi_gpio_table);
+ gpiod_add_lookup_table(&simone_spi_cs_gpio_table);
ep93xx_register_spi(&simone_spi_info, simone_spi_devices,
ARRAY_SIZE(simone_spi_devices));
simone_register_audio();