summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Keller <rainer.keller@digia.com>2014-09-26 14:42:20 +0200
committerRainer Keller <rainer.keller@digia.com>2014-09-29 09:30:08 +0200
commit2787010bbbc6d7350b49c879568da4b23e06d0bd (patch)
tree4689bae0d78b46fb22c3bfc8b5dac0328083c102
parent3a967ff35979196c8c97a066b5aa68c1b5d13494 (diff)
Handle onboard serial ports when parsing sysfs
The device detection stopped if one of the sources reported at least one device. This made onboard serial ports not listed if a USB device was plugged in. Onboard serial ports are now detected and added to the list of devices. Change-Id: I8798e7f14073e19d9e206eb4d7cdd0b28bd8a0bb Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r--src/serialport/qserialportinfo_unix.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp
index 9a146de8..9ff44311 100644
--- a/src/serialport/qserialportinfo_unix.cpp
+++ b/src/serialport/qserialportinfo_unix.cpp
@@ -202,6 +202,9 @@ QList<QSerialPortInfo> availablePortsBySysfs()
.toInt(&serialPortInfo.d_ptr->hasProductIdentifier, 16);
}
// TODO: Obtain more information about the device
+ } else if (targetPath.contains(QStringLiteral(".serial/tty/tty"))) {
+ // This condition matches onboard serial port on embedded devices.
+ // Keep those devices in the list
} else {
continue;
}