summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
Commit message (Collapse)AuthorAgeFilesLines
* As default behaviour, use hwdata files for pci and usb ids files.gregory guy2021-06-131-2/+2
| | | | Signed-off-by: gregory guy <gregory-tde@laposte.net>
* Build tdehw library as a standalone library.Slávek Banko2021-05-071-0/+7
| | | | | | This causes tdecore API change! Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehw lib: fixed detection of mountable optical disks with incompleteMichele Calgaro2020-11-221-6/+8
| | | | | | partition table. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Fixed mounting and unmounting of mapped storage devices.Michele Calgaro2020-10-101-6/+31
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Fixed displaying of encrypted disks.Michele Calgaro2020-10-101-11/+9
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Add regular monitoring of power supply device status,Slávek Banko2020-10-071-1/+10
| | | | | | | | | to be able to generate a signal when the power state changes, if the signal is not generated from udev. This resolves issue TDE/tde#30. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Add event device classification according to the provided switches.Slávek Banko2020-02-231-3/+9
| | | | | | | This will resolve event device detection on special hardware, for example, the LID switch on Pinebook Pro. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Unify units of battery values.Slávek Banko2020-02-161-8/+42
| | | | | | | | | | The values from energy_* and power_now are converted from mWh and mW to Ah and A, so that the units are equal to values from charge_* and current_now. This resolves issue #68. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Removed explicit usage of the 'register' keyword.Michele Calgaro2020-01-301-1/+1
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Adjusted parsing of battery informationSlávek Banko2020-01-231-8/+24
| | | | | | | | | | | + Added reading of estimated time to fully charged battery (time_to_full_now) The remaining time is calculated if the value is not provided in the battery information. If the battery does not provide charging current information, the estimated time to charge the battery cannot be calculated. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Fix parsing of CPU cores frequency informationSlávek Banko2020-01-091-77/+71
| | | | | | | | | | | | | | | | + The current frequency is parsed from the scaling_cur_freq file If the current frequency is not found in /proc/cpuinfo, the attempt to read value from cpuinfo_cur_freq failed because only root can read this file. + The have_frequency flag is not set when parsing current frequency from sysfs Setting the have_frequency flag after parsing current frequency for the first core caused the current frequency not to be parsed for other cores. + Frequency characteristics are parsed for all cores The assumption that the frequency characteristics for all cores will be the same as the first core is no longer reliable. There are heterogeneous architectures - for example ARM big.LITTLE. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehw: Fix wrong merge location in prior commit.Slávek Banko2020-01-081-3/+3
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Adjusted parsing of battery informationSlávek Banko2020-01-081-9/+28
| | | | | | | | | | | | | | | | | | | | | | + Added initialization of all values Some batteries do not provide all values and, without initialization, values may contain dubious data. + Added reading of current battery capacity value in percent (capacity) Some batteries may provide the current capacity value in percent instead of the current energy value. + Added check whether the battery provides current energy value (charge_now or energy_now) The current energy is calculated if the value is not provided in the battery information. + Added reading of estimated time to empty battery (time_to_empty_now) The remaining time is calculated if the value is not provided in the battery information. If the battery does not provide charging current information, the estimated time to charge the battery cannot be calculated. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Classify the charger as an AC adapter, not as a battery.Slávek Banko2020-01-081-0/+1
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Normalized names of devices to avoid unintentional mixed used of icons from ↵Michele Calgaro2019-07-081-1/+1
| | | | | | | | different icon themes. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw: TRUE/FALSE --> true/false renaming.Michele Calgaro2019-07-071-5/+5
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw: improved code for mount table.Michele Calgaro2019-07-051-19/+17
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Use new function TQT_DBusData::getAsVariantData() instead of localMichele Calgaro2019-05-161-14/+0
| | | | | | version of it. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Fix the flag setting whether the storage device contains the file ↵Slávek Banko2019-02-271-1/+1
| | | | | | | | system. This resolves bug 2232, bug 2607 and bug 2946. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix crash in tdehwlib if /sys/devices/system/cpu/cpu* is not accessibleSlávek Banko2017-09-231-3/+5
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Add a rule for classifying parport deviceSlávek Banko2017-06-171-1/+2
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Add a rule for classifying remote control devicesSlávek Banko2017-06-171-0/+4
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Allow to gather connection information on virtual net devicesSlávek Banko2017-06-171-1/+2
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Allow to classify virtual devices by subsystemSlávek Banko2017-06-171-3/+3
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix memory leak after processing udev_monitorSlávek Banko2017-03-251-0/+3
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix memory leak after processing udev_deviceSlávek Banko2017-03-251-0/+2
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Probe partitions to get filesystem typeTimothy Pearson2016-09-051-4/+2
| | | | This fixes problems with LUKS partitions not being detected
* Properly classify Lenovo USB camera platform subdevicesTimothy Pearson2016-09-051-0/+5
|
* Add IBM VIO deviceTimothy Pearson2016-07-231-0/+3
|
* Add nvmem device typeTimothy Pearson2016-07-231-0/+12
|
* tdecore: Improved code for hybrid suspend (aka suspend to RAM + suspend to ↵Michele Calgaro2016-05-021-7/+21
| | | | | | | | disk). Now code is more consistent. This relates to bug 2601. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdecore: Initial support for hybrid suspend (aka suspend to RAM + suspend to ↵Michele Calgaro2016-04-241-0/+6
| | | | | | | | | disk). Update to dbus interface and hardware device manager will be commit separately. This relates to bug 2601. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Fix crash in tdehwlib on partitions without parent diskSlávek Banko2016-02-111-6/+9
| | | | | | This applies for example to the software RAID defined in the BIOS Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix mountable flag for disk partitionsSlávek Banko2016-02-041-1/+5
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Add a rule for classifying ATA Compact Flash AdapterSlávek Banko2016-02-041-1/+2
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Set partition disk type and status based on the parent deviceSlávek Banko2016-02-041-1/+15
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Set hotpluggable flag for flash disks instead of removableSlávek Banko2016-02-041-1/+1
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Force removable flag for flask disks in tdehwlibSlávek Banko2016-01-311-0/+10
| | | | | | This resolves Bug 2473 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix crash in tdehwlib if not exists /sys/devices/system/cpuSlávek Banko2016-01-271-13/+15
| | | | | | This resolves Bug 2584 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix ZIP drive classification in tdehwlibSlávek Banko2016-01-271-8/+9
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Classify flash drives as HDD in tdehwlibSlávek Banko2016-01-271-1/+6
| | | | | | This relates to Bug 2473 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Prefer encoded disk labels in tdehwlibSlávek Banko2016-01-231-1/+7
| | | | | | because it contains unadjusted disk labels Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Add floppy into disk type clasification in tdehwlibSlávek Banko2016-01-231-0/+5
| | | | | | This resolves Bug 2567 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix disk type clasification in tdehwlibSlávek Banko2016-01-231-12/+6
| | | | | | This resolves Bug 2473 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix calculation of remaining charging time in TDE hardware librarySlávek Banko2015-12-041-2/+7
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Fix hardware class file matching algorithmTimothy Pearson2015-09-301-15/+49
| | | | | Fix overly broad floppy device matching rules This resolves Bug 2534
* Add new timekeeping class to tdehwlibTimothy Pearson2015-09-211-0/+31
| | | | Classify a number of new devices
* Add fingerprint reader and test/measurement devices classes to tdehwlibTimothy Pearson2015-09-211-8/+34
|
* Add preliminary cryptographic card support to TDEHWLibTimothy Pearson2015-08-251-1/+2
|
* Add cryptographic card device typeTimothy Pearson2015-08-241-3/+29
| | | | | Add hub device type Fix incorrect USB subclass read