mbox series

[0/3] gpio: brcmstb: add support for gpio-ranges

Message ID 20240424185039.1707812-1-opendmb@gmail.com (mailing list archive)
Headers show
Series gpio: brcmstb: add support for gpio-ranges | expand

Message

Doug Berger April 24, 2024, 6:50 p.m. UTC
The Raspberry Pi 5 includes Broadcom STB GPIO IP as well as
Broadcom 2712 pin controller IP.

The community has expressed interest in linking the two drivers
with the "gpio-ranges" property in device tree. This commit
stack implements the necessary changes.

Doug Berger (3):
  dt-bindings: gpio: brcmstb: add gpio-ranges
  gpio: of: support gpio-ranges for multiple gpiochip devices
  gpio: brcmstb: add support for gpio-ranges

 .../bindings/gpio/brcm,brcmstb-gpio.yaml      |  3 +++
 drivers/gpio/gpio-brcmstb.c                   |  2 ++
 drivers/gpio/gpiolib-of.c                     | 23 +++++++++++++++++--
 3 files changed, 26 insertions(+), 2 deletions(-)

Comments

Bartosz Golaszewski April 26, 2024, 7:33 a.m. UTC | #1
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Wed, 24 Apr 2024 11:50:36 -0700, Doug Berger wrote:
> The Raspberry Pi 5 includes Broadcom STB GPIO IP as well as
> Broadcom 2712 pin controller IP.
> 
> The community has expressed interest in linking the two drivers
> with the "gpio-ranges" property in device tree. This commit
> stack implements the necessary changes.
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: gpio: brcmstb: add gpio-ranges
      commit: 7c66f8173360556ac0c3c38a91234af5a0a5a4a9
[2/3] gpio: of: support gpio-ranges for multiple gpiochip devices
      commit: e818cd3c8a345c046edff00b5ad0be4d39f7e4d4
[3/3] gpio: brcmstb: add support for gpio-ranges
      commit: 5539287ca65686f478e058a1e939294cb5682426

Best regards,
Linus Walleij May 3, 2024, 8:29 a.m. UTC | #2
On Fri, Apr 26, 2024 at 9:33 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> [2/3] gpio: of: support gpio-ranges for multiple gpiochip devices
>       commit: e818cd3c8a345c046edff00b5ad0be4d39f7e4d4

I'm not sure this is a good idea. To me it looks like the commit violates
the device tree bindings, which says offsets are on the local GPIO chip
and turn them into offsets in the Linux GPIO numberspace.

Yours,
Linus Walleij