summaryrefslogtreecommitdiff
path: root/include/linux/input.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-03-01 09:58:28 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-03-01 10:26:27 +0300
commitcb66b9ba5cdacab5592bce31a4083fc4ac172ea5 (patch)
tree7304866999301a410f380c60ef43631c40597fe4 /include/linux/input.h
parent3f9ed5c2fe36794c1b11697bbbc6c8ec82a7d3dc (diff)
downloadlinux-cb66b9ba5cdacab5592bce31a4083fc4ac172ea5.tar.xz
Input: add input_copy_abs() function
Add a new helper function to copy absinfo from one input_dev to another input_dev. This is useful to e.g. setup a pen/stylus input-device for combined touchscreen/pen hardware where the pen uses the same coordinates as the touchscreen. Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220131143539.109142-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/input.h')
-rw-r--r--include/linux/input.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 0354b298d874..49790c1bd2c4 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -475,6 +475,8 @@ static inline void input_set_events_per_packet(struct input_dev *dev, int n_even
void input_alloc_absinfo(struct input_dev *dev);
void input_set_abs_params(struct input_dev *dev, unsigned int axis,
int min, int max, int fuzz, int flat);
+void input_copy_abs(struct input_dev *dst, unsigned int dst_axis,
+ const struct input_dev *src, unsigned int src_axis);
#define INPUT_GENERATE_ABS_ACCESSORS(_suffix, _item) \
static inline int input_abs_get_##_suffix(struct input_dev *dev, \