Skip to content

Commit 987fd0a

Browse files
authored
Add support for HID over SPI (#486)
This adds (or more accurately completes, since it was already started) support for HID over SPI devices. Handling is almost identical to HID over I2C.
1 parent 663f1a7 commit 987fd0a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

linux/hid.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ static struct hid_device_info * create_device_info_for_device(struct udev_device
593593
case BUS_BLUETOOTH:
594594
case BUS_I2C:
595595
case BUS_USB:
596+
case BUS_SPI:
596597
break;
597598

598599
default:
@@ -681,6 +682,14 @@ static struct hid_device_info * create_device_info_for_device(struct udev_device
681682

682683
break;
683684

685+
case BUS_SPI:
686+
cur_dev->manufacturer_string = wcsdup(L"");
687+
cur_dev->product_string = utf8_to_wchar_t(product_name_utf8);
688+
689+
cur_dev->bus_type = HID_API_BUS_SPI;
690+
691+
break;
692+
684693
default:
685694
/* Unknown device type - this should never happen, as we
686695
* check for USB and Bluetooth devices above */

0 commit comments

Comments
 (0)