On Thu, 17 Feb 2011 14:28:36 +0100, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
wrote:
There are standardised ioctls for RS485 mode and the like. So just add
support for those and submit a patch. (TIOCGRS485/TIOCSRS485).
The functionality I was referring to was the software mode selection
supported by the Edgeport hard-/firmware as described in their ionmode.c
utility:
* Usage: iontty [-h] [-v] -F ttyname [mode modeval]
* For example:
* iontty -F /dev/ttyUSB0 mode 0 # Sets RS232
* iontty -F /dev/ttyUSB0 mode 9 # Sets RS422...
* iontty -F /dev/ttyUSB0 mode 0x0D # Sets RS485...
*
* Where the possible mode values are (note the duplicate values
* are intentional and they can be expressed in decimal, hex or
* octal):
* Modeval Description
* ------- -----------
* 0x00 RS232
* 0x01 RS422: No Terminating Resistor
* 0x09 RS422: Terminating Resistor
* 0x0D RS485: Half Duplex, End Unit, Echo
* 0x0F RS485: Half Duplex, End Unit, No Echo
* 0x05 RS485: Half Duplex, Middle Unit, Echo
* 0x07 RS485: Half Duplex, Middle Unit, No Echo
* 0x09 RS485: Full Duplex, End Unit, Master
* 0x0D RS485: Full Duplex, End Unit, Slave
* 0x01 RS485: Full Duplex, Middle Unit, Master
* 0x05 RS485: Full Duplex, Middle Unit, Slave
*
As you can see, this device can be configured for five different modes of
RS-485 operation, hence I'm not sure how the generic TIOCGRS485/TIOCSRS485
maps to these.
Or are you saying that the driver does not support RS-485 at all, even if
the port is configured as such? I was under the impression that this was
already handled in the top-level serial driver?
Or do you refer to user-space control of RX/TX? I thought that was
handled directly by the hard-/firmware of the Edgeport device?
-Frode
--
^ Frode Tennebà | email: frode@xxxxxxxxxxx | Frode@IRC ^
| with Standard.Disclaimer; use Standard.Disclaimer; |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html