[PATCH v6 07/13] gpio: mxc: convert pad wakeup compatible checks to hwdata flags

Linus Walleij linusw at kernel.org
Tue Oct 13 16:10:48 PDT 2026


Hi Peng,

On Sun, Oct 11, 2026 at 1:51 PM Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:

>  static bool mxc_gpio_generic_config(struct mxc_gpio_port *port,
>                 unsigned int offset, unsigned long conf)
>  {
> -       struct device_node *np = port->dev->of_node;
> +       int ret;
> +
> +       if (!mxc_gpio_has_pad_wakeup(port))
> +               return false;

Why is the entire call to mxc_gpio_generic_config()
bailing out here if the port does not have pad wakeup?

> -       if (of_device_is_compatible(np, "fsl,imx8dxl-gpio") ||
> -           of_device_is_compatible(np, "fsl,imx8qxp-gpio") ||
> -           of_device_is_compatible(np, "fsl,imx8qm-gpio"))
> -               return (gpiochip_generic_config(&port->gen_gc.gc,
> -                                               offset, conf) == 0);
> +       ret = gpiochip_generic_config(&port->gen_gc.gc, offset, conf);
> +       if (ret)
> +               return false;

Then no generic config can happen.

This looks weird, isn't it just some of the configs that
don't work?

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list