Re: [PATCH v3 3/4] gpio: imx-rpmsg: add imx-rpmsg GPIO driver

From: Andrew Lunn

Date: Mon Oct 13 2025 - 10:56:16 EST


> > Maybe Documentation/admin-guide/gpio-rpmsg.rst would be better. You should
> > also document how to handle features the device does not support. e.g. i _think_
> > your hardware supports all 4 interrupt types. But maybe other hardware needs to
> > return something meaning -EOPNOTSUP?
> >
>
> That should be one type of the error return code in the out field of REPLY message.
> The return code of 0 means success, and the others are error codes.

You need to be careful of architecture code:

https://elixir.bootlin.com/linux/v6.17.1/A/ident/EOPNOTSUPP

Notice how ENOPNOTSUPP can be 45, 122, 223, or 95. Returning EL2NSYNC
or EDQUOT to user space is going to cause confusion...

Andrew