mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Reviewed-by: Ping Cheng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
d7065620b8
commit
8473a93d1b
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue