All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: christopher tyerman <linuxkernel@firebladeautomationsystems.uk>
Cc: linux-serial@vger.kernel.org
Subject: Re: Using Serdev is it Possible to Pull RX Low
Date: Thu, 19 May 2022 09:02:39 +0200	[thread overview]
Message-ID: <YoXrj6r+rhpSpZXt@kroah.com> (raw)
In-Reply-To: <e92ad3ac-3d52-7f77-8839-74ef81a74154@firebladeautomationsystems.uk>

On Wed, May 18, 2022 at 07:11:38PM +0100, christopher tyerman wrote:
> On 18/05/2022 09:48, Greg KH wrote:> On Tue, May 17, 2022 at 07:42:46PM
> +0100, linuxkernel wrote:
> >> hello I, looking at writing a kernel driver for the Texas instruments
> >> TPS92662A/TPS92663A which uses a "UART bus" e.g
> >> |-----------|    |-----------|    |-----------|     |-----------|
> >> |           |    | TPS92662A |    | TPS92662A |     | TPS92663A |
> >> |   UART    |    | -Q1       |    | -Q1       |     | -Q1 	   |
> >> |           |    |           |    |           |     |           |
> >> |-----------|    |-----------|    |-----------|     |-----------|
> >>       |                |                |                 |
> >>       |                |                |                 |
> >>       |                |                |                 |
> >>       -----------------------------------------------------
> >> and control communications by specific sequencing. configuring this
> >> appears to require being able to pull RX Low
> >>> The MCU unit can reset the device UART and protocol state machine at
> >>> any time by holding the RX input low for a period of at least 12 bit
> >>> times (16 × 12 CLK periods).
> >> practically i can always pull RX low via other means, but if the UART
> >> can do this it would be better and be more generic.
> > How can your UART do that in a generic way? thanks, greg k-h sorry
> 
> im not sure i explained that clearly
> 
> i also appear to have, not got the previous diagram right, (corrected in
> this reply for clarity) Im still getting used to plain text emails.
> 
> im not that familiar with UARTs in practice, and after re-reading i think i
> could have phrased that better, as had issue with MCU/IC UART TX/RX
> perspectives
> 
> e.g
> 
> |-----------|           |-----------|
> |         TX|-----------|RX         |
> | MCU UART  |           |    IC     |
> |         RX|-----------|TX         |
> |-----------|           |-----------|
> 
> from the mcu perspective its the TX pin, while from the RX pin from the ICs
> perspective.
> 
> from that perspective i need to pull the ICs RX pin low which means pull the
> MCU UART TX pin Low.
> 
> now this seems conceptually similar to a "break condition"
> 
> which some tty functions can produce
> e.g
> static int send_break(struct tty_struct *tty, unsigned int duration)
> [https://elixir.bootlin.com/linux/latest/source/drivers tty/tty_io.c#L2461]
> 
> with which i might me half way to answering my own question
> 
> i can't see call to that via serdev, or equivalent
> 

That is correct, serdev can not handle break conditions on the tty port
right now.  You need to write a "real" serial driver if you want to have
that type of control over the connection.

You could propose a patch for serdev to handle break, try that and
submit it and see if the serdev maintainer agrees that it is a worth
addition.

thanks,

greg k-h

      reply	other threads:[~2022-05-19  7:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 18:42 Using Serdev is it Possible to Pull RX Low linuxkernel
2022-05-18  8:48 ` Greg KH
2022-05-18 18:11   ` christopher tyerman
2022-05-19  7:02     ` Greg KH [this message]

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=YoXrj6r+rhpSpZXt@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linuxkernel@firebladeautomationsystems.uk \
    /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.