Answers:
作为每个驱动程序的参数传递给hid_hw_start()
/ hid_connect()
。例如:
hid-thingm.c: err = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
我想大多数司机都会做这样的事情:
hid-logitech-dj.c: retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
而HID_CONNECT_DEFAULT
包括HID_CONNECT_HIDRAW
:
#define HID_CONNECT_DEFAULT (HID_CONNECT_HIDINPUT|HID_CONNECT_HIDRAW| \
HID_CONNECT_HIDDEV|HID_CONNECT_FF)
hidraw
和都会发生完全相同的事情hiddev
。