diff options
Diffstat (limited to 'include/linux/hid.h')
| -rw-r--r-- | include/linux/hid.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 51e1dbe8c387..3b0ad4479725 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -763,6 +763,22 @@ struct hid_ll_driver { int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype); }; +extern struct hid_ll_driver i2c_hid_ll_driver; +extern struct hid_ll_driver hidp_hid_driver; +extern struct hid_ll_driver uhid_hid_driver; +extern struct hid_ll_driver usb_hid_driver; + +static inline bool hid_is_using_ll_driver(struct hid_device *hdev, + struct hid_ll_driver *driver) +{ + return hdev->ll_driver == driver; +} + +static inline bool hid_is_usb(struct hid_device *hdev) +{ + return hid_is_using_ll_driver(hdev, &usb_hid_driver); +} + #define PM_HINT_FULLON 1<<5 #define PM_HINT_NORMAL 1<<1 |
