Skip to content

Commit

Permalink
gpio: brcmstb: add support for gpio-ranges
Browse files Browse the repository at this point in the history
A pin controller device mapped with the gpio-ranges property
will need implementations of the .request and .free members of
the gpiochip.

Signed-off-by: Doug Berger <opendmb@gmail.com>
Tested-by: Phil Elwell <phil@raspberrypi.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20240424185039.1707812-4-opendmb@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
  • Loading branch information
Doug Berger authored and Bartosz Golaszewski committed Apr 26, 2024
1 parent e818cd3 commit 5539287
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpio/gpio-brcmstb.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ static int brcmstb_gpio_probe(struct platform_device *pdev)
/* not all ngpio lines are valid, will use bank width later */
gc->ngpio = MAX_GPIO_PER_BANK;
gc->offset = bank->id * MAX_GPIO_PER_BANK;
gc->request = gpiochip_generic_request;
gc->free = gpiochip_generic_free;
if (priv->parent_irq > 0)
gc->to_irq = brcmstb_gpio_to_irq;

Expand Down

0 comments on commit 5539287

Please sign in to comment.