diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-04-18 10:08:02 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-04-18 10:15:43 -0700 |
commit | 80b4895aa4578e9372d76cd4063f82d0c3994d77 (patch) | |
tree | 0ac167a8b17e2550ff2d996d153ecbb59e05e643 /include/linux/input | |
parent | 9fb0f14e31b6101a0cc69a333b43541044f9b0a6 (diff) | |
download | linux-80b4895aa4578e9372d76cd4063f82d0c3994d77.tar.gz linux-80b4895aa4578e9372d76cd4063f82d0c3994d77.tar.bz2 linux-80b4895aa4578e9372d76cd4063f82d0c3994d77.zip |
Input: estimate number of events per packet
Calculate a default based on the number of ABS axes, REL axes,
and MT slots for the device during input device registration.
Signed-off-by: Jeff Brown <jeffbrown@android.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input')
-rw-r--r-- | include/linux/input/mt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index b3ac06a4435d..318bb82325a6 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h @@ -48,6 +48,12 @@ static inline void input_mt_slot(struct input_dev *dev, int slot) input_event(dev, EV_ABS, ABS_MT_SLOT, slot); } +static inline bool input_is_mt_axis(int axis) +{ + return axis == ABS_MT_SLOT || + (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST); +} + void input_mt_report_slot_state(struct input_dev *dev, unsigned int tool_type, bool active); |