public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: "Ильяс Гасанов" <torso.nafi@gmail.com>,
	"Matwey V. Kornilov" <matwey@sai.msu.ru>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485 direction control
Date: Thu, 18 Feb 2016 08:50:03 -0800	[thread overview]
Message-ID: <56C5F63B.1060306@hurleysoftware.com> (raw)
In-Reply-To: <CAEo2pzsRf++Yaexn2K=RTu=NJs6GwC=6DXC50a=Xv92FO8N7Vg@mail.gmail.com>

On 02/18/2016 01:46 AM, Ильяс Гасанов wrote:
> 2016-02-18 10:18 GMT+03:00 Ильяс Гасанов <torso.nafi@gmail.com>:
>> Also, forgot to mention that if serial8250_em485_init is called not
>> upon uart startup but elsewhere (upon port register for example), and
>> em485 is set, serial8250_do_startup should call
>> serial8250_em485_rts_after_send, or else RTS might be in wrong state
>> whenever the port device is opened, making it impossible to receive
>> data through RTS-controlled RS232<->RS485 hardware converters.
> 
> Just found out that it doesn't help. Actually, it is the behavior of
> tty_open function to call tty_port_block_til_ready after startup, and
> of the latter - to set RTS via ioctl if baud is not zero - both of
> which cannot be overriden within the scope of the 8250 framework. The
> reason this works in legacy omap_serial is that my GPIO which is used
> to emulate RTS is not tied to mctrl there, so the call of
> tty_port_block_til_ready does not affect its state.
> 
> Therefore, a check for SER_RS485_ENABLED needs to be introduced to
> tty_port_block_til_ready.

No, that's not the way.

First, there's plenty of driver hooks to properly manage the RTS level
for rs485.
Second, how are you running GPIO rts with the omap8250 driver?

  reply	other threads:[~2016-02-18 16:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 16:40 [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485 direction control Ильяс Гасанов
2016-02-11 19:08 ` Matwey V. Kornilov
2016-02-11 20:19   ` Ильяс Гасанов
2016-02-12  7:57     ` Matwey V. Kornilov
2016-02-12  9:39       ` Ильяс Гасанов
2016-02-17 16:56         ` Ильяс Гасанов
2016-02-18  7:18           ` Ильяс Гасанов
2016-02-18  9:46             ` Ильяс Гасанов
2016-02-18 16:50               ` Peter Hurley [this message]
2016-02-18 18:15                 ` Ильяс Гасанов
  -- strict thread matches above, loose matches on Subject: below --
2016-02-01 18:09 [PATCH v8 0/3] tty: Introduce software RS485 direction control support Matwey V. Kornilov
2016-02-01 18:09 ` [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485 direction control Matwey V. Kornilov

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=56C5F63B.1060306@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=matwey@sai.msu.ru \
    --cc=torso.nafi@gmail.com \
    /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