Hi Andy, On 07.12.23 13:35, Andy Shevchenko wrote: > On Wed, Dec 06, 2023 at 04:42:53PM +0100, Lino Sanfilippo wrote: >> On 27.11.23 13:14, Christoph Niedermaier wrote: >>> From: Lino Sanfilippo [mailto:LinoSanfilippo@xxxxxx] >>> Sent: Sunday, November 26, 2023 12:40 AM > > ... > >>> RS-485 (2-wire NO RX_DURING_TX): rs485->flags = SER_RS485_ENABLED|SER_RS485_MODE_HALF_DUPLEX >>> RS-485 (2-wire RX_DURING_TX): rs485->flags = SER_RS485_ENABLED|SER_RS485_MODE_HALF_DUPLEX|SER_RS485_RX_DURING_TX >> >> I think we can omit the SER_RS485_MODE_HALF_DUPLEX flag if we assume that >> a missing SER_RS485_MODE_FULL_DUPLEX means half duplex (i.e. controlling >> the RTS line). > > You should be very careful on these assumptions, i.e. one must to check _all_ > existing user space tools (at least that are in use / supplied by main distros) > on how they behave. > Until now the DUPLEX flags do not yet exist, so existing userspace applications are not concerned. Christoph suggested to introduce two flags to distinguish between a FULL duplex and a half duplex RS485 mode. My point was that we do not need the flag for half duplex, since this would be the default. BR, Lino