summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/palmld.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-11-13 16:01:02 +0300
committerJens Axboe <axboe@kernel.dk>2018-12-05 03:15:26 +0300
commitf43e4b007a943b00a7562025ed036a9c1ee2950f (patch)
tree86862bb62a7cb8101cd25d6c97ee7ec505921487 /arch/arm/mach-pxa/palmld.c
parentcd56f35e52d9496cbf5c85d27af9bdb064bec8df (diff)
downloadlinux-f43e4b007a943b00a7562025ed036a9c1ee2950f.tar.xz
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 'arch/arm/mach-pxa/palmld.c')
-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