Messages in this thread | | | From | Arnd Bergmann <> | Date | Wed, 11 Dec 2019 16:33:24 +0100 | Subject | Re: [RFC 5/5] i3c: add i3cdev module to expose i3c dev in /dev |
| |
On Wed, Dec 11, 2019 at 4:07 PM Vitor Soares <Vitor.Soares@synopsys.com> wrote: > From: Arnd Bergmann <arnd@arndb.de> > Date: Tue, Dec 10, 2019 at 19:37:14 > > On Tue, Dec 10, 2019 at 8:15 PM Vitor Soares <Vitor.Soares@synopsys.com> wrote: > > > From: Arnd Bergmann <arnd@arndb.de> > > > Date: Tue, Dec 10, 2019 at 17:51:14 > > > > On Tue, Dec 10, 2019 at 4:37 PM Vitor Soares <Vitor.Soares@synopsys.com> wrote: > > As your interface is basically just read/write based, I wonder > > if there is a way to completely avoid the ioctl and instead > > use io_submit() as the primary interface. > > I confess that I wasn't familiar with io_submit() until now and went > straightway for the ioctl() approach. > So far, my understanding is that io_submit() will call .write or .read of > i3cdev module depending on the iocb command. if so, we won't be able to > do a repeated start between a multiple iocb in the same list, right?
I'm not sure what you mean with "repeated start", but it's definitely possible that io_submit() is not a useful interface for i3c. The main advantage would be that it avoids creating a complex ioctl command.
> Apart from this private read/write need, another requirement that leads > me to use the ioctl() was: > - When we support HDR command in i3c subsystem we can expand the ioctl() > command to support it. > - For now, device API doesn't expose CCC commands but some of them are > used for a private contract between master and device and we likely need > that support in the future as well.
I think you could still have both the io_submit() interface for basic I/O (if you can get it to do what you want), plus an ioctl interface for more complex interactions.
Arnd
| |