Skip to content

Commit

Permalink
bcm2708-gpio: Revert the use of pinctrl_request_gpio
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Phil Elwell authored and popcornmix committed Jan 2, 2015
1 parent 992fda1 commit 18b06d2
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions arch/arm/mach-bcm2708/bcm2708_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <mach/platform.h>
#include <linux/pinctrl/consumer.h>

#include <linux/platform_data/bcm2708.h>

Expand Down Expand Up @@ -90,16 +91,6 @@ static int bcm2708_set_function(struct gpio_chip *gc, unsigned offset,
return 0;
}

static int bcm2708_gpio_request(struct gpio_chip *chip, unsigned offset)
{
return pinctrl_request_gpio(chip->base + offset);
}

static void bcm2708_gpio_free(struct gpio_chip *chip, unsigned offset)
{
pinctrl_free_gpio(chip->base + offset);
}

static int bcm2708_gpio_dir_in(struct gpio_chip *gc, unsigned offset)
{
return bcm2708_set_function(gc, offset, GPIO_FSEL_INPUT);
Expand Down Expand Up @@ -355,8 +346,6 @@ static int bcm2708_gpio_probe(struct platform_device *dev)
ucb->gc.ngpio = BCM2708_NR_GPIOS;
ucb->gc.owner = THIS_MODULE;

ucb->gc.request = bcm2708_gpio_request;
ucb->gc.free = bcm2708_gpio_free;
ucb->gc.direction_input = bcm2708_gpio_dir_in;
ucb->gc.direction_output = bcm2708_gpio_dir_out;
ucb->gc.get = bcm2708_gpio_get;
Expand Down

0 comments on commit 18b06d2

Please sign in to comment.