diff options
author | Tatsunosuke Tobita <junkpainting@gmail.com> | 2018-08-08 09:31:43 +0900 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2018-09-05 16:59:24 +0200 |
commit | 8473a93d1ba5385f63a128a285702ccc1d3ae2cc (patch) | |
tree | cdf727581a2f4d99c5f540894ff82d592857a93b /drivers/hid | |
parent | d7065620b89fcc183caa6fa6ea36de5e01211137 (diff) | |
download | linux-8473a93d1ba5385f63a128a285702ccc1d3ae2cc.tar.bz2 |
HID: input: Set INPUT_PROP_-property for HID_UP_DIGITIZERS
Some system may want to know if a detected digitizer device is either an
integrated or an external device. In order to distinguish such condition,
setting either INPUT_PROP_DIRECT or INPUT_PROP_POINTER is required,
checking the member, "application", in "hid_field" structure.
Signed-off-by: Tatsunosuke Tobita <tobita.tatsunosuke@wacom.co.jp>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 83755ba33ef4..42c1a4c2a978 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -758,6 +758,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel break; case HID_UP_DIGITIZER: + if ((field->application & 0xff) == 0x01) /* Digitizer */ + __set_bit(INPUT_PROP_POINTER, input->propbit); + else if ((field->application & 0xff) == 0x02) /* Pen */ + __set_bit(INPUT_PROP_DIRECT, input->propbit); + switch (usage->hid & 0xff) { case 0x00: /* Undefined */ goto ignore; |