summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace KDE_[NO_]EXPORT with TDE_[NO_]EXPORTMichele Calgaro2024-05-011-1/+1
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT definesMichele Calgaro2024-01-121-6/+6
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* Fix lvm volumes appearing as removable devicesAlexander Golubev2023-12-281-52/+21
| | | | | | | | | | | | | | - remove obsolete/erroneous code meddling with GENHD_FL_MEDIA_CHANGE_NOTIFY - use /sys/block/<dev>/removable rather than /sys/block/<dev>/capabilities - deprecate TDEDiskDeviceStatus::Hotpluggable and use TDEDiskDeviceStatus::Removable for all removable devices - put some local utility function into anonymous namespace See https://mirror.git.trinitydesktop.org/gitea/TDE/tde/issues/148 Signed-off-by: Alexander Golubev <[email protected]>
* Added compatibility for hwlib support for muslormorph2022-12-141-2/+2
| | | | Signed-off-by: ormorph <[email protected]>
* tdehw lib: make sure to emit hardwareRemoved signal after removing the ↵Michele Calgaro2022-03-161-3/+8
| | | | | | device from the device list. Signed-off-by: Michele Calgaro <[email protected]>
* tdehw: make rtc devices appear as Timekeeping rather than Mainboard devicesAlexander Golubev2022-02-151-3/+3
| | | | Signed-off-by: Alexander Golubev <[email protected]>
* tdehw lib: reworked device notifications to avoid repeated scanning of devices.Michele Calgaro2021-08-131-65/+46
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* Removed unused code related to hardware events.Michele Calgaro2021-08-021-18/+0
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* As default behaviour, use hwdata files for pci and usb ids files.gregory guy2021-06-131-2/+2
| | | | Signed-off-by: gregory guy <[email protected]>
* 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 <[email protected]>
* tdehw lib: fixed detection of mountable optical disks with incompleteMichele Calgaro2020-11-221-6/+8
| | | | | | partition table. Signed-off-by: Michele Calgaro <[email protected]>
* Fixed mounting and unmounting of mapped storage devices.Michele Calgaro2020-10-101-6/+31
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* Fixed displaying of encrypted disks.Michele Calgaro2020-10-101-11/+9
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Removed explicit usage of the 'register' keyword.Michele Calgaro2020-01-301-1/+1
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* tdehw: Fix wrong merge location in prior commit.Slávek Banko2020-01-081-3/+3
| | | | Signed-off-by: Slávek Banko <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* tdehw: TRUE/FALSE --> true/false renaming.Michele Calgaro2019-07-071-5/+5
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* tdehw: improved code for mount table.Michele Calgaro2019-07-051-19/+17
| | | | Signed-off-by: Michele Calgaro <[email protected]>
* Use new function TQT_DBusData::getAsVariantData() instead of localMichele Calgaro2019-05-161-14/+0
| | | | | | version of it. Signed-off-by: Michele Calgaro <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* tdehwlib: Add a rule for classifying parport deviceSlávek Banko2017-06-171-1/+2
| | | | Signed-off-by: Slávek Banko <[email protected]>
* tdehwlib: Add a rule for classifying remote control devicesSlávek Banko2017-06-171-0/+4
| | | | Signed-off-by: Slávek Banko <[email protected]>
* tdehwlib: Allow to gather connection information on virtual net devicesSlávek Banko2017-06-171-1/+2
| | | | Signed-off-by: Slávek Banko <[email protected]>
* tdehwlib: Allow to classify virtual devices by subsystemSlávek Banko2017-06-171-3/+3
| | | | Signed-off-by: Slávek Banko <[email protected]>
* Fix memory leak after processing udev_monitorSlávek Banko2017-03-251-0/+3
| | | | Signed-off-by: Slávek Banko <[email protected]>
* Fix memory leak after processing udev_deviceSlávek Banko2017-03-251-0/+2
| | | | Signed-off-by: Slávek Banko <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Fix mountable flag for disk partitionsSlávek Banko2016-02-041-1/+5
| | | | Signed-off-by: Slávek Banko <[email protected]>
* Add a rule for classifying ATA Compact Flash AdapterSlávek Banko2016-02-041-1/+2
| | | | Signed-off-by: Slávek Banko <[email protected]>
* Set partition disk type and status based on the parent deviceSlávek Banko2016-02-041-1/+15
| | | | Signed-off-by: Slávek Banko <[email protected]>
* Set hotpluggable flag for flash disks instead of removableSlávek Banko2016-02-041-1/+1
| | | | Signed-off-by: Slávek Banko <[email protected]>
* Force removable flag for flask disks in tdehwlibSlávek Banko2016-01-311-0/+10
| | | | | | This resolves Bug 2473 Signed-off-by: Slávek Banko <[email protected]>
* 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 <[email protected]>
* Fix ZIP drive classification in tdehwlibSlávek Banko2016-01-271-8/+9
| | | | Signed-off-by: Slávek Banko <[email protected]>
* Classify flash drives as HDD in tdehwlibSlávek Banko2016-01-271-1/+6
| | | | | | This relates to Bug 2473 Signed-off-by: Slávek Banko <[email protected]>
* Prefer encoded disk labels in tdehwlibSlávek Banko2016-01-231-1/+7
| | | | | | because it contains unadjusted disk labels Signed-off-by: Slávek Banko <[email protected]>