Lines Matching +full:buffered +full:- +full:positive

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
183 * System Multi-Axis, see:
184 …* http://www.usb.org/developers/hidpage/HUTRR62_-_Generic_Desktop_CA_for_System_Multi-Axis_Control…
304 * HID report types --- Ouch! HID spec says 1 2 3!
389 * persistent for main-items. The global environment can be saved and
407 * This is the local environment. It is persistent up the next main-item.
429 int parent_idx; /* device->collection */
448 __s16 wheel_accumulated; /* hi-res wheel */
459 unsigned flags; /* main-item flags (i.e. volatile,array,constant) */
472 unsigned index; /* index into report->field[] */
582 * battery is non-NULL.
634 return dev_get_drvdata(&hdev->dev); in hid_get_drvdata()
639 dev_set_drvdata(&hdev->dev, data); in hid_set_drvdata()
690 #define HID_TERMINATOR (HID_ANY_ID - 1)
703 * @name: driver name (e.g. "Footech_bar-wheel")
704 * @id_table: which devices is this driver for (must be non-NULL for probe
710 * @remove: device removed (NULL if not a hot-plug capable driver)
725 * probe should return -errno on error, or 0 on success. During probe,
734 * usage by generic code (no special handling needed) or positive to skip
788 * hid_ll_driver - low level driver callbacks
797 * @wait: wait for buffered io to complete (send/recv reports)
835 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
929 * @hid - the device
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
947 * @hid - the device
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
1030 clear_bit(usage->code, *bit); in hid_map_usage_clear()
1034 * hid_parse - parse HW reports
1039 * report_fixup will be called (if non-NULL) after reading raw report from
1054 * hid_hw_power - requests underlying HW to go into given power mode
1065 return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; in hid_hw_power()
1070 * hid_hw_request - send report request to device
1079 if (hdev->ll_driver->request) in hid_hw_request()
1080 return hdev->ll_driver->request(hdev, report, reqtype); in hid_hw_request()
1086 * hid_hw_raw_request - send report request to device
1104 return -EINVAL; in hid_hw_raw_request()
1106 return hdev->ll_driver->raw_request(hdev, reportnum, buf, len, in hid_hw_raw_request()
1111 * hid_hw_output_report - send output report to device
1123 return -EINVAL; in hid_hw_output_report()
1125 if (hdev->ll_driver->output_report) in hid_hw_output_report()
1126 return hdev->ll_driver->output_report(hdev, buf, len); in hid_hw_output_report()
1128 return -ENOSYS; in hid_hw_output_report()
1132 * hid_hw_idle - send idle request to device
1142 if (hdev->ll_driver->idle) in hid_hw_idle()
1143 return hdev->ll_driver->idle(hdev, report, idle, reqtype); in hid_hw_idle()
1149 * hid_hw_wait - wait for buffered io to complete
1155 if (hdev->ll_driver->wait) in hid_hw_wait()
1156 hdev->ll_driver->wait(hdev); in hid_hw_wait()
1160 * hid_report_len - calculate the report length
1166 return DIV_ROUND_UP(report->size, 8) + (report->id > 0); in hid_report_len()
1190 dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
1192 dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__)
1194 dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__)
1196 dev_info(&(hid)->dev, fmt, ##__VA_ARGS__)
1198 dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__)
1201 dev_err_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1203 dev_notice_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1205 dev_warn_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1207 dev_info_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1209 dev_dbg_once(&(hid)->dev, fmt, ##__VA_ARGS__)