Thread (1 message) 1 message, 1 author, 2017-10-02

Re: [PATCH] HID: hid-input: Add eraser usage to hidinput_configure_usage

From: Jiri Kosina <jikos@kernel.org>
Date: 2017-10-02 11:41:39

On Fri, 22 Sep 2017, Ping Cheng wrote:
quoted
quoted
Some tablets report eraser usage to indicate the eraser tool. But,
hidinput_configure_usage doesn't support it, which led the usage
falls into default as ABS_MISC.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com <javascript:;>>
---
 drivers/hid/hid-input.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 199f6a01fc62..4d36b08494fd 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -797,6 +797,10 @@ static void hidinput_configure_usage(struct
hid_input *hidinput, struct hid_fiel
quoted
                        map_key_clear(BTN_STYLUS);
                        break;

+               case 0x45: /* ERASER */
+                       map_key_clear(BTN_TOUCH);
Surely you mean BTN_TOOL_RUBBER?

No, I meant BTN_TOUCH since INVERT usage decides if an eraser is in
proximity and send BTN_TOOL_RUBBER bit. Eraser usage means it is actually
touching the device.
The reasoning makes sense, but it is indeed confusing, so I believe a 
small comment explaining it would be appropriate. Could you please add it 
and resend?

Thanks,

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help