From: Sean Young <sean@mess.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>, linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: Add support for pressure sensitive buttons
Date: Wed, 16 Nov 2011 10:23:59 +0000 [thread overview]
Message-ID: <20111116102359.GA29328@pip.mess.org> (raw)
In-Reply-To: <alpine.LNX.2.00.1111151523500.15187@pobox.suse.cz>
On Tue, Nov 15, 2011 at 03:27:42PM +0100, Jiri Kosina wrote:
> On Mon, 14 Nov 2011, Sean Young wrote:
>
> > left = left * 0xff / 0xffff;
> > right = (right != 0); /* on/off only */
> >
> > + sjoyff->report->field[0]->value[0] = 1;
> > sjoyff->report->field[0]->value[1] = right;
> > sjoyff->report->field[0]->value[2] = left;
>
> General comment to the whole patch applicable on many other places as
> well: it'd be nice if you could stick a short comment to the places which
> contain magic contants mandated by the device protocol, so that anyone
> else looking at the driver gets at least a basic idea why are individial
> fields initialized the way they are.
The constants are found by snooping what the windows driver does. I have
no idea why the values are what they are; in the v2 version of my patch
I've attempted to document better what the device is supposed to do. Is
that what you're after?
Sean
prev parent reply other threads:[~2011-11-16 10:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 20:58 [PATCH] HID: Add support for pressure sensitive buttons Sean Young
2011-11-15 14:27 ` Jiri Kosina
2011-11-15 17:10 ` simon
2011-11-15 20:18 ` Sean Young
2011-11-16 10:23 ` Sean Young [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=20111116102359.GA29328@pip.mess.org \
--to=sean@mess.org \
--cc=jkosina@suse.cz \
--cc=jussi.kivilinna@mbnet.fi \
--cc=linux-input@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).