summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/95-upower-csr.rules1
-rw-r--r--src/linux/up-device-unifying.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/rules/95-upower-csr.rules b/rules/95-upower-csr.rules
index bd171b2..b8d92fe 100644
--- a/rules/95-upower-csr.rules
+++ b/rules/95-upower-csr.rules
@@ -22,6 +22,7 @@ LABEL="up_csr_end"
# Unifying HID++ devices
SUBSYSTEM!="hid", GOTO="up_unifying_end"
+ATTRS{idVendor}=="046d", ENV{UPOWER_VENDOR}="Logitech, Inc."
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", DRIVER=="logitech-djdevice", ENV{UPOWER_BATTERY_TYPE}="unifying"
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c532", DRIVER=="logitech-djdevice", ENV{UPOWER_BATTERY_TYPE}="unifying"
LABEL="up_unifying_end"
diff --git a/src/linux/up-device-unifying.c b/src/linux/up-device-unifying.c
index 4b659c3..633909f 100644
--- a/src/linux/up-device-unifying.c
+++ b/src/linux/up-device-unifying.c
@@ -123,6 +123,7 @@ up_device_unifying_coldplug (UpDevice *device)
const gchar *bus_address;
const gchar *device_file;
const gchar *type;
+ const gchar *vendor;
gboolean ret = FALSE;
gchar *endptr = NULL;
gchar *tmp;
@@ -198,9 +199,13 @@ up_device_unifying_coldplug (UpDevice *device)
goto out;
}
+ vendor = g_udev_device_get_property (native, "UPOWER_VENDOR");
+ if (vendor == NULL)
+ vendor = g_udev_device_get_property (native, "ID_VENDOR");
+
/* set some default values */
g_object_set (device,
- "vendor", g_udev_device_get_property (native, "ID_VENDOR"),
+ "vendor", vendor,
"type", up_device_unifying_get_device_kind (unifying),
"model", hidpp_device_get_model (unifying->priv->hidpp_device),
"has-history", TRUE,