Re: USB: Question about usb_write() API
On Wed, Jan 31, 2018 at 1:58 PM, andrei.emeltchenko@... <andrei.emeltchenko.news@...> wrote:
I think we do not have now this requirement not to block-wait. When
If block wait is mandated, we can call usb_write() only on one endpoint at a time which will hamper performance.
Although USB bus transactions are sequential we can however queue the write buffers to a fifo and process them
later from a work queue independently after previous completion which might help design the driver in a better way.
w.r.t callbacks, well there are two cases:
1. set a valid callback function
2. set callback as NULL
If the callback is NULL then does that implicitly mean we have to block till write is complete?
I would prefer the driver implementation be simple rather complicating with all the synchronization and fragmentation stuff.