Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1408442

Re: [PATCH v5] input: tablet: add Pegasus Notetaker tablet driver

From Martin Kepplinger <martink@posteo.de>
Newsgroups linux.kernel
Subject Re: [PATCH v5] input: tablet: add Pegasus Notetaker tablet driver
Date 2016-05-28 12:40 +0200
Message-ID <rDJOV-7L2-17@gated-at.bofh.it> (permalink)
References <rDmyZ-1JJ-7@gated-at.bofh.it> <rDxXs-ni-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Dmitry,

Thanks again for your help! Only one comment below...

Am 2016-05-27 um 23:59 schrieb Dmitry Torokhov:
> Hi Martin,
> 

>> +static void pegasus_parse_packet(struct pegasus *pegasus)
>> +{
>> +	unsigned char *data = pegasus->data;
>> +	struct input_dev *dev = pegasus->dev;
>> +	u16 x, y;
>> +
>> +	switch (data[0]) {
>> +	case SPECIAL_COMMAND:
>> +		/* device button pressed */
>> +		if (data[1] == BUTTON_PRESSED)
>> +			schedule_work(&pegasus->init);
>> +
>> +		break;
>> +	/* xy data */
>> +	case BATTERY_LOW:
>> +		dev_warn_once(&dev->dev, "Pen battery low\n");
>> +	case BATTERY_NO_REPORT:
>> +	case BATTERY_GOOD:
>> +		x = le16_to_cpup((__le16 *)&data[2]);
>> +		y = le16_to_cpup((__le16 *)&data[4]);
>> +
>> +		/* ignore pen up events */
>> +		if (x == 0 && y == 0)
> 
> Why are we ignoring pen-up events? I'd at least send
> EV_KEY/BTN_TOOL_PEN/0 and maybe the rest of BTN* events.

I tried a few things, but I found them not to be useful in our case. To
the contrary, they seem to happen at random (or wrongly) too. They seem
to be there to seperate lines in drawings or whatever, but I'm not sure
exactly when they are valuable.

As an input device I get the best user experience when we ignore them. I
don't want them to break "clicking" or the like.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v5] input: tablet: add Pegasus Notetaker tablet driver Martin Kepplinger <martink@posteo.de> - 2016-05-27 11:50 +0200
  [PATCH v5] input: tablet: add Pegasus Notetaker tablet driver Martin Kepplinger <martink@posteo.de> - 2016-05-27 20:40 +0200
  Re: [PATCH v5] input: tablet: add Pegasus Notetaker tablet driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-05-28 00:00 +0200
    Re: [PATCH v5] input: tablet: add Pegasus Notetaker tablet driver Martin Kepplinger <martink@posteo.de> - 2016-05-28 12:40 +0200

csiph-web