summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-21 16:39:50 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-21 16:39:50 -0500
commit6a0fb5c342285314621a127d307d35ca8057ab5f (patch)
tree23157d4fc831166af3184aa11b710d5e90622559 /tdecore/tdehw/tdehardwaredevices.cpp
parent7fc4b62912ca770bf1018fb6deeccc5cf98d9600 (diff)
downloadtdelibs-6a0fb5c342285314621a127d307d35ca8057ab5f.tar.gz
tdelibs-6a0fb5c342285314621a127d307d35ca8057ab5f.zip
Add new timekeeping class to tdehwlib
Classify a number of new devices
Diffstat (limited to 'tdecore/tdehw/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 9b21a4b0e..3c08cfcda 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -1402,6 +1402,9 @@ TDEGenericDeviceType::TDEGenericDeviceType readGenericDeviceTypeFromString(TQStr
else if (query == "TestAndMeasurement") {
ret = TDEGenericDeviceType::TestAndMeasurement;
}
+ else if (query == "Timekeeping") {
+ ret = TDEGenericDeviceType::Timekeeping;
+ }
else if (query == "Event") {
ret = TDEGenericDeviceType::Event;
}
@@ -2043,9 +2046,13 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
}
if ((devicetypestring == "audio")
|| (devicesubsystem == "sound")
+ || (devicesubsystem == "hdaudio")
|| (devicesubsystem == "ac97")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Sound);
}
+ if (devicesubsystem == "container") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherACPI);
+ }
if ((devicesubsystem == "video4linux")
|| (devicesubsystem == "dvb")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::VideoCapture);
@@ -2089,10 +2096,19 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
|| (devicesubsystem == "amba")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
+ if (devicesubsystem == "edac") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM);
+ }
+ if (devicesubsystem.startsWith("mc") && systempath.contains("/edac/")) {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM);
+ }
if ((devicesubsystem == "ipmi")
|| (devicesubsystem == "ipmi_si")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Mainboard);
}
+ if (devicesubsystem == "iommu") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
+ }
if (devicesubsystem == "misc") {
if (devicedriver.startsWith("tpm_")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Cryptography);
@@ -2101,6 +2117,15 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
}
+ if (devicesubsystem == "media") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
+ }
+ if (devicesubsystem == "nd") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM);
+ }
+ if (devicesubsystem == "ptp") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Timekeeping);
+ }
if (devicesubsystem == "leds") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherACPI);
}
@@ -4116,6 +4141,9 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic
else if (query == TDEGenericDeviceType::TestAndMeasurement) {
ret = i18n("Test and Measurement");
}
+ else if (query == TDEGenericDeviceType::Timekeeping) {
+ ret = i18n("Timekeeping");
+ }
else if (query == TDEGenericDeviceType::Event) {
ret = i18n("Platform Event");
}
@@ -4283,6 +4311,9 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE
else if (query == TDEGenericDeviceType::TestAndMeasurement) {
ret = DesktopIcon("kcmdevices", size);
}
+ else if (query == TDEGenericDeviceType::Timekeeping) {
+ ret = DesktopIcon("history", size);
+ }
else if (query == TDEGenericDeviceType::Event) {
ret = DesktopIcon("preferences-system", size);
}