From 41c46e46415bfe9d393a5a3858f0c58f0a914c6b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 25 Mar 2022 14:14:18 +0200 Subject: change alternate mode handling --- hid-tmff2.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hid-tmff2.h') diff --git a/hid-tmff2.h b/hid-tmff2.h index 765f071..a57b434 100644 --- a/hid-tmff2.h +++ b/hid-tmff2.h @@ -86,7 +86,11 @@ struct tmff2_device_entry { int (*close)(void *data); int (*set_gain)(void *data, uint16_t gain); int (*set_range)(void *data, uint16_t range); + /* switch_mode has to not do anything if we're alredy in the specified + * mode */ int (*switch_mode)(void *data, uint16_t mode); + ssize_t (*alt_mode_show)(void *data, char *buf); + ssize_t (*alt_mode_store)(void *data, const char *buf, size_t count); int (*set_autocenter)(void *data, uint16_t autocenter); __u8 *(*wheel_fixup)(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize); @@ -117,6 +121,7 @@ struct t300rs_device_entry { int (*open)(struct input_dev *dev); void (*close)(struct input_dev *dev); + int mode; u8 buffer_length; u8 *send_buffer; }; -- cgit v1.3