aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index e14b465b1146..261c713d4842 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -662,6 +662,7 @@ struct hid_driver {
662 * @hidinput_input_event: event input event (e.g. ff or leds) 662 * @hidinput_input_event: event input event (e.g. ff or leds)
663 * @parse: this method is called only once to parse the device data, 663 * @parse: this method is called only once to parse the device data,
664 * shouldn't allocate anything to not leak memory 664 * shouldn't allocate anything to not leak memory
665 * @request: send report request to device (e.g. feature report)
665 */ 666 */
666struct hid_ll_driver { 667struct hid_ll_driver {
667 int (*start)(struct hid_device *hdev); 668 int (*start)(struct hid_device *hdev);
@@ -676,6 +677,10 @@ struct hid_ll_driver {
676 unsigned int code, int value); 677 unsigned int code, int value);
677 678
678 int (*parse)(struct hid_device *hdev); 679 int (*parse)(struct hid_device *hdev);
680
681 void (*request)(struct hid_device *hdev,
682 struct hid_report *report, int reqtype);
683
679}; 684};
680 685
681#define PM_HINT_FULLON 1<<5 686#define PM_HINT_FULLON 1<<5
@@ -883,6 +888,21 @@ static inline int hid_hw_power(struct hid_device *hdev, int level)
883 return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; 888 return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0;
884} 889}
885 890
891
892/**
893 * hid_hw_request - send report request to device
894 *
895 * @hdev: hid device
896 * @report: report to send
897 * @reqtype: hid request type
898 */
899static inline void hid_hw_request(struct hid_device *hdev,
900 struct hid_report *report, int reqtype)
901{
902 if (hdev->ll_driver->request)
903 hdev->ll_driver->request(hdev, report, reqtype);
904}
905
886int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, 906int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
887 int interrupt); 907 int interrupt);
888 908