All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mychaela Falconia <mychaela.falconia@gmail.com>
To: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH 0/3] a family of FTDI-based devices that need ftdi_sio quirks
Date: Mon, 30 Nov 2020 12:15:51 -0800	[thread overview]
Message-ID: <CA+uuBqaUqkVQ0JCS-_OMT3tApxswHDFCpXjrPFzftn2VEGAjVg@mail.gmail.com> (raw)
In-Reply-To: <X8UMJ9a051tT1rbz@localhost>

Hi Johan,

Thank you for finally taking the time to address the issue at hand.
Your generalized solution and your reimplementation of my DUART28C
quirk using your new tty port flag would indeed solve my immediate
problem of getting mainline Linux support for FreeCalypso DUART28C, so
I would be perfectly happy if your new patch series gets mainlined.

> I don't think we need to change the B0 handling. It will never be set
> unless explicitly requested by the user.

I originally thought that DTR & RTS assertion upon change from B0 to
Bxxx had to be suppressed because I thought that the initial termios
state of a completely cold ttyUSB port (created upon USB device plug-in
but never opened) had B0 in it - but now I see that this cold initial
state is B9600 rather than B0, so indeed you are right in that B0 can
only be set by users and thus can be ignored for purposes of
legacy-gunk-free custom hw like mine.

> I'm adding a new tty port flag that can be used to suppress the
> assertion of DTR/RTS to signal DTE readiness on open named NORDY.
> Eventually we can expose it through termios to match HUPCL that controls
> the behaviour on final close. For now I'm only adding a sysfs interface
> but that also allows control over these signals on first open.

I don't see how exposing this new flag via termios would be of any use
(it's a chicken and egg problem: one needs to open the tty device in
order to do termios ioctls on it, and if that initial open triggers
DTR/RTS hardware actions, then the end user is still screwed), but
making this flag accessible for setting and clearing via sysfs is a
good idea.

For hardware engineers like me who design and build their own boards
with the USB-serial chip fully embedded and who have their own custom
USB IDs, applying a driver quirk tied to that custom USB ID is still
the best solution in terms of ultimate friendliness to the lowly end
user of the finished hardware.  But for users who don't have the
luxury of a custom USB ID, i.e., users of a non-DTR-RTS-glitch-tolerant
RS-232 device connected to a standard PC COM port or via a generic
off-the-shelf USB to serial DE9M cable, being able to set the needed
quirk via sysfs can be a life saver.

> Your FTDI quirk now only needs to set this flag on probe to override the
> default behaviour. The end result with respect to your device should be
> the same except for B0, which is still handled as before.

LGTM,
Mychaela

  reply	other threads:[~2020-11-30 20:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  1:56 [PATCH 0/3] a family of FTDI-based devices that need ftdi_sio quirks Mychaela N. Falconia
2020-09-29 10:13 ` Johan Hovold
2020-09-29 19:40   ` Mychaela Falconia
2020-10-05 10:57     ` Johan Hovold
2020-10-05 20:02       ` Mychaela Falconia
2020-10-27 20:18         ` Mychaela Falconia
2020-10-28  7:17           ` Johan Hovold
2020-11-30 15:13         ` Johan Hovold
2020-11-30 20:15           ` Mychaela Falconia [this message]
2020-12-01  9:00             ` Johan Hovold

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=CA+uuBqaUqkVQ0JCS-_OMT3tApxswHDFCpXjrPFzftn2VEGAjVg@mail.gmail.com \
    --to=mychaela.falconia@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-usb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.