提交 8473a93d 编写于 作者: T Tatsunosuke Tobita 提交者: Jiri Kosina

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: NTatsunosuke Tobita <tobita.tatsunosuke@wacom.co.jp>
Reviewed-by: NPing Cheng <ping.cheng@wacom.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 d7065620
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册