aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/palmld.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-11-13 14:01:02 +0100
committerJens Axboe <axboe@kernel.dk>2018-12-04 17:15:26 -0700
commitf43e4b007a943b00a7562025ed036a9c1ee2950f (patch)
tree86862bb62a7cb8101cd25d6c97ee7ec505921487 /arch/arm/mach-pxa/palmld.c
parentata: rb532_cf: Convert to use GPIO descriptors (diff)
downloadlinux-dev-f43e4b007a943b00a7562025ed036a9c1ee2950f.tar.xz
linux-dev-f43e4b007a943b00a7562025ed036a9c1ee2950f.zip
ata: palmld: Convert to GPIO descriptors
Instead of passing GPIO numbers directly to the PalmLD ATA driver, pass GPIO descriptors from the board file and handle these in the driver. Cc: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--arch/arm/mach-pxa/palmld.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 980f2847f5b5..a37ceec22903 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -288,8 +288,20 @@ static struct platform_device palmld_ide_device = {
.id = -1,
};
+static struct gpiod_lookup_table palmld_ide_gpio_table = {
+ .dev_id = "pata_palmld",
+ .table = {
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_IDE_PWEN,
+ "power", GPIO_ACTIVE_HIGH),
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_IDE_RESET,
+ "reset", GPIO_ACTIVE_LOW),
+ { },
+ },
+};
+
static void __init palmld_ide_init(void)
{
+ gpiod_add_lookup_table(&palmld_ide_gpio_table);
platform_device_register(&palmld_ide_device);
}
#else