diff options
| -rw-r--r-- | drivers/input/input.c | 10 | ||||
| -rw-r--r-- | include/uapi/linux/input.h | 44 |
2 files changed, 52 insertions, 2 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 880605959aa6..baaddd168804 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1667,8 +1667,14 @@ void input_reset_device(struct input_dev *dev) mutex_lock(&dev->mutex); spin_lock_irqsave(&dev->event_lock, flags); - input_dev_toggle(dev, true); - input_dev_release_keys(dev); + /* + * Keys that have been pressed at suspend time are unlikely + * to be still pressed when we resume. + */ + if (!test_bit(INPUT_PROP_NO_DUMMY_RELEASE, dev->propbit)) { + input_dev_toggle(dev, true); + input_dev_release_keys(dev); + } spin_unlock_irqrestore(&dev->event_lock, flags); mutex_unlock(&dev->mutex); diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index 2758687300b4..b115bca91324 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h @@ -161,6 +161,50 @@ struct input_mask { #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ #define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ +#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ + +/* + * Device properties and quirks + */ + +/* HACK: disable conflicting EVIOCREVOKE until Android userspace stops using EVIOCSSUSPENDBLOCK */ +/*#define EVIOCREVOKE _IOW('E', 0x91, int)*/ /* Revoke device access */ + +#define INPUT_PROP_POINTER 0x00 /* needs a pointer */ +#define INPUT_PROP_DIRECT 0x01 /* direct input devices */ +#define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ +#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ +#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ +#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ +#define INPUT_PROP_NO_DUMMY_RELEASE 0x06 /* no dummy event */ + +#define INPUT_PROP_MAX 0x1f +#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) + +/* + * Event types + */ + +#define EV_SYN 0x00 +#define EV_KEY 0x01 +#define EV_REL 0x02 +#define EV_ABS 0x03 +#define EV_MSC 0x04 +#define EV_SW 0x05 +#define EV_LED 0x11 +#define EV_SND 0x12 +#define EV_REP 0x14 +#define EV_FF 0x15 +#define EV_PWR 0x16 +#define EV_FF_STATUS 0x17 +#define EV_MAX 0x1f +#define EV_CNT (EV_MAX+1) + +/* + * Synchronization events. + */ + + /** * EVIOCGMASK - Retrieve current event mask * |
