Skip to content

Commit 18b06d2

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
bcm2708-gpio: Revert the use of pinctrl_request_gpio
In non-DT systems, pinctrl_request_gpio always fails causing "requests probe deferral" messages. In DT systems, it isn't useful because the reference counting is independent of the normal pinctrl pin reservations.
1 parent 992fda1 commit 18b06d2

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

arch/arm/mach-bcm2708/bcm2708_gpio.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/gpio.h>
2222
#include <linux/platform_device.h>
2323
#include <mach/platform.h>
24+
#include <linux/pinctrl/consumer.h>
2425

2526
#include <linux/platform_data/bcm2708.h>
2627

@@ -90,16 +91,6 @@ static int bcm2708_set_function(struct gpio_chip *gc, unsigned offset,
9091
return 0;
9192
}
9293

93-
static int bcm2708_gpio_request(struct gpio_chip *chip, unsigned offset)
94-
{
95-
return pinctrl_request_gpio(chip->base + offset);
96-
}
97-
98-
static void bcm2708_gpio_free(struct gpio_chip *chip, unsigned offset)
99-
{
100-
pinctrl_free_gpio(chip->base + offset);
101-
}
102-
10394
static int bcm2708_gpio_dir_in(struct gpio_chip *gc, unsigned offset)
10495
{
10596
return bcm2708_set_function(gc, offset, GPIO_FSEL_INPUT);
@@ -355,8 +346,6 @@ static int bcm2708_gpio_probe(struct platform_device *dev)
355346
ucb->gc.ngpio = BCM2708_NR_GPIOS;
356347
ucb->gc.owner = THIS_MODULE;
357348

358-
ucb->gc.request = bcm2708_gpio_request;
359-
ucb->gc.free = bcm2708_gpio_free;
360349
ucb->gc.direction_input = bcm2708_gpio_dir_in;
361350
ucb->gc.direction_output = bcm2708_gpio_dir_out;
362351
ucb->gc.get = bcm2708_gpio_get;

0 commit comments

Comments
 (0)