summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-11-28 14:57:23 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2018-12-04 23:37:38 +0100
commitf1f05ee1b3ba70e199d7c86a3877206f0086a342 (patch)
tree43825b97ce4afe1fd9c933c93f91a4111b189ee4 /arch/arm/mach-pxa
parentARM: pxa/mainstone: switch PCMCIA to MAX1600 library and gpiod APIs (diff)
downloadlinux-f1f05ee1b3ba70e199d7c86a3877206f0086a342.tar.xz
linux-f1f05ee1b3ba70e199d7c86a3877206f0086a342.zip
ARM: pxa/lubbock: switch PCMCIA to MAX1600 library
As Lubbock now provides GPIOs via gpiolib for controlling the socket power, we can use the MAX1600 driver. Switch Lubbock to use this driver, which simplifies the code. Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/lubbock.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index fe2ef9b78602..8e24455facd8 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -136,10 +136,26 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
// no D+ pullup; lubbock can't connect/disconnect in software
};
+/* GPIOs for SA1111 PCMCIA */
+static struct gpiod_lookup_table sa1111_pcmcia_gpio_table = {
+ .dev_id = "1800",
+ .table = {
+ { "sa1111", 0, "a0vpp", GPIO_ACTIVE_HIGH },
+ { "sa1111", 1, "a1vpp", GPIO_ACTIVE_HIGH },
+ { "sa1111", 2, "a0vcc", GPIO_ACTIVE_HIGH },
+ { "sa1111", 3, "a1vcc", GPIO_ACTIVE_HIGH },
+ { "lubbock", 14, "b0vcc", GPIO_ACTIVE_HIGH },
+ { "lubbock", 15, "b1vcc", GPIO_ACTIVE_HIGH },
+ { },
+ },
+};
+
static void lubbock_init_pcmcia(void)
{
struct clk *clk;
+ gpiod_add_lookup_table(&sa1111_pcmcia_gpio_table);
+
/* Add an alias for the SA1111 PCMCIA clock */
clk = clk_get_sys("pxa2xx-pcmcia", NULL);
if (!IS_ERR(clk)) {