> -----Original Message-----
> From: Andrew Lunn <[email protected]>
> Sent: Monday, October 13, 2025 9:56 AM
> To: Shenwei Wang <[email protected]>
> Cc: Bjorn Andersson <[email protected]>; Mathieu Poirier
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Shawn
> Guo <[email protected]>; Sascha Hauer <[email protected]>; Linus
> Walleij <[email protected]>; Bartosz Golaszewski <[email protected]>;
> Pengutronix Kernel Team <[email protected]>; Fabio Estevam
> <[email protected]>; Peng Fan <[email protected]>; linux-
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; 
> dl-linux-imx
> <[email protected]>
> Subject: [EXT] Re: [PATCH v3 3/4] gpio: imx-rpmsg: add imx-rpmsg GPIO driver
> > > 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.bootl/
> in.com%2Flinux%2Fv6.17.1%2FA%2Fident%2FEOPNOTSUPP&data=05%7C02%7
> Cshenwei.wang%40nxp.com%7Ce2c6c89bb8cb41882a5208de0a68aa7b%7C686
> ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638959641921284557%7CUn
> known%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIs
> IlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata
> =Lx%2B8iM3d8flgUq8kn8bnaDmxZDea8pPp2wL5V7JT%2BDM%3D&reserved=0
>
> Notice how ENOPNOTSUPP can be 45, 122, 223, or 95. Returning EL2NSYNC or
> EDQUOT to user space is going to cause confusion...
>

I think we should just follow the definitions in 
include/uapi/asm-generic/errno.h, right?

Thanks,
Shenwei

>        Andrew

Reply via email to