diff options
author | Michael Hanselmann <public@hansmi.ch> | 2020-07-04 20:25:03 +0200 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2020-07-06 11:25:07 +0200 |
commit | 0580baa46ef67069217bfeabd511ea036e58c1c0 (patch) | |
tree | 601313691266c6c25a6a054b06c9740a0f024055 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | cabe0785ff14e944ab1d828bed64e796e8f96594 (diff) |
USB: serial: ch341: simulate break condition if not supported
A subset of all CH341 devices don't support a real break condition. This
fact is already used in the "ch341_detect_quirks" function. With this
change a quirk is implemented to simulate a break condition by
temporarily lowering the baud rate and sending a NUL byte.
The primary drawbacks of this approach are that the duration of the
break can't be controlled by userland and that data incoming during
a simulated break is corrupted.
The "TTY_DRIVER_HARDWARE_BREAK" serial driver flag was investigated as
an alternative. It's a driver-wide flag and would've required
significant changes to the serial and USB-serial driver frameworks to
expose it for individual USB-serial adapters.
Tested by sending a break condition and watching the TX pin using an
oscilloscope.
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Link: https://lore.kernel.org/r/f34a9b6e-ec2a-0873-e97b-2d5b2170e2ff@msgid.hansmi.ch
[ johan: condense info message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions