From: "Henrik Rydberg" <rydberg@euromail.se>
To: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
Stephane Chatty <chatty@lii-enac.fr>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] hid-multitouch: work on default classes and renaming of classes
Date: Fri, 28 Jan 2011 18:18:52 +0100 [thread overview]
Message-ID: <20110128171852.GA2586@polaris.bitmath.org> (raw)
In-Reply-To: <1296230680-2871-1-git-send-email-benjamin.tissoires@enac.fr>
Hi Benjamin,
> The safest quirk for a device (the one that works out of the box for
> most of them) is the MT_QUIRK_NOT_SEEN_MEANS_UP. Indeed, it does not
> make any assumption on the device. When adding a new device, we can
> easily test it against MT_CLS_DEFAULT, and then optimize it with other
> quirks: that's why no device use MT_CLS_DEFAULT right now.
>
> This patch introduce also MT_CLS_DUAL_DEFAULT which has the same purpose
> than MT_CLS_DEFAULT, but for dual touch panels.
But it is used anywhere?
> Finally, the patch renames MT_CLS_DUAL1 to MT_CLS_DUAL_INRANGE_CONTACTID
> and MT_CLS_DUAL2 to MT_CLS_DUAL_INRANGE_CONTACTNUMBER for better
> readability.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> ---
The patch description and the content lacks a certain
distinctness. Please single out janitory actions into a separate
patch, or, if possible, skip it altogether.
> drivers/hid/hid-multitouch.c | 25 +++++++++++++++----------
> 1 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 07d3183..ffe2a76 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -24,6 +24,7 @@
>
>
> MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>");
> +MODULE_AUTHOR("Benjamin Tissoires <benjamin.tissoires@gmail.com>");
Adding this is fine, based on your prior contributions. Perhaps it
should be motivated as such in a separate patch instead.
> MODULE_DESCRIPTION("HID multitouch panels");
> MODULE_LICENSE("GPL");
>
> @@ -65,10 +66,11 @@ struct mt_class {
> };
>
> /* classes of device behavior */
> -#define MT_CLS_DEFAULT 1
> -#define MT_CLS_DUAL1 2
> -#define MT_CLS_DUAL2 3
> -#define MT_CLS_CYPRESS 4
> +#define MT_CLS_DEFAULT 1
> +#define MT_CLS_DUAL_DEFAULT 2
> +#define MT_CLS_DUAL_INRANGE_CONTACTID 3
> +#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 4
> +#define MT_CLS_CYPRESS 10
There is no need to change the numbering for unchanged names.
>
> /*
> * these device-dependent functions determine what slot corresponds
> @@ -104,13 +106,16 @@ static int find_slot_from_contactid(struct mt_device *td)
>
> struct mt_class mt_classes[] = {
> { .name = MT_CLS_DEFAULT,
> - .quirks = MT_QUIRK_VALID_IS_INRANGE,
> + .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP,
> .maxcontacts = 10 },
> - { .name = MT_CLS_DUAL1,
> + { .name = MT_CLS_DUAL_DEFAULT,
> + .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP,
> + .maxcontacts = 2 },
> + { .name = MT_CLS_DUAL_INRANGE_CONTACTID,
> .quirks = MT_QUIRK_VALID_IS_INRANGE |
> MT_QUIRK_SLOT_IS_CONTACTID,
> .maxcontacts = 2 },
> - { .name = MT_CLS_DUAL2,
> + { .name = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
> .quirks = MT_QUIRK_VALID_IS_INRANGE |
> MT_QUIRK_SLOT_IS_CONTACTNUMBER,
> .maxcontacts = 2 },
> @@ -466,15 +471,15 @@ static const struct hid_device_id mt_devices[] = {
> USB_DEVICE_ID_CYPRESS_TRUETOUCH) },
>
> /* GeneralTouch panel */
> - { .driver_data = MT_CLS_DUAL2,
> + { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
> HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH,
> USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) },
>
> /* PixCir-based panels */
> - { .driver_data = MT_CLS_DUAL1,
> + { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
> HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
> USB_DEVICE_ID_HANVON_MULTITOUCH) },
> - { .driver_data = MT_CLS_DUAL1,
> + { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
> HID_USB_DEVICE(USB_VENDOR_ID_CANDO,
> USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH) },
>
> --
> 1.7.3.4
>
Thanks,
Henrik
next prev parent reply other threads:[~2011-01-28 17:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 16:04 [PATCH 1/2] hid-multitouch: work on default classes and renaming of classes Benjamin Tissoires
2011-01-28 16:04 ` [PATCH 2/2] hid-multitouch: introduce IrTouch Infrared USB device Benjamin Tissoires
2011-01-28 16:24 ` [2/2] " Florian Echtler
2011-01-28 16:59 ` Benjamin Tissoires
2011-01-28 17:21 ` [PATCH 2/2] " Henrik Rydberg
2011-01-28 17:59 ` Benjamin Tissoires
2011-01-28 18:49 ` Henrik Rydberg
2011-01-28 17:18 ` Henrik Rydberg [this message]
2011-01-28 17:52 ` [PATCH 1/2] hid-multitouch: work on default classes and renaming of classes Benjamin Tissoires
2011-01-28 18:43 ` Henrik Rydberg
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=20110128171852.GA2586@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=benjamin.tissoires@enac.fr \
--cc=chatty@lii-enac.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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).