/Linux-v5.4/drivers/hid/ |
D | Makefile | 5 hid-y := hid-core.o hid-input.o hid-quirks.o 6 hid-$(CONFIG_DEBUG_FS) += hid-debug.o 8 obj-$(CONFIG_HID) += hid.o 11 obj-$(CONFIG_HID_GENERIC) += hid-generic.o 13 hid-$(CONFIG_HIDRAW) += hidraw.o 15 hid-logitech-y := hid-lg.o 16 hid-logitech-$(CONFIG_LOGITECH_FF) += hid-lgff.o 17 hid-logitech-$(CONFIG_LOGIRUMBLEPAD2_FF) += hid-lg2ff.o 18 hid-logitech-$(CONFIG_LOGIG940_FF) += hid-lg3ff.o 19 hid-logitech-$(CONFIG_LOGIWHEELS_FF) += hid-lg4ff.o [all …]
|
D | hid-lg4ff.c | 61 static void lg4ff_set_range_dfp(struct hid_device *hid, u16 range); 62 static void lg4ff_set_range_g25(struct hid_device *hid, u16 range); 79 void (*set_range)(struct hid_device *hid, u16 range); 103 void (*set_range)(struct hid_device *hid, u16 range); 300 int lg4ff_adjust_input_event(struct hid_device *hid, struct hid_field *field, in lg4ff_adjust_input_event() argument 307 hid_err(hid, "Device properties not found"); in lg4ff_adjust_input_event() 408 struct hid_device *hid = input_get_drvdata(dev); in lg4ff_play() local 415 drv_data = hid_get_drvdata(hid); in lg4ff_play() 417 hid_err(hid, "Private driver data not found!\n"); in lg4ff_play() 423 hid_err(hid, "Device properties not found!\n"); in lg4ff_play() [all …]
|
D | hid-cmedia.c | 45 struct hid_device *hid; member 49 static void hp_ev(struct hid_device *hid, struct cmhid *cm, int value) in hp_ev() argument 55 static int cmhid_raw_event(struct hid_device *hid, struct hid_report *report, in cmhid_raw_event() argument 58 struct cmhid *cm = hid_get_drvdata(hid); in cmhid_raw_event() 66 hp_ev(hid, cm, 0); in cmhid_raw_event() 70 hp_ev(hid, cm, 1); in cmhid_raw_event() 78 static int cmhid_input_configured(struct hid_device *hid, in cmhid_input_configured() argument 82 struct cmhid *cm = hid_get_drvdata(hid); in cmhid_input_configured() 94 static int cmhid_input_mapping(struct hid_device *hid, in cmhid_input_mapping() argument 101 static int cmhid_probe(struct hid_device *hid, const struct hid_device_id *id) in cmhid_probe() argument [all …]
|
D | hid-bigbenff.c | 175 struct hid_device *hid; member 203 hid_hw_request(bigben->hid, bigben->report, HID_REQ_SET_REPORT); in bigben_worker() 216 hid_hw_request(bigben->hid, bigben->report, HID_REQ_SET_REPORT); in bigben_worker() 248 struct hid_device *hid = to_hid_device(dev); in bigben_set_led() local 249 struct bigben_device *bigben = hid_get_drvdata(hid); in bigben_set_led() 254 hid_err(hid, "no device data\n"); in bigben_set_led() 280 struct hid_device *hid = to_hid_device(dev); in bigben_get_led() local 281 struct bigben_device *bigben = hid_get_drvdata(hid); in bigben_get_led() 285 hid_err(hid, "no device data\n"); in bigben_get_led() 297 static void bigben_remove(struct hid_device *hid) in bigben_remove() argument [all …]
|
D | hid-mf.c | 36 struct hid_device *hid = input_get_drvdata(dev); in mf_play() local 52 hid_hw_request(hid, mf->report, HID_REQ_SET_REPORT); in mf_play() 57 static int mf_init(struct hid_device *hid) in mf_init() argument 62 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in mf_init() 67 struct list_head *input_ptr = &hid->inputs; in mf_init() 79 hid_err(hid, "Invalid report, this should never happen!\n"); in mf_init() 83 if (list_is_last(input_ptr, &hid->inputs)) { in mf_init() 84 hid_err(hid, "Missing input, this should never happen!\n"); in mf_init() 107 hid_hw_request(hid, mf->report, HID_REQ_SET_REPORT); in mf_init() 110 hid_info(hid, "Force feedback for HJZ Mayflash game controller " in mf_init() [all …]
|
D | hid-appleir.c | 109 struct hid_device *hid; member 151 static void key_up(struct hid_device *hid, struct appleir *appleir, int key) in key_up() argument 157 static void key_down(struct hid_device *hid, struct appleir *appleir, int key) in key_down() argument 171 struct hid_device *hid = appleir->hid; in key_up_tick() local 176 key_up(hid, appleir, appleir->current_key); in key_up_tick() 182 static int appleir_raw_event(struct hid_device *hid, struct hid_report *report, in appleir_raw_event() argument 185 struct appleir *appleir = hid_get_drvdata(hid); in appleir_raw_event() 203 key_up(hid, appleir, appleir->current_key); in appleir_raw_event() 214 key_down(hid, appleir, appleir->current_key); in appleir_raw_event() 232 key_down(hid, appleir, appleir->current_key); in appleir_raw_event() [all …]
|
D | hid-input.c | 64 return (usage->hid & (HID_USAGE_PAGE | HID_USAGE)) == scancode; in match_scancode() 85 static struct hid_usage *hidinput_find_key(struct hid_device *hid, in hidinput_find_key() argument 95 list_for_each_entry(report, &hid->report_enum[k].report_list, list) { in hidinput_find_key() 114 static struct hid_usage *hidinput_locate_usage(struct hid_device *hid, in hidinput_locate_usage() argument 122 usage = hidinput_find_key(hid, match_index, ke->index, index); in hidinput_locate_usage() 124 usage = hidinput_find_key(hid, match_scancode, scancode, index); in hidinput_locate_usage() 134 struct hid_device *hid = input_get_drvdata(dev); in hidinput_getkeycode() local 138 usage = hidinput_locate_usage(hid, ke, &index); in hidinput_getkeycode() 143 scancode = usage->hid & (HID_USAGE_PAGE | HID_USAGE); in hidinput_getkeycode() 156 struct hid_device *hid = input_get_drvdata(dev); in hidinput_setkeycode() local [all …]
|
D | hid-holtekff.c | 76 struct hid_device *hid, in holtekff_send() argument 87 hid_hw_request(hid, holtekff->field->report, HID_REQ_SET_REPORT); in holtekff_send() 93 struct hid_device *hid = input_get_drvdata(dev); in holtekff_play() local 105 holtekff_send(holtekff, hid, stop_all6); in holtekff_play() 117 holtekff_send(holtekff, hid, buf); in holtekff_play() 118 holtekff_send(holtekff, hid, start_effect_1); in holtekff_play() 123 static int holtekff_init(struct hid_device *hid) in holtekff_init() argument 129 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in holtekff_init() 133 if (list_empty(&hid->inputs)) { in holtekff_init() 134 hid_err(hid, "no inputs found\n"); in holtekff_init() [all …]
|
D | hid-creative-sb0540.c | 119 struct hid_device *hid; member 149 static int creative_sb0540_raw_event(struct hid_device *hid, in creative_sb0540_raw_event() argument 152 struct creative_sb0540 *creative_sb0540 = hid_get_drvdata(hid); in creative_sb0540_raw_event() 172 hid_err(hid, "Could not get a key for main_code %llX\n", in creative_sb0540_raw_event() 185 static int creative_sb0540_input_configured(struct hid_device *hid, in creative_sb0540_input_configured() argument 189 struct creative_sb0540 *creative_sb0540 = hid_get_drvdata(hid); in creative_sb0540_input_configured() 209 static int creative_sb0540_input_mapping(struct hid_device *hid, in creative_sb0540_input_mapping() argument 220 static int creative_sb0540_probe(struct hid_device *hid, in creative_sb0540_probe() argument 226 creative_sb0540 = devm_kzalloc(&hid->dev, in creative_sb0540_probe() 232 creative_sb0540->hid = hid; in creative_sb0540_probe() [all …]
|
D | hid-tmff.c | 76 struct hid_device *hid = input_get_drvdata(dev); in tmff_play() local 95 hid_hw_request(hid, tmff->report, HID_REQ_SET_REPORT); in tmff_play() 107 if (hid->product == THRUSTMASTER_DEVICE_ID_2_IN_1_DT) { in tmff_play() 116 hid_hw_request(hid, tmff->report, HID_REQ_SET_REPORT); in tmff_play() 122 static int tmff_init(struct hid_device *hid, const signed short *ff_bits) in tmff_init() argument 132 if (list_empty(&hid->inputs)) { in tmff_init() 133 hid_err(hid, "no inputs found\n"); in tmff_init() 136 hidinput = list_entry(hid->inputs.next, struct hid_input, list); in tmff_init() 144 report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; in tmff_init() 154 switch (field->usage[0].hid) { in tmff_init() [all …]
|
D | hid-dr.c | 34 struct hid_device *hid = input_get_drvdata(dev); in drff_play() local 57 hid_hw_request(hid, drff->report, HID_REQ_SET_REPORT); in drff_play() 69 hid_hw_request(hid, drff->report, HID_REQ_SET_REPORT); in drff_play() 74 static int drff_init(struct hid_device *hid) in drff_init() argument 80 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in drff_init() 84 if (list_empty(&hid->inputs)) { in drff_init() 85 hid_err(hid, "no inputs found\n"); in drff_init() 88 hidinput = list_first_entry(&hid->inputs, struct hid_input, list); in drff_init() 92 hid_err(hid, "no output reports found\n"); in drff_init() 98 hid_err(hid, "no fields in the report\n"); in drff_init() [all …]
|
D | uhid.c | 36 struct hid_device *hid; member 62 ret = hid_add_device(uhid->hid); in uhid_device_add_worker() 64 hid_err(uhid->hid, "Cannot register HID device: error %d\n", ret); in uhid_device_add_worker() 66 hid_destroy_device(uhid->hid); in uhid_device_add_worker() 67 uhid->hid = NULL; in uhid_device_add_worker() 83 hid_warn(uhid->hid, "Output queue is full\n"); in uhid_queue() 106 static int uhid_hid_start(struct hid_device *hid) in uhid_hid_start() argument 108 struct uhid_device *uhid = hid->driver_data; in uhid_hid_start() 118 if (hid->report_enum[HID_FEATURE_REPORT].numbered) in uhid_hid_start() 120 if (hid->report_enum[HID_OUTPUT_REPORT].numbered) in uhid_hid_start() [all …]
|
D | hid-gaff.c | 32 struct hid_device *hid = input_get_drvdata(dev); in hid_gaff_play() local 51 hid_hw_request(hid, gaff->report, HID_REQ_SET_REPORT); in hid_gaff_play() 58 hid_hw_request(hid, gaff->report, HID_REQ_SET_REPORT); in hid_gaff_play() 63 static int gaff_init(struct hid_device *hid) in gaff_init() argument 69 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in gaff_init() 74 if (list_empty(&hid->inputs)) { in gaff_init() 75 hid_err(hid, "no inputs found\n"); in gaff_init() 78 hidinput = list_entry(hid->inputs.next, struct hid_input, list); in gaff_init() 82 hid_err(hid, "no output reports found\n"); in gaff_init() 90 hid_err(hid, "no fields in the report\n"); in gaff_init() [all …]
|
D | hid-lg3ff.c | 51 struct hid_device *hid = input_get_drvdata(dev); in hid_lg3ff_play() local 52 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; in hid_lg3ff_play() 82 hid_hw_request(hid, report, HID_REQ_SET_REPORT); in hid_lg3ff_play() 89 struct hid_device *hid = input_get_drvdata(dev); in hid_lg3ff_set_autocenter() local 90 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; in hid_lg3ff_set_autocenter() 108 hid_hw_request(hid, report, HID_REQ_SET_REPORT); in hid_lg3ff_set_autocenter() 118 int lg3ff_init(struct hid_device *hid) in lg3ff_init() argument 126 if (list_empty(&hid->inputs)) { in lg3ff_init() 127 hid_err(hid, "no inputs found\n"); in lg3ff_init() 130 hidinput = list_entry(hid->inputs.next, struct hid_input, list); in lg3ff_init() [all …]
|
D | hid-core.c | 290 field->usage[i].hid = parser->local.usage[j]; in hid_add_field() 658 struct hid_device *hid = to_hid_device(dev); in hid_device_release() local 660 hid_close_report(hid); in hid_device_release() 661 kfree(hid->dev_rdesc); in hid_device_release() 662 kfree(hid); in hid_device_release() 734 struct hid_device *hid = parser->device; in hid_scan_input_usage() local 737 hid->group = HID_GROUP_MULTITOUCH; in hid_scan_input_usage() 749 struct hid_device *hid = parser->device; in hid_scan_collection() local 754 hid->group = HID_GROUP_SENSOR_HUB; in hid_scan_collection() 756 if (hid->vendor == USB_VENDOR_ID_MICROSOFT && in hid_scan_collection() [all …]
|
D | hid-pl.c | 50 struct hid_device *hid = input_get_drvdata(dev); in hid_plff_play() local 64 hid_hw_request(hid, plff->report, HID_REQ_SET_REPORT); in hid_plff_play() 69 static int plff_init(struct hid_device *hid) in plff_init() argument 75 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in plff_init() 97 hid_err(hid, "no output reports found\n"); in plff_init() 101 list_for_each_entry(hidinput, &hid->inputs, list) { in plff_init() 106 hid_err(hid, "required output report is missing\n"); in plff_init() 112 hid_err(hid, "no fields in the report\n"); in plff_init() 124 report->field[0]->usage[0].hid == in plff_init() 135 if (hid->vendor == USB_VENDOR_ID_JESS2) in plff_init() [all …]
|
D | hid-axff.c | 33 struct hid_device *hid = input_get_drvdata(dev); in axff_play() local 57 hid_hw_request(hid, axff->report, HID_REQ_SET_REPORT); in axff_play() 62 static int axff_init(struct hid_device *hid) in axff_init() argument 67 struct list_head *report_list =&hid->report_enum[HID_OUTPUT_REPORT].report_list; in axff_init() 73 if (list_empty(&hid->inputs)) { in axff_init() 74 hid_err(hid, "no inputs found\n"); in axff_init() 77 hidinput = list_first_entry(&hid->inputs, struct hid_input, list); in axff_init() 81 hid_err(hid, "no output reports found\n"); in axff_init() 93 if (field_count < 4 && hid->product != 0xf705) { in axff_init() 94 hid_err(hid, "not enough fields in the report: %d\n", in axff_init() [all …]
|
D | hid-emsff.c | 25 struct hid_device *hid = input_get_drvdata(dev); in emsff_play() local 41 hid_hw_request(hid, emsff->report, HID_REQ_SET_REPORT); in emsff_play() 46 static int emsff_init(struct hid_device *hid) in emsff_init() argument 52 &hid->report_enum[HID_OUTPUT_REPORT].report_list; in emsff_init() 56 if (list_empty(&hid->inputs)) { in emsff_init() 57 hid_err(hid, "no inputs found\n"); in emsff_init() 60 hidinput = list_first_entry(&hid->inputs, struct hid_input, list); in emsff_init() 64 hid_err(hid, "no output reports found\n"); in emsff_init() 70 hid_err(hid, "no fields in the report\n"); in emsff_init() 75 hid_err(hid, "not enough values in the field\n"); in emsff_init() [all …]
|
/Linux-v5.4/drivers/hid/intel-ish-hid/ |
D | ishtp-hid.c | 21 static int ishtp_hid_parse(struct hid_device *hid) in ishtp_hid_parse() argument 23 struct ishtp_hid_data *hid_data = hid->driver_data; in ishtp_hid_parse() 27 rv = hid_parse_report(hid, client_data->report_descr[hid_data->index], in ishtp_hid_parse() 36 static int ishtp_hid_start(struct hid_device *hid) in ishtp_hid_start() argument 41 static void ishtp_hid_stop(struct hid_device *hid) in ishtp_hid_stop() argument 45 static int ishtp_hid_open(struct hid_device *hid) in ishtp_hid_open() argument 50 static void ishtp_hid_close(struct hid_device *hid) in ishtp_hid_close() argument 54 static int ishtp_raw_request(struct hid_device *hid, unsigned char reportnum, in ishtp_raw_request() argument 58 struct ishtp_hid_data *hid_data = hid->driver_data; in ishtp_raw_request() 73 hid_ishtp_get_report(hid, reportnum, rtype); in ishtp_raw_request() [all …]
|
/Linux-v5.4/drivers/hid/usbhid/ |
D | hid-core.c | 74 static void hid_io_error(struct hid_device *hid); 75 static int hid_submit_out(struct hid_device *hid); 76 static int hid_submit_ctrl(struct hid_device *hid); 80 static int hid_start_in(struct hid_device *hid) in hid_start_in() argument 84 struct usbhid_device *usbhid = hid->driver_data; in hid_start_in() 108 struct hid_device *hid = usbhid->hid; in hid_retry_timeout() local 111 if (hid_start_in(hid)) in hid_retry_timeout() 112 hid_io_error(hid); in hid_retry_timeout() 120 struct hid_device *hid = usbhid->hid; in hid_reset() local 125 rc = usb_clear_halt(hid_to_usb_dev(hid), usbhid->urbin->pipe); in hid_reset() [all …]
|
D | hiddev.c | 56 hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo) in hiddev_lookup_report() argument 68 report_enum = hid->report_enum + in hiddev_lookup_report() 109 hiddev_lookup_usage(struct hid_device *hid, struct hiddev_usage_ref *uref) in hiddev_lookup_usage() argument 120 report_enum = hid->report_enum + in hiddev_lookup_usage() 127 if (field->usage[j].hid == uref->usage_code) { in hiddev_lookup_usage() 140 static void hiddev_send_event(struct hid_device *hid, in hiddev_send_event() argument 143 struct hiddev *hiddev = hid->hiddev; in hiddev_send_event() 166 void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, in hiddev_hid_event() argument 179 uref.usage_code = usage->hid; in hiddev_hid_event() 182 hiddev_send_event(hid, &uref); in hiddev_hid_event() [all …]
|
D | hid-pidff.c | 145 struct hid_device *hid; member 250 hid_dbg(pidff->hid, "attack %u => %d\n", in pidff_set_envelope_report() 254 hid_hw_request(pidff->hid, pidff->reports[PID_SET_ENVELOPE], in pidff_set_envelope_report() 281 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONSTANT], in pidff_set_constant_force_report() 316 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], in pidff_set_effect_report() 348 hid_hw_request(pidff->hid, pidff->reports[PID_SET_PERIODIC], in pidff_set_periodic_report() 390 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION], in pidff_set_condition_report() 431 hid_hw_request(pidff->hid, pidff->reports[PID_SET_RAMP], in pidff_set_ramp_force_report() 456 hid_hw_request(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT], in pidff_request_effect_upload() 458 hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum); in pidff_request_effect_upload() [all …]
|
/Linux-v5.4/drivers/staging/greybus/ |
D | hid.c | 22 struct hid_device *hid; member 146 hid_input_report(ghid->hid, HID_INPUT_REPORT, in gb_hid_request_handler() 158 static void gb_hid_find_max_report(struct hid_device *hid, unsigned int type, in gb_hid_find_max_report() argument 164 list_for_each_entry(report, &hid->report_enum[type].report_list, list) { in gb_hid_find_max_report() 204 hid_report_raw_event(ghid->hid, report->type, ghid->inbuf, size, 1); in gb_hid_init_report() 209 struct hid_device *hid = ghid->hid; in gb_hid_init_reports() local 213 &hid->report_enum[HID_INPUT_REPORT].report_list, in gb_hid_init_reports() 218 &hid->report_enum[HID_FEATURE_REPORT].report_list, in gb_hid_init_reports() 223 static int __gb_hid_get_raw_report(struct hid_device *hid, in __gb_hid_get_raw_report() argument 227 struct gb_hid *ghid = hid->driver_data; in __gb_hid_get_raw_report() [all …]
|
/Linux-v5.4/drivers/hid/i2c-hid/ |
D | i2c-hid-core.c | 137 struct hid_device *hid; /* pointer to corresponding HID dev */ member 504 hid_input_report(ihid->hid, HID_INPUT_REPORT, ihid->inbuf + 2, in i2c_hid_get_input() 531 static void i2c_hid_find_max_report(struct hid_device *hid, unsigned int type, in i2c_hid_find_max_report() argument 539 list_for_each_entry(report, &hid->report_enum[type].report_list, list) { in i2c_hid_find_max_report() 584 static int i2c_hid_get_raw_report(struct hid_device *hid, in i2c_hid_get_raw_report() argument 588 struct i2c_client *client = hid->driver_data; in i2c_hid_get_raw_report() 620 static int i2c_hid_output_raw_report(struct hid_device *hid, __u8 *buf, in i2c_hid_output_raw_report() argument 623 struct i2c_client *client = hid->driver_data; in i2c_hid_output_raw_report() 650 static int i2c_hid_output_report(struct hid_device *hid, __u8 *buf, in i2c_hid_output_report() argument 653 return i2c_hid_output_raw_report(hid, buf, count, HID_OUTPUT_REPORT, in i2c_hid_output_report() [all …]
|
/Linux-v5.4/include/linux/ |
D | hid.h | 430 unsigned hid; /* hid usage code */ member 875 extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); 876 extern int hidinput_connect(struct hid_device *hid, unsigned int force); 881 int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_fi… 882 struct hid_field *hidinput_get_led_field(struct hid_device *hid); 883 unsigned int hidinput_count_leds(struct hid_device *hid); 886 int __hid_request(struct hid_device *hid, struct hid_report *rep, int reqtype); 892 int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); 893 struct hid_report *hid_validate_values(struct hid_device *hid, 898 void hid_setup_resolution_multiplier(struct hid_device *hid); [all …]
|