1 From c4e04f1c54928a49b227a5420d38b18226838775 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Wed, 25 Mar 2015 13:54:56 +0100
4 Subject: [PATCH 2/2] pcmcia: bcm63xx_pmcia: use the new named gpio
6 Use the new named gpio instead of relying on the hardware gpio numbers
7 matching the virtual gpio numbers.
9 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
11 drivers/pcmcia/bcm63xx_pcmcia.c | 9 ++++++++-
12 drivers/pcmcia/bcm63xx_pcmcia.h | 4 ++++
13 2 files changed, 12 insertions(+), 1 deletion(-)
15 --- a/drivers/pcmcia/bcm63xx_pcmcia.c
16 +++ b/drivers/pcmcia/bcm63xx_pcmcia.c
17 @@ -237,7 +237,7 @@ static unsigned int __get_socket_status(
21 - if (gpio_get_value(skt->pd->ready_gpio))
22 + if (gpiod_get_value(skt->ready_gpio))
26 @@ -373,6 +373,13 @@ static int bcm63xx_drv_pcmcia_probe(stru
30 + /* get ready gpio */
31 + skt->ready_gpio = devm_gpiod_get(&pdev->dev, "ready", GPIOD_IN);
32 + if (IS_ERR(skt->ready_gpio)) {
33 + ret = PTR_ERR(skt->ready_gpio);
37 /* resources are static */
38 sock->resource_ops = &pccard_static_ops;
39 sock->ops = &bcm63xx_pcmcia_operations;
40 --- a/drivers/pcmcia/bcm63xx_pcmcia.h
41 +++ b/drivers/pcmcia/bcm63xx_pcmcia.h
44 #include <linux/types.h>
45 #include <linux/timer.h>
46 +#include <linux/gpio/consumer.h>
47 #include <pcmcia/ss.h>
48 #include <bcm63xx_dev_pcmcia.h>
50 @@ -55,6 +56,9 @@ struct bcm63xx_pcmcia_socket {
52 /* base address of io memory */
53 void __iomem *io_base;
56 + struct gpio_desc *ready_gpio;
59 #endif /* BCM63XX_PCMCIA_H_ */