Skip to content

Commit

Permalink
HID: input: Set INPUT_PROP_-property for HID_UP_DIGITIZERS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tatsunosuke Tobita authored and Jiri Kosina committed Sep 5, 2018
1 parent d706562 commit 8473a93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8473a93

Please sign in to comment.