[PATCH v4 2/3] pinctrl: bcm: Add STB family pin controller driver
Linus Walleij
linus.walleij at linaro.org
Thu Aug 28 14:14:35 PDT 2025
On Thu, Aug 28, 2025 at 2:45 PM Andrea della Porta
<andrea.porta at suse.com> wrote:
> From: "Ivan T. Ivanov" <iivanov at suse.de>
>
> This driver provide pin muxing and configuration functionality
> for BCM2712 SoC used by RPi5. According to [1] this chip is an
> instance of the one used in Broadcom STB product line.
>
> [1] https://lore.kernel.org/lkml/f6601f73-cb22-4ba3-88c5-241be8421fc3@broadcom.com/
>
> Cc: Jonathan Bell <jonathan at raspberrypi.com>
> Cc: Phil Elwell <phil at raspberrypi.com>
> Signed-off-by: Ivan T. Ivanov <iivanov at suse.de>
> Reviewed-by: Phil Elwell <phil at raspberrypi.com>
> Signed-off-by: Andrea della Porta <andrea.porta at suse.com>
(...)
> +static bool brcmstb_pmx_function_is_gpio(struct pinctrl_dev *pctldev,
> + unsigned int selector)
> +{
> + struct brcmstb_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev);
> +
> + return pc->func_gpio == selector;
> +}
> +
> +static const struct pinmux_ops brcmstb_pmx_ops = {
> + .free = brcmstb_pmx_free,
> + .get_functions_count = brcmstb_pmx_get_functions_count,
> + .get_function_name = brcmstb_pmx_get_function_name,
> + .get_function_groups = brcmstb_pmx_get_function_groups,
> + .set_mux = brcmstb_pmx_set,
> + .gpio_request_enable = brcmstb_pmx_gpio_request_enable,
> + .gpio_disable_free = brcmstb_pmx_gpio_disable_free,
> + .function_is_gpio = brcmstb_pmx_function_is_gpio,
> + .strict = true,
Oh! It's now using .function_is_gpio() and can be charmingly
strict!
Better let Bartosz have a look at this and ACK it, I will merge
his GPIO function awareness patches first.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list