mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
pinctrl: bcm: nsp: Use library functions
These request/free functions are just reimplementations of the standard helpers in gpiolib. Delete them and replace with the helpers. Acked-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
a9a1d2a782
commit
92ddf5ff97
1 changed files with 2 additions and 19 deletions
|
@ -275,23 +275,6 @@ static struct irq_chip nsp_gpio_irq_chip = {
|
||||||
.irq_set_type = nsp_gpio_irq_set_type,
|
.irq_set_type = nsp_gpio_irq_set_type,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Request the nsp IOMUX pinmux controller to mux individual pins to GPIO
|
|
||||||
*/
|
|
||||||
static int nsp_gpio_request(struct gpio_chip *gc, unsigned offset)
|
|
||||||
{
|
|
||||||
unsigned gpio = gc->base + offset;
|
|
||||||
|
|
||||||
return pinctrl_gpio_request(gpio);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void nsp_gpio_free(struct gpio_chip *gc, unsigned offset)
|
|
||||||
{
|
|
||||||
unsigned gpio = gc->base + offset;
|
|
||||||
|
|
||||||
pinctrl_gpio_free(gpio);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int nsp_gpio_direction_input(struct gpio_chip *gc, unsigned gpio)
|
static int nsp_gpio_direction_input(struct gpio_chip *gc, unsigned gpio)
|
||||||
{
|
{
|
||||||
struct nsp_gpio *chip = gpiochip_get_data(gc);
|
struct nsp_gpio *chip = gpiochip_get_data(gc);
|
||||||
|
@ -670,8 +653,8 @@ static int nsp_gpio_probe(struct platform_device *pdev)
|
||||||
gc->label = dev_name(dev);
|
gc->label = dev_name(dev);
|
||||||
gc->parent = dev;
|
gc->parent = dev;
|
||||||
gc->of_node = dev->of_node;
|
gc->of_node = dev->of_node;
|
||||||
gc->request = nsp_gpio_request;
|
gc->request = gpiochip_generic_request;
|
||||||
gc->free = nsp_gpio_free;
|
gc->free = gpiochip_generic_free;
|
||||||
gc->direction_input = nsp_gpio_direction_input;
|
gc->direction_input = nsp_gpio_direction_input;
|
||||||
gc->direction_output = nsp_gpio_direction_output;
|
gc->direction_output = nsp_gpio_direction_output;
|
||||||
gc->set = nsp_gpio_set;
|
gc->set = nsp_gpio_set;
|
||||||
|
|
Loading…
Reference in a new issue