From: Grant Edwards <grant.b.edwards@gmail.com>
To: linux-serial@vger.kernel.org
Subject: Re: Support for RS485 on 8250 clone
Date: Mon, 28 Jul 2014 16:40:15 +0000 (UTC) [thread overview]
Message-ID: <lr5ude$f27$1@ger.gmane.org> (raw)
In-Reply-To: CAPybu_2XurwztXTo+KwqKw1NpKFTLgPQ5AHyuO-z7-=65oAGqw@mail.gmail.com
On 2014-07-28, Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> Hello
>
> I have a device with a Fintek F81216A LPC to 4 Uart device.
>
> One of the uarts is used as half duplex rs485 serial port. This means
> that it needs to be configured properly (logical level of rts, delays,
> etc...)
>
> I see that there is an API on the kernel to do this (TIOCGRS485),
> unfortunately the 8250 driver does not support it.
That's mostly due to how crappy the 8250 UART design is.
> 1) Is there any interest on supporting this kind of hardware on the
> kernel?
Sure. That would be brilliant.
Many years ago, I tried to do implement half-duplex support for the
8250 but failed. It would work on one motherboard but not the next.
There didn't seem to be a reliable way to know when the last stop bit
had been sent: the tx shift register empty status didn't go active at
a predicatble point. On some implementations it went true before the
stop bit was sent. On some afterwards. On some, part way through the
stop bit.
Even if the tx shift register empty bit did work predictably, you have
to do a busy/wait polling loop because that status bit can't generate
an interrupt, so there's no way trigger the required action (shut off
RTS or start a delay timer to do the same).
> 2) Some driver that I could use for inspiration?
Not that I know of.
--
Grant Edwards grant.b.edwards Yow! Are we THERE yet?
at
gmail.com
next prev parent reply other threads:[~2014-07-28 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 15:19 Support for RS485 on 8250 clone Ricardo Ribalda Delgado
2014-07-28 16:40 ` Grant Edwards [this message]
2014-07-29 6:10 ` Jiří Prchal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='lr5ude$f27$1@ger.gmane.org' \
--to=grant.b.edwards@gmail.com \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).