summaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c/mach-crag6410.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2022-01-19 00:09:15 +0100
committerMark Brown <broonie@kernel.org>2022-01-24 13:37:33 +0000
commita45cf3cc72dd9cfde9db8af32cdf9c431f53f9bc (patch)
tree1dada19ec740660780a19d85c073173dd365eeaf /arch/arm/mach-s3c/mach-crag6410.c
parent3b5529ae7f3578da633e8ae2ec0715a55a248f9f (diff)
spi: s3c64xx: Convert to use GPIO descriptors
Convert the S3C64xx SPI host to use GPIO descriptors. Provide GPIO descriptor tables for the one user with CS 0 and 1. Cc: linux-samsung-soc@vger.kernel.org Cc: Sylwester Nawrocki <snawrocki@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220118230915.157797-3-linus.walleij@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'arch/arm/mach-s3c/mach-crag6410.c')
-rw-r--r--arch/arm/mach-s3c/mach-crag6410.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
index 41f0aba2d2fd..e3e0fe897bcc 100644
--- a/arch/arm/mach-s3c/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -825,6 +825,15 @@ static const struct gpio_led_platform_data gpio_leds_pdata = {
static struct dwc2_hsotg_plat crag6410_hsotg_pdata;
+static struct gpiod_lookup_table crag_spi0_gpiod_table = {
+ .dev_id = "s3c6410-spi.0",
+ .table = {
+ GPIO_LOOKUP_IDX("GPIOC", 3, "cs", 0, GPIO_ACTIVE_LOW),
+ GPIO_LOOKUP_IDX("GPION", 5, "cs", 1, GPIO_ACTIVE_LOW),
+ { },
+ },
+};
+
static void __init crag6410_machine_init(void)
{
/* Open drain IRQs need pullups */
@@ -856,6 +865,8 @@ static void __init crag6410_machine_init(void)
i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
samsung_keypad_set_platdata(&crag6410_keypad_data);
+
+ gpiod_add_lookup_table(&crag_spi0_gpiod_table);
s3c64xx_spi0_set_platdata(0, 2);
pwm_add_table(crag6410_pwm_lookup, ARRAY_SIZE(crag6410_pwm_lookup));