diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-09-03 23:16:32 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-05-23 15:58:32 +0100 |
commit | 21f6c397894e52a49ae49010c158f0b5d9160a3f (patch) | |
tree | 14f686fe198c4341746239b17432bb78e9ec6d6b /arch/arm | |
parent | 1811ebddaedaa643510fce4ed33763794b402ab9 (diff) |
ARM: pxa/e740: convert to gpiod APIs
Switch the E740 machine to use the gpiod APIs rather than hard-coding
the GPIO numbers in the board specific PCMCIA driver.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-pxa/eseries.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index f37c44b6139d..c9c53ea16236 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c @@ -496,6 +496,25 @@ static unsigned long e740_pin_config[] __initdata = { GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, }; +static struct gpiod_lookup_table e740_pcmcia_gpio_table = { + .dev_id = "pxa2xx-pcmcia", + .table = { + GPIO_LOOKUP("GPIO", GPIO_E740_PCMCIA_CD0, + "adetect", GPIO_ACTIVE_LOW), + GPIO_LOOKUP("GPIO", GPIO_E740_PCMCIA_RDY0, + "aready", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("GPIO", GPIO_E740_PCMCIA_RST0, + "areset", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("GPIO", GPIO_E740_PCMCIA_CD1, + "bdetect", GPIO_ACTIVE_LOW), + GPIO_LOOKUP("GPIO", GPIO_E740_PCMCIA_RDY1, + "bready", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("GPIO", GPIO_E740_PCMCIA_RST1, + "breset", GPIO_ACTIVE_HIGH), + { }, + }, +}; + /* -------------------- e740 t7l66xb parameters -------------------- */ static struct t7l66xb_platform_data e740_t7l66xb_info = { @@ -532,6 +551,7 @@ static struct platform_device *e740_devices[] __initdata = { static void __init e740_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); + gpiod_add_lookup_table(&e740_pcmcia_gpio_table); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); |