mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-01 20:47:59 +02:00
linux: explicitly recognize USB power supplies
Prevents a spurious warning: "did not recognise USB path /sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001, please report" This does not actually change any functionality, as the heuristic for the attribute "online" in up_device_supply_coldplug() would have matches id, too. Fixes #148
This commit is contained in:
parent
545e54713a
commit
1b1f8f375c
1 changed files with 2 additions and 0 deletions
|
|
@ -1093,6 +1093,8 @@ up_device_supply_guess_type (GUdevDevice *native,
|
|||
/* use a heuristic to find the device type */
|
||||
if (g_strstr_len (native_path, -1, "wacom_") != NULL) {
|
||||
type = UP_DEVICE_KIND_TABLET;
|
||||
} else if (g_strstr_len (native_path, -1, "ucsi-source-psy-") != NULL) {
|
||||
type = UP_DEVICE_KIND_LINE_POWER;
|
||||
} else {
|
||||
g_warning ("did not recognise USB path %s, please report",
|
||||
native_path);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue