Re: [PATCH] gpio: vf610: add locking to gpio direction functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 7, 2025 at 7:21 AM Bough Chen <haibo.chen@xxxxxxx> wrote:
[Me]:
> > I have no idea why this driver isn't using gpio-mmio.
> > Not your fault though, just pointing out obvious improvement opportunities.
>
> I check the code, for vf610_gpio_direction_input()/vf610_gpio_direction_output(),
> to let the input/output really works, need to call pinctrl_gpio_direction_input()
> for vf610/imx7ulp/imx8ulp SoC.
> Refer to drivers/pinctrl/freescale/pinctrl-vf610.c, it implement gpio_set_direction
> callback. Also for imx7ulp/imx8ulp pinctrl drivers.
> This should be the reason why not using gpio-mmio.

If this is the *only* thing you need additionally from gpio-mmio
then what about just adding a new flag to bgpio_init() function
in <linux/gpio/driver.h>:

#define BGPIOF_PINCTRL_BACKEND      BIT(7)

That makes gpio-mmio call these callbacks when setting
direction?

Yours,
Linus Walleij





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux