Commit fd0286e8 authored by Arkadiusz Miskiewicz's avatar Arkadiusz Miskiewicz Committed by Richard Hughes

Repair vendor handling for Logitech Unifying devices

Set proper vendor via udev rules for unifying devices and handle
that in code.
Signed-off-by: Arkadiusz Miskiewicz's avatarArkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Richard Hughes's avatarRichard Hughes <richard@hughsie.com>
parent e571f840
......@@ -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"
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment