# Re: \[PATCH\] USB: serial: ti\_usb\_3410\_5052: Port uart\_mode from io\_ti.

- From: Stuart Longland \<hidden\>
- Date: 2017-08-18 03:16:25 
- List: linux-serial
- Page: https://ratatoskr.run/linux-serial/2017/08/16404262
- Thread: https://ratatoskr.run/linux-serial/2017/08/16404262/t.md

```text
Hi all,

On 18/08/17 12:56, Stuart Longland wrote:
> This introduces the `uart_mode` sysfs attribute as seen in the `io_ti`
> USB serial driver, allowing this USB serial interface to be switched
> between RS-232, 2-wire RS-485 and 4-wire RS-485.
> 
> /sys/class/tty/ttyUSB${num}/device/uart takes a single integer:
… and of course, I meant 'uart_mode' here, not 'uart'.

> 
> 	0:	RS-232 mode (default for RS-232-compatible dongles)
> 	1:	RS-485 2w mode (default for RS-485-only dongles)
> 	2:	RS-485 4w mode / RS-422 mode

This is of course, not a very elegant solution, but it gets me out of a
bind for now and at least gets the RS-485 functionality of this USB
serial dongle working.

Long term, I think the earlier ideas of expanding the RS-485 related
ioctls should be pursued.  I'm open to ideas here.

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-serial/2017/08/16404262/attachment/0) (application/pgp-signature, 833 bytes)
