Re: Using Serdev is it Possible to Pull RX Low

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux