mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-08 07:33:53 +01:00
Add LOGITECH_DEVICE macro for declaring Logitech devices in drivers
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -135,28 +135,21 @@ hidpp10drv_remove(struct ratbag_device *device)
|
||||
}
|
||||
|
||||
#define USB_VENDOR_ID_LOGITECH 0x046d
|
||||
#define LOGITECH_DEVICE(_bus, _pid) \
|
||||
{ .bustype = (_bus), \
|
||||
.vendor = USB_VENDOR_ID_LOGITECH, \
|
||||
.product = (_pid), \
|
||||
.version = VERSION_ANY },
|
||||
|
||||
static const struct ratbag_id hidpp10drv_table[] = {
|
||||
/* M705 */
|
||||
{.id = { .bustype = BUS_USB,
|
||||
.vendor = USB_VENDOR_ID_LOGITECH,
|
||||
.product = 0x101b,
|
||||
.version = VERSION_ANY },
|
||||
},
|
||||
{ .id = LOGITECH_DEVICE(BUS_USB, 0x101b) },
|
||||
|
||||
/* M570 */
|
||||
{.id = { .bustype = BUS_USB,
|
||||
.vendor = USB_VENDOR_ID_LOGITECH,
|
||||
.product = 0x1028,
|
||||
.version = VERSION_ANY },
|
||||
},
|
||||
{ .id = LOGITECH_DEVICE(BUS_USB, 0x1028) },
|
||||
|
||||
/* G500s */
|
||||
{.id = { .bustype = BUS_USB,
|
||||
.vendor = USB_VENDOR_ID_LOGITECH,
|
||||
.product = 0xc24e,
|
||||
.version = VERSION_ANY },
|
||||
},
|
||||
{ .id = LOGITECH_DEVICE(BUS_USB, 0xc24e) },
|
||||
|
||||
{ },
|
||||
};
|
||||
|
||||
@@ -372,28 +372,21 @@ hidpp20drv_remove(struct ratbag_device *device)
|
||||
}
|
||||
|
||||
#define USB_VENDOR_ID_LOGITECH 0x046d
|
||||
#define LOGITECH_DEVICE(_bus, _pid) \
|
||||
{ .bustype = (_bus), \
|
||||
.vendor = USB_VENDOR_ID_LOGITECH, \
|
||||
.product = (_pid), \
|
||||
.version = VERSION_ANY },
|
||||
|
||||
static const struct ratbag_id hidpp20drv_table[] = {
|
||||
/* MX Master over unifying */
|
||||
{.id = { .bustype = BUS_USB,
|
||||
.vendor = USB_VENDOR_ID_LOGITECH,
|
||||
.product = 0x4041,
|
||||
.version = VERSION_ANY },
|
||||
},
|
||||
{ .id = LOGITECH_DEVICE(BUS_USB, 0x4041) },
|
||||
|
||||
/* MX Master over bluetooth */
|
||||
{.id = { .bustype = BUS_BLUETOOTH,
|
||||
.vendor = USB_VENDOR_ID_LOGITECH,
|
||||
.product = 0xb012,
|
||||
.version = VERSION_ANY },
|
||||
},
|
||||
{ .id = LOGITECH_DEVICE(BUS_BLUETOOTH, 0xb012) },
|
||||
|
||||
/* T650 over unifying */
|
||||
{.id = { .bustype = BUS_USB,
|
||||
.vendor = USB_VENDOR_ID_LOGITECH,
|
||||
.product = 0x4101,
|
||||
.version = VERSION_ANY },
|
||||
},
|
||||
{ .id = LOGITECH_DEVICE(BUS_USB, 0x4101) },
|
||||
|
||||
{ },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user