Commit 186f3ff7 authored by Jakob Bornecrantz's avatar Jakob Bornecrantz

st/prober: Ignore I2C based hid devices

parent 5f4ddcc4
......@@ -25,6 +25,7 @@
#define HIDRAW_BUS_USB 3
#define HIDRAW_BUS_BLUETOOTH 5
#define HIDRAW_BUS_I2C_MAYBE_QUESTION_MARK 24
/*
......@@ -398,6 +399,24 @@ p_udev_enumerate_hidraw(struct prober *p, struct udev *udev)
goto next;
}
// Get USB bus and address to de-dublicate devices.
ret = p_udev_get_usb_hid_address(raw_dev, bus_type, &dev_class,
&usb_bus, &usb_addr);
if (ret != 0) {
P_ERROR(p, "Failed to get USB bus and addr.");
goto next;
}
switch (bus_type) {
case HIDRAW_BUS_BLUETOOTH:
case HIDRAW_BUS_USB: break;
case HIDRAW_BUS_I2C_MAYBE_QUESTION_MARK: goto next;
default:
P_ERROR(p, "Unknown hidraw bus_type: '%i', ignoring.",
bus_type);
goto next;
}
// HID interface.
ret = p_udev_get_interface_number(raw_dev, &interface);
if (ret != 0) {
......@@ -408,14 +427,6 @@ p_udev_enumerate_hidraw(struct prober *p, struct udev *udev)
goto next;
}
// Get USB bus and address to de-dublicate devices.
ret = p_udev_get_usb_hid_address(raw_dev, bus_type, &dev_class,
&usb_bus, &usb_addr);
if (ret != 0) {
P_ERROR(p, "Failed to get USB bus and addr.");
goto next;
}
if (bus_type == HIDRAW_BUS_BLUETOOTH) {
ret = p_dev_get_bluetooth_dev(
p, bluetooth_id, vendor_id, product_id, &pdev);
......
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