Lines Matching +full:buffered +full:- +full:negative

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Copyright (c) 2000-2001 Vojtech Pavlik
5 * Copyright (c) 2006-2007 Jiri Kosina
10 * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
32 * values are expanded to 32-bit signed int, long items contain a pointer
185 * System Multi-Axis, see:
186 …* http://www.usb.org/developers/hidpage/HUTRR62_-_Generic_Desktop_CA_for_System_Multi-Axis_Control…
308 * HID report types --- Ouch! HID spec says 1 2 3!
391 * persistent for main-items. The global environment can be saved and
409 * This is the local environment. It is persistent up the next main-item.
431 int parent_idx; /* device->collection */
450 __s16 wheel_accumulated; /* hi-res wheel */
461 unsigned flags; /* main-item flags (i.e. volatile,array,constant) */
474 unsigned index; /* index into report->field[] */
584 * battery is non-NULL.
637 return dev_get_drvdata(&hdev->dev); in hid_get_drvdata()
642 dev_set_drvdata(&hdev->dev, data); in hid_set_drvdata()
693 #define HID_TERMINATOR (HID_ANY_ID - 1)
706 * @name: driver name (e.g. "Footech_bar-wheel")
707 * @id_table: which devices is this driver for (must be non-NULL for probe
713 * @remove: device removed (NULL if not a hot-plug capable driver)
728 * probe should return -errno on error, or 0 on success. During probe,
732 * raw_event and event should return negative on error, any other value will
735 * input_mapping shall return a negative value to completely ignore this usage
739 * input_mapped shall return negative to inform the layer that this usage
791 * hid_ll_driver - low level driver callbacks
800 * @wait: wait for buffered io to complete (send/recv reports)
804 * @may_wakeup: return if device may act as a wakeup source during system-suspend
840 return hdev->ll_driver == driver; in hid_is_using_ll_driver()
874 * module_hid_driver() - Helper macro for registering a HID driver
927 * hid_device_io_start - enable HID input during probe, remove
936 if (hid->io_started) { in hid_device_io_start()
937 dev_warn(&hid->dev, "io already started\n"); in hid_device_io_start()
940 hid->io_started = true; in hid_device_io_start()
941 up(&hid->driver_input_lock); in hid_device_io_start()
945 * hid_device_io_stop - disable HID input during probe, remove
956 if (!hid->io_started) { in hid_device_io_stop()
957 dev_warn(&hid->dev, "io already stopped\n"); in hid_device_io_stop()
960 hid->io_started = false; in hid_device_io_stop()
961 down(&hid->driver_input_lock); in hid_device_io_stop()
965 * hid_map_usage - map usage input bits
969 * @bit: pointer to input->{}bit (out parameter)
970 * @max: maximal valid usage->code to consider later (out parameter)
982 struct input_dev *input = hidinput->input; in hid_map_usage()
988 bmap = input->absbit; in hid_map_usage()
992 bmap = input->relbit; in hid_map_usage()
996 bmap = input->keybit; in hid_map_usage()
1000 bmap = input->ledbit; in hid_map_usage()
1007 input->name, c, type); in hid_map_usage()
1012 usage->type = type; in hid_map_usage()
1013 usage->code = c; in hid_map_usage()
1019 * hid_map_usage_clear - map usage input bits and clear the input bit
1023 * @bit: pointer to input->{}bit (out parameter)
1024 * @max: maximal valid usage->code to consider later (out parameter)
1037 clear_bit(usage->code, *bit); in hid_map_usage_clear()
1041 * hid_parse - parse HW reports
1046 * report_fixup will be called (if non-NULL) after reading raw report from
1061 * hid_hw_power - requests underlying HW to go into given power mode
1072 return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; in hid_hw_power()
1077 * hid_hw_request - send report request to device
1086 if (hdev->ll_driver->request) in hid_hw_request()
1087 return hdev->ll_driver->request(hdev, report, reqtype); in hid_hw_request()
1093 * hid_hw_raw_request - send report request to device
1102 * Return: count of data transferred, negative if error
1111 return -EINVAL; in hid_hw_raw_request()
1113 return hdev->ll_driver->raw_request(hdev, reportnum, buf, len, in hid_hw_raw_request()
1118 * hid_hw_output_report - send output report to device
1124 * Return: count of data transferred, negative if error
1130 return -EINVAL; in hid_hw_output_report()
1132 if (hdev->ll_driver->output_report) in hid_hw_output_report()
1133 return hdev->ll_driver->output_report(hdev, buf, len); in hid_hw_output_report()
1135 return -ENOSYS; in hid_hw_output_report()
1139 * hid_hw_idle - send idle request to device
1149 if (hdev->ll_driver->idle) in hid_hw_idle()
1150 return hdev->ll_driver->idle(hdev, report, idle, reqtype); in hid_hw_idle()
1156 * hid_may_wakeup - return if the hid device may act as a wakeup source during system-suspend
1162 if (hdev->ll_driver->may_wakeup) in hid_hw_may_wakeup()
1163 return hdev->ll_driver->may_wakeup(hdev); in hid_hw_may_wakeup()
1165 if (hdev->dev.parent) in hid_hw_may_wakeup()
1166 return device_may_wakeup(hdev->dev.parent); in hid_hw_may_wakeup()
1172 * hid_hw_wait - wait for buffered io to complete
1178 if (hdev->ll_driver->wait) in hid_hw_wait()
1179 hdev->ll_driver->wait(hdev); in hid_hw_wait()
1183 * hid_report_len - calculate the report length
1189 return DIV_ROUND_UP(report->size, 8) + (report->id > 0); in hid_report_len()
1213 dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
1215 dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__)
1217 dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__)
1219 dev_info(&(hid)->dev, fmt, ##__VA_ARGS__)
1221 dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__)
1224 dev_err_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1226 dev_notice_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1228 dev_warn_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1230 dev_info_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1232 dev_dbg_once(&(hid)->dev, fmt, ##__VA_ARGS__)