From f43e4b007a943b00a7562025ed036a9c1ee2950f Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 13 Nov 2018 14:01:02 +0100 Subject: 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 Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe --- arch/arm/mach-pxa/palm27x.h | 2 ++ arch/arm/mach-pxa/palmld.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-pxa/palm27x.h b/arch/arm/mach-pxa/palm27x.h index d4eac3d6ffb5..3316ed2016f3 100644 --- a/arch/arm/mach-pxa/palm27x.h +++ b/arch/arm/mach-pxa/palm27x.h @@ -12,6 +12,8 @@ #ifndef __INCLUDE_MACH_PALM27X__ #define __INCLUDE_MACH_PALM27X__ +#include + #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) extern void __init palm27x_mmc_init(int detect, int ro, int power, int power_inverted); 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 -- cgit