linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Kepplinger <martink@posteo.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	kernel-testers@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v5] input: tablet: add Pegasus Notetaker tablet driver
Date: Sat, 28 May 2016 12:37:47 +0200	[thread overview]
Message-ID: <574974FB.7070308@posteo.de> (raw)
In-Reply-To: <20160527215907.GD25540@dtor-ws>

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.

      reply	other threads:[~2016-05-28 10:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27  9:46 [PATCH v5] input: tablet: add Pegasus Notetaker tablet driver Martin Kepplinger
2016-05-27 18:34 ` Martin Kepplinger
2016-05-27 21:59 ` Dmitry Torokhov
2016-05-28 10:37   ` Martin Kepplinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=574974FB.7070308@posteo.de \
    --to=martink@posteo.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).