Re: [RFC 5/5] i3c: add i3cdev module to expose i3c dev in /dev
From: Arnd Bergmann
Date: Tue Dec 10 2019 - 12:51:34 EST
On Tue, Dec 10, 2019 at 4:37 PM Vitor Soares <Vitor.Soares@xxxxxxxxxxxx> wrote:
>
> +/* IOCTL commands */
> +#define I3C_DEV_IOC_MAGIC 0x07
> +
> +struct i3c_ioc_priv_xfer {
> + struct i3c_priv_xfer __user *xfers; /* pointers to i3c_priv_xfer */
> + __u32 nxfers; /* number of i3c_priv_xfer */
> +};
> +
> +#define I3C_IOC_PRIV_XFER \
> + _IOW(I3C_DEV_IOC_MAGIC, 30, struct i3c_ioc_priv_xfer)
> +
> +#define I3C_IOC_PRIV_XFER_MAX_MSGS 42
This is not a great data structure for UAPI, please see
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/tree/Documentation/core-api/ioctl.rst?h=compat-ioctl-endgame&id=927324b7900ee9b877691a8b237e272fabb21bf5
for some background. I'm planning to submit that documentation for
mainline integration soon.
Arnd