From 716ca530e1c4515d8683c9d5be3d56b301758b66 Mon Sep 17 00:00:00 2001 From: James <> Date: Wed, 4 Nov 2015 11:49:21 +0000 Subject: trunk-47381 --- ...mcia-bcm63xx_pmcia-use-the-new-named-gpio.patch | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 target/linux/brcm63xx/patches-4.1/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch (limited to 'target/linux/brcm63xx/patches-4.1/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch') diff --git a/target/linux/brcm63xx/patches-4.1/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch b/target/linux/brcm63xx/patches-4.1/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch new file mode 100644 index 0000000..524ca1a --- /dev/null +++ b/target/linux/brcm63xx/patches-4.1/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch @@ -0,0 +1,59 @@ +From c4e04f1c54928a49b227a5420d38b18226838775 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Wed, 25 Mar 2015 13:54:56 +0100 +Subject: [PATCH 2/2] pcmcia: bcm63xx_pmcia: use the new named gpio + +Use the new named gpio instead of relying on the hardware gpio numbers +matching the virtual gpio numbers. + +Signed-off-by: Jonas Gorski +--- + drivers/pcmcia/bcm63xx_pcmcia.c | 9 ++++++++- + drivers/pcmcia/bcm63xx_pcmcia.h | 4 ++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +--- a/drivers/pcmcia/bcm63xx_pcmcia.c ++++ b/drivers/pcmcia/bcm63xx_pcmcia.c +@@ -237,7 +237,7 @@ static unsigned int __get_socket_status( + stat |= SS_XVCARD; + stat |= SS_POWERON; + +- if (gpio_get_value(skt->pd->ready_gpio)) ++ if (gpiod_get_value(skt->ready_gpio)) + stat |= SS_READY; + + return stat; +@@ -373,6 +373,13 @@ static int bcm63xx_drv_pcmcia_probe(stru + goto err; + } + ++ /* get ready gpio */ ++ skt->ready_gpio = devm_gpiod_get(&pdev->dev, "ready", GPIOD_IN); ++ if (IS_ERR(skt->ready_gpio)) { ++ ret = PTR_ERR(skt->ready_gpio); ++ goto err; ++ } ++ + /* resources are static */ + sock->resource_ops = &pccard_static_ops; + sock->ops = &bcm63xx_pcmcia_operations; +--- a/drivers/pcmcia/bcm63xx_pcmcia.h ++++ b/drivers/pcmcia/bcm63xx_pcmcia.h +@@ -3,6 +3,7 @@ + + #include + #include ++#include + #include + #include + +@@ -55,6 +56,9 @@ struct bcm63xx_pcmcia_socket { + + /* base address of io memory */ + void __iomem *io_base; ++ ++ /* ready gpio */ ++ struct gpio_desc *ready_gpio; + }; + + #endif /* BCM63XX_PCMCIA_H_ */ -- cgit v1.2.3