* 8250.c: Generic support for RTS disabling once shiftreg and fifo is empty. (low latency RS485 etc).
@ 2012-04-27 6:23 Christian Melki
2012-04-27 9:02 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Christian Melki @ 2012-04-27 6:23 UTC (permalink / raw)
To: linux-serial@vger.kernel.org
Hi.
I have written a patch for 8250.c that introduces a new ioctl to tell the uart driver to shift disable RTS when uart has been completely emptied.
This idea is to set the ioctl once the master is finished and wants to shift the bus.
We needed this to be in the kernel since we have very little time to shift RTS according to the implemented protocol on top of RS485.
Is there any interest in the community for such a behavior?
The patch is a little ugly right now. It busywaits a maximum amount of time for the shift register to become empty. I don't know how to do it without introducing a latency that is more than our max RTS time shift requirement (50us). I think it could be useful with a generic 8250.c support for this.
Regards,
Christian Melki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 8250.c: Generic support for RTS disabling once shiftreg and fifo is empty. (low latency RS485 etc).
2012-04-27 6:23 8250.c: Generic support for RTS disabling once shiftreg and fifo is empty. (low latency RS485 etc) Christian Melki
@ 2012-04-27 9:02 ` Alan Cox
2012-04-30 7:05 ` Christian Melki
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2012-04-27 9:02 UTC (permalink / raw)
To: Christian Melki; +Cc: linux-serial@vger.kernel.org
On Fri, 27 Apr 2012 08:23:23 +0200
Christian Melki <christian.melki@ericsson.com> wrote:
> Hi.
>
> I have written a patch for 8250.c that introduces a new ioctl to tell the uart driver to shift disable RTS when uart has been completely emptied.
> This idea is to set the ioctl once the master is finished and wants to shift the bus.
> We needed this to be in the kernel since we have very little time to shift RTS according to the implemented protocol on top of RS485.
>
> Is there any interest in the community for such a behavior?
We have a set of RS485 ioctls that provide a standard interface for
assisting RS485 handling. The interface should probably use those if
possible.
> The patch is a little ugly right now. It busywaits a maximum amount of time for the shift register to become empty. I don't know how to do it without introducing a latency that is more than our max RTS time shift requirement (50us). I think it could be useful with a generic 8250.c support for this.
We've hit the same hardware limit in a couple of other places where you
end up having to spin on the last byte. I don't think it's a problem
providing it is only triggered when trying to do the RS485 bits with that
feature.
Alan
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: 8250.c: Generic support for RTS disabling once shiftreg and fifo is empty. (low latency RS485 etc).
2012-04-27 9:02 ` Alan Cox
@ 2012-04-30 7:05 ` Christian Melki
0 siblings, 0 replies; 3+ messages in thread
From: Christian Melki @ 2012-04-30 7:05 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-serial@vger.kernel.org
> On Fri, 27 Apr 2012 08:23:23 +0200
> Christian Melki <christian.melki@ericsson.com> wrote:
>
> > Hi.
> >
> > I have written a patch for 8250.c that introduces a new
> > ioctl to tell the uart driver to shift disable RTS when uart
> > has been completely emptied.
> > This idea is to set the ioctl once the master is finished
> > and wants to shift the bus.
> > We needed this to be in the kernel since we have very
> > little time to shift RTS according to the implemented
> > protocol on top of RS485.
> >
> > Is there any interest in the community for such a behavior?
>
> We have a set of RS485 ioctls that provide a standard
> interface for assisting RS485 handling. The interface should
> probably use those if possible.
Ok, didn't see that ioctl. Don't like the naming though.
I know I have used RS485 as a reference, but this can be used for
any half duplex protocol control. Maybe something like RTSCTL
would be more appropriate. (I was looking for ioctls with RTS names).
Anyway, no more whining :). I'll redo it with that ioctl instead.
> > The patch is a little ugly right now. It busywaits a
> > maximum amount of time for the shift register to become
> > empty. I don't know how to do it without introducing a
> > latency that is more than our max RTS time shift requirement
> > (50us). I think it could be useful with a generic 8250.c
> > support for this.
>
> We've hit the same hardware limit in a couple of other places
> where you end up having to spin on the last byte. I don't
> think it's a problem providing it is only triggered when
> trying to do the RS485 bits with that feature.
It will be exactly like that in the tx-path. So it won't disturb
"normal" users beside one more feature check.
> Alan
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-30 7:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 6:23 8250.c: Generic support for RTS disabling once shiftreg and fifo is empty. (low latency RS485 etc) Christian Melki
2012-04-27 9:02 ` Alan Cox
2012-04-30 7:05 ` Christian Melki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox