Re: [RFC PATCH 0/3] UART slave device bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

On Fri, Aug 19, 2016 at 12:03:05PM +0100, One Thousand Gnomes wrote:
> > I meant "Either some function similar to userspace's poll() is
> > needed, ...". Something like uart_dev_wait_for_rx()
> 
> You can't really do that - it might never return and then how do
> you want to handle timeouts and cleanups

Well there could be some timeout. As I said, I was thinking about
an API similar to poll(), but I agree, that a callback based API
is probably the better solution. It's simpler to implement and in
most cases simpler to use.

> > Alternatively the rx function could be a callback, that
> > is called when there is new data.
> 
> That's what the existing API gives you as an ldisc, it can't be
> immediate in many cases however but must be buffered.

I know and I think the ldisc API is fine in this regard. Also
the buffering allows DMA, so that's obviously preferred.

> > > I'm assuming the only immediate consumers are in-kernel.  
> > 
> > Yes, but the driver should be notified about incoming data.

-- Sebastian

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux