summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-10-25 06:23:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-25 06:23:07 -0700
commit96f2f66a985699d201b3a84222b8dd42262a71fe (patch)
treee957bbf2a361163d34df64c9f20e35fe70a14874 /include/linux
parent3f2dcb6411eb3fd4a8be5d3713be0e2c1c750d6d (diff)
parent46011e9755e9af6ef90bb59522d315d781d2307b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: - rumble support for Xbox One S, from Andrey Smirnov - high-resolution support for Logitech mice, from Harry Cutts - support for recent devices requiring the HID parse to be able to cope with tag report sizes > 256 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (35 commits) HID: usbhid: Add quirk for Redragon/Dragonrise Seymur 2 HID: wacom: Work around HID descriptor bug in DTK-2451 and DTH-2452 HID: google: add dependency on Cros EC for Hammer HID: elan: fix spelling mistake "registred" -> "registered" HID: google: drop superfluous const before SIMPLE_DEV_PM_OPS() HID: google: add support tablet mode switch for Whiskers mfd: cros: add "base attached" MKBP switch definition Input: reserve 2 events code because of HID HID: magicmouse: add support for Apple Magic Trackpad 2 HID: i2c-hid: override HID descriptors for certain devices HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad HID: logitech: fix a used uninitialized GCC warning HID: intel-ish-hid: using list_head for ipc write queue HID: intel-ish-hid: use resource-managed api HID: intel_ish-hid: Enhance API to get ring buffer sizes HID: intel-ish-hid: use helper function to search client id HID: intel-ish-hid: ishtp: add helper function for client search HID: intel-ish-hid: use helper function to access client buffer HID: intel-ish-hid: ishtp: add helper functions for client buffer operation HID: intel-ish-hid: use helper function for private driver data set/get ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hid.h28
-rw-r--r--include/linux/mfd/cros_ec_commands.h1
2 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index d44a78362942..2827b87590d8 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -1139,6 +1139,34 @@ static inline u32 hid_report_len(struct hid_report *report)
int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
int interrupt);
+
+/**
+ * struct hid_scroll_counter - Utility class for processing high-resolution
+ * scroll events.
+ * @dev: the input device for which events should be reported.
+ * @microns_per_hi_res_unit: the amount moved by the user's finger for each
+ * high-resolution unit reported by the mouse, in
+ * microns.
+ * @resolution_multiplier: the wheel's resolution in high-resolution mode as a
+ * multiple of its lower resolution. For example, if
+ * moving the wheel by one "notch" would result in a
+ * value of 1 in low-resolution mode but 8 in
+ * high-resolution, the multiplier is 8.
+ * @remainder: counts the number of high-resolution units moved since the last
+ * low-resolution event (REL_WHEEL or REL_HWHEEL) was sent. Should
+ * only be used by class methods.
+ */
+struct hid_scroll_counter {
+ struct input_dev *dev;
+ int microns_per_hi_res_unit;
+ int resolution_multiplier;
+
+ int remainder;
+};
+
+void hid_scroll_counter_handle_scroll(struct hid_scroll_counter *counter,
+ int hi_res_value);
+
/* HID quirks API */
unsigned long hid_lookup_quirk(const struct hid_device *hdev);
int hid_quirks_init(char **quirks_param, __u16 bus, int count);
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 6e1ab9bead28..7690f0793965 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -2132,6 +2132,7 @@ struct ec_response_get_next_event_v1 {
/* Switches */
#define EC_MKBP_LID_OPEN 0
#define EC_MKBP_TABLET_MODE 1
+#define EC_MKBP_BASE_ATTACHED 2
/*****************************************************************************/
/* Temperature sensor commands */