Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH v3] add sur40 driver for Samsung SUR40 (aka MS Surface 2.0/Pixelsense)
From: Henrik Rydberg @ 2013-11-08 21:37 UTC (permalink / raw)
  To: Florian Echtler
  Cc: linux-input, benjamin.tissoires, dmitry.torokhov, dh.herrmann
In-Reply-To: <1383748012-28880-1-git-send-email-floe@butterbrot.org>

Hi Florian,

> This patch adds support for the built-in multitouch sensor in the Samsung
> SUR40 touchscreen device, also known as Microsoft Surface 2.0 or Microsoft
> Pixelsense. Support for raw video output from the sensor as well as the 
> accelerometer will be added in a later patch.
> 
> Signed-off-by: Florian Echtler <floe@butterbrot.org>
> ---
>  drivers/input/touchscreen/Kconfig  |   10 +
>  drivers/input/touchscreen/Makefile |    1 +
>  drivers/input/touchscreen/sur40.c  |  467 ++++++++++++++++++++++++++++++++++++
>  3 files changed, 478 insertions(+)
>  create mode 100644 drivers/input/touchscreen/sur40.c

The driver looks pretty good now, thanks for making the changes. There
might be one or two white space problems, but those can be fixed while
applying. Dmitry, I guess you want to take this through your tree, so

Reviewed-by: Henrik Rydberg <rydberg@euromail.se>

Thanks,
Henrik

^ permalink raw reply

* Re: [PATCH v2 2/2] Input: wacom - add support for three new Intuos devices
From: Ping Cheng @ 2013-11-08 19:13 UTC (permalink / raw)
  To: Chris Bagwell
  Cc: linux-input@vger.kernel.org, Dmitry Torokhov, Peter Hutterer
In-Reply-To: <CAGzDe_a_VF7697u66LsWoV+C6+VLRzQJ8FWnct9SGK6DQurULQ@mail.gmail.com>

On Thu, Nov 7, 2013 at 6:25 PM, Chris Bagwell <chris@cnpbagwell.com> wrote:
> On Thu, Oct 10, 2013 at 4:17 PM, Ping Cheng <pinglinux@gmail.com> wrote:
>> This series of models added a hardware switch to turn touch
>> data on/off. To report the state of the switch, SW_TOUCH
>> is added in include/uapi/linux/input.h.
>
> So I guess the big point is this patch can't go in until a SW_TOUCH
> goes in first.
>
> Since the 1/2 or this 2/2 series has already gone in, would you mind
> breaking this
> remaining patch up into the basic support for new Intuos (without the
> SW_TOUCH) and
> then a separate patch to add SW_TOUCH support on top of that?  Then
> the basic support can go in ASAP.

Chris, thank you for pushing the process forward.

SW_TOUCH is truly part of the basic support for the new series. The
main new feature of this series is touch switch. If we do not report
its status in the same patch, it means we are not reporting a complete
set of data.

> I only have comments on this patch related to the SW_TOUCH part... things like:
>
>  * should the SW_TOUCH be reported against the wireless interface or
> the touch interface... userland apps may have an opinion on which is
> best.

We can not report SW_TOUCH status from touch interface since once
touch is turned off (by end users), no events can go on touch
interface. Plus, we do not know when a user may switch touch on.
That's why SW_TOUCH are regularly updated and reported through
wireless interface for wireless connection.

>  * the part with updating SW_TOUCH from unrelated interfaces could use

It is not unrelated interface. It is how it works.

> a review by someone like Dmitry for possible issues.
>  * It would be better if you didn't add that EV_SW for HW that will
> not report the SW_TOUCH.

I can consider that in the next version.

> If you break the patch into 2, you can add my line for the basic

I'd like to know your opinion about my comments before updating the
patch. IMO, using two patches to process one set of raw data
complicates the support.

Ping

> support without SW_TOUCH:
>
> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
>
> Chris
>
>>
>> The driver is also updated to process wireless devices that do
>> not support touch interface.
>>
>> Tested-by: Jason Gerecke <killertofu@gmail.com>
>> Signed-off-by: Ping Cheng <pingc@wacom.com>
>> ---
>> v2: Change SW_TOUCH_ENABLED to SW_TOUCH and clear BTN_TOUCH bit
>> for button only interfaces as suggested by Peter Hutterer.
>> ---
>>  drivers/input/tablet/wacom_sys.c | 16 +++++++-
>>  drivers/input/tablet/wacom_wac.c | 87 ++++++++++++++++++++++++++++++++--------
>>  drivers/input/tablet/wacom_wac.h |  7 ++++
>>  include/uapi/linux/input.h       |  1 +
>>  4 files changed, 93 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
>> index 7bdb5e9..efd9729 100644
>> --- a/drivers/input/tablet/wacom_sys.c
>> +++ b/drivers/input/tablet/wacom_sys.c
>> @@ -1190,12 +1190,15 @@ static void wacom_wireless_work(struct work_struct *work)
>>                 wacom_wac1->features.device_type = BTN_TOOL_PEN;
>>                 snprintf(wacom_wac1->name, WACOM_NAME_MAX, "%s (WL) Pen",
>>                          wacom_wac1->features.name);
>> +               wacom_wac1->shared->touch_max = wacom_wac1->features.touch_max;
>> +               wacom_wac1->shared->type = wacom_wac1->features.type;
>>                 error = wacom_register_input(wacom1);
>>                 if (error)
>>                         goto fail;
>>
>>                 /* Touch interface */
>> -               if (wacom_wac1->features.touch_max) {
>> +               if (wacom_wac1->features.touch_max ||
>> +                   wacom_wac1->features.type == INTUOS_HT) {
>>                         wacom_wac2->features =
>>                                 *((struct wacom_features *)id->driver_info);
>>                         wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3;
>> @@ -1210,6 +1213,10 @@ static void wacom_wireless_work(struct work_struct *work)
>>                         error = wacom_register_input(wacom2);
>>                         if (error)
>>                                 goto fail;
>> +
>> +                       if (wacom_wac1->features.type == INTUOS_HT &&
>> +                           wacom_wac1->features.touch_max)
>> +                               wacom_wac->shared->touch_input = wacom_wac2->input;
>>                 }
>>
>>                 error = wacom_initialize_battery(wacom);
>> @@ -1318,7 +1325,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
>>          * HID descriptor. If this is the touch interface (wMaxPacketSize
>>          * of WACOM_PKGLEN_BBTOUCH3), override the table values.
>>          */
>> -       if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
>> +       if (features->type >= INTUOS5S && features->type <= INTUOS_HT) {
>>                 if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) {
>>                         features->device_type = BTN_TOOL_FINGER;
>>                         features->pktlen = WACOM_PKGLEN_BBTOUCH3;
>> @@ -1390,6 +1397,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
>>                 }
>>         }
>>
>> +       if (wacom_wac->features.type == INTUOS_HT && wacom_wac->features.touch_max) {
>> +               if (wacom_wac->features.device_type == BTN_TOOL_FINGER)
>> +                       wacom_wac->shared->touch_input = wacom_wac->input;
>> +       }
>> +
>>         return 0;
>>
>>   fail5: wacom_destroy_leds(wacom);
>> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
>> index 9c8eded..4cbea85 100644
>> --- a/drivers/input/tablet/wacom_wac.c
>> +++ b/drivers/input/tablet/wacom_wac.c
>> @@ -1176,10 +1176,17 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
>>  static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
>>  {
>>         struct input_dev *input = wacom->input;
>> +       struct wacom_features *features = &wacom->features;
>>
>> -       input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
>> +       if (features->type == INTUOS_HT) {
>> +               input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0);
>> +               input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0);
>> +       } else {
>> +
>> +               input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
>> +               input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
>> +       }
>>         input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0);
>> -       input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
>>         input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0);
>>  }
>>
>> @@ -1213,13 +1220,23 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
>>
>>  static int wacom_bpt_pen(struct wacom_wac *wacom)
>>  {
>> +       struct wacom_features *features = &wacom->features;
>>         struct input_dev *input = wacom->input;
>>         unsigned char *data = wacom->data;
>>         int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0;
>>
>> -       if (data[0] != 0x02)
>> +       if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_USB_MODE)
>>             return 0;
>>
>> +       if (data[0] == WACOM_REPORT_USB_MODE) {
>> +               if ((features->type == INTUOS_HT) && features->touch_max) {
>> +                       input_report_switch(wacom->shared->touch_input,
>> +                                           SW_TOUCH, data[8] & 0x40);
>> +                       input_sync(wacom->shared->touch_input);
>> +               }
>> +               return 0;
>> +       }
>> +
>>         prox = (data[1] & 0x20) == 0x20;
>>
>>         /*
>> @@ -1297,13 +1314,20 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len)
>>         unsigned char *data = wacom->data;
>>         int connected;
>>
>> -       if (len != WACOM_PKGLEN_WIRELESS || data[0] != 0x80)
>> +       if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL_MODE)
>>                 return 0;
>>
>>         connected = data[1] & 0x01;
>>         if (connected) {
>>                 int pid, battery;
>>
>> +               if ((wacom->shared->type == INTUOS_HT) &&
>> +                               wacom->shared->touch_max) {
>> +                       input_report_switch(wacom->shared->touch_input,
>> +                                       SW_TOUCH, data[5] & 0x40);
>> +                       input_sync(wacom->shared->touch_input);
>> +               }
>> +
>>                 pid = get_unaligned_be16(&data[6]);
>>                 battery = data[5] & 0x3f;
>>                 if (wacom->pid != pid) {
>> @@ -1391,6 +1415,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
>>                 break;
>>
>>         case BAMBOO_PT:
>> +       case INTUOS_HT:
>>                 sync = wacom_bpt_irq(wacom_wac, len);
>>                 break;
>>
>> @@ -1459,7 +1484,7 @@ void wacom_setup_device_quirks(struct wacom_features *features)
>>
>>         /* these device have multiple inputs */
>>         if (features->type >= WIRELESS ||
>> -           (features->type >= INTUOS5S && features->type <= INTUOSPL) ||
>> +           (features->type >= INTUOS5S && features->type <= INTUOS_HT) ||
>>             (features->oVid && features->oPid))
>>                 features->quirks |= WACOM_QUIRK_MULTI_INPUT;
>>
>> @@ -1531,7 +1556,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
>>         struct wacom_features *features = &wacom_wac->features;
>>         int i;
>>
>> -       input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
>> +       input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) |
>> +                              BIT_MASK(EV_SW);
>>
>>         __set_bit(BTN_TOUCH, input_dev->keybit);
>>         __set_bit(ABS_MISC, input_dev->absbit);
>> @@ -1771,33 +1797,48 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
>>                 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
>>                 break;
>>
>> +       case INTUOS_HT:
>> +               if (features->touch_max &&
>> +                   (features->device_type == BTN_TOOL_FINGER))
>> +                       __set_bit(SW_TOUCH, input_dev->swbit);
>> +               /* fall through */
>> +
>>         case BAMBOO_PT:
>>                 __clear_bit(ABS_MISC, input_dev->absbit);
>>
>> -               __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
>> -
>>                 if (features->device_type == BTN_TOOL_FINGER) {
>> -                       unsigned int flags = INPUT_MT_POINTER;
>>
>>                         __set_bit(BTN_LEFT, input_dev->keybit);
>>                         __set_bit(BTN_FORWARD, input_dev->keybit);
>>                         __set_bit(BTN_BACK, input_dev->keybit);
>>                         __set_bit(BTN_RIGHT, input_dev->keybit);
>>
>> -                       if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
>> -                               input_set_abs_params(input_dev,
>> +                       if (features->touch_max) {
>> +                               /* touch interface */
>> +                               unsigned int flags = INPUT_MT_POINTER;
>> +
>> +                               __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
>> +                               if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
>> +                                       input_set_abs_params(input_dev,
>>                                                      ABS_MT_TOUCH_MAJOR,
>>                                                      0, features->x_max, 0, 0);
>> -                               input_set_abs_params(input_dev,
>> +                                       input_set_abs_params(input_dev,
>>                                                      ABS_MT_TOUCH_MINOR,
>>                                                      0, features->y_max, 0, 0);
>> +                               } else {
>> +                                       __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
>> +                                       __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
>> +                                       flags = 0;
>> +                               }
>> +                               input_mt_init_slots(input_dev, features->touch_max, flags);
>>                         } else {
>> -                               __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
>> -                               __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
>> -                               flags = 0;
>> +                               /* buttons/keys only interface */
>> +                               __clear_bit(ABS_X, input_dev->absbit);
>> +                               __clear_bit(ABS_Y, input_dev->absbit);
>> +                               __clear_bit(BTN_TOUCH, input_dev->keybit);
>>                         }
>> -                       input_mt_init_slots(input_dev, features->touch_max, flags);
>>                 } else if (features->device_type == BTN_TOOL_PEN) {
>> +                       __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
>>                         __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
>>                         __set_bit(BTN_TOOL_PEN, input_dev->keybit);
>>                         __set_bit(BTN_STYLUS, input_dev->keybit);
>> @@ -2194,6 +2235,17 @@ static const struct wacom_features wacom_features_0x300 =
>>  static const struct wacom_features wacom_features_0x301 =
>>         { "Wacom Bamboo One M",    WACOM_PKGLEN_BBPEN,    21648, 13530, 1023,
>>           31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>> +static const struct wacom_features wacom_features_0x302 =
>> +       { "Wacom Intuos PT S",     WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
>> +         31, INTUOS_HT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
>> +         .touch_max = 16 };
>> +static const struct wacom_features wacom_features_0x303 =
>> +       { "Wacom Intuos PT M",     WACOM_PKGLEN_BBPEN,    21600, 13500, 1023,
>> +         31, INTUOS_HT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
>> +         .touch_max = 16 };
>> +static const struct wacom_features wacom_features_0x30E =
>> +       { "Wacom Intuos S",        WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
>> +         31, INTUOS_HT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>>  static const struct wacom_features wacom_features_0x6004 =
>>         { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
>>           0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>> @@ -2329,6 +2381,9 @@ const struct usb_device_id wacom_ids[] = {
>>         { USB_DEVICE_WACOM(0x10D) },
>>         { USB_DEVICE_WACOM(0x300) },
>>         { USB_DEVICE_WACOM(0x301) },
>> +       { USB_DEVICE_WACOM(0x302) },
>> +       { USB_DEVICE_DETAILED(0x303, USB_CLASS_HID, 0, 0) },
>> +       { USB_DEVICE_DETAILED(0x30E, USB_CLASS_HID, 0, 0) },
>>         { USB_DEVICE_WACOM(0x304) },
>>         { USB_DEVICE_DETAILED(0x314, USB_CLASS_HID, 0, 0) },
>>         { USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) },
>> diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
>> index fd23a37..ba9e335 100644
>> --- a/drivers/input/tablet/wacom_wac.h
>> +++ b/drivers/input/tablet/wacom_wac.h
>> @@ -54,6 +54,8 @@
>>  #define WACOM_REPORT_TPCST             16
>>  #define WACOM_REPORT_TPC1FGE           18
>>  #define WACOM_REPORT_24HDT             1
>> +#define WACOM_REPORT_WL_MODE           128
>> +#define WACOM_REPORT_USB_MODE          192
>>
>>  /* device quirks */
>>  #define WACOM_QUIRK_MULTI_INPUT                0x0001
>> @@ -81,6 +83,7 @@ enum {
>>         INTUOSPS,
>>         INTUOSPM,
>>         INTUOSPL,
>> +       INTUOS_HT,
>>         WACOM_21UX2,
>>         WACOM_22HD,
>>         DTK,
>> @@ -129,6 +132,10 @@ struct wacom_features {
>>  struct wacom_shared {
>>         bool stylus_in_proximity;
>>         bool touch_down;
>> +       /* for wireless device to access USB interfaces */
>> +       unsigned touch_max;
>> +       int type;
>> +       struct input_dev *touch_input;
>>  };
>>
>>  struct wacom_wac {
>> diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
>> index d08abf9..70e53e8 100644
>> --- a/include/uapi/linux/input.h
>> +++ b/include/uapi/linux/input.h
>> @@ -855,6 +855,7 @@ struct input_keymap_entry {
>>  #define SW_FRONT_PROXIMITY     0x0b  /* set = front proximity sensor active */
>>  #define SW_ROTATE_LOCK         0x0c  /* set = rotate locked/disabled */
>>  #define SW_LINEIN_INSERT       0x0d  /* set = inserted */
>> +#define SW_TOUCH               0x0e  /* set = touch switch turned on (touch events off) */
>>  #define SW_MAX                 0x0f
>>  #define SW_CNT                 (SW_MAX+1)
>>
>> --
>> 1.8.1.2
>>

^ permalink raw reply

* Re: [PATCH 2/2] Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDs
From: Dmitry Torokhov @ 2013-11-08 17:49 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Forest Bond, linux-input, Sebastian Dalfuß, Daniel Ritz,
	Max Weninger, Christian Engelmayer
In-Reply-To: <alpine.LNX.2.00.1311051052530.2779@pobox.suse.cz>

On Tue, Nov 05, 2013 at 10:53:10AM +0100, Jiri Kosina wrote:
> On Mon, 21 Oct 2013, Forest Bond wrote:
> 
> > From: Forest Bond <forest.bond@rapidrollout.com>
> > 
> > The HID driver now handles these devices, regardless of what protocol
> > the device claims it supports.
> > 
> > Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
> 
> Dmitry,
> 
> could you please Ack this, so that it can be applied together with 1/2? 
> Thanks!

Jiri,

Sorry for the delay. Yes, please merge through your tree.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


> 
> > ---
> >  drivers/input/touchscreen/usbtouchscreen.c |    4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
> > index 721fdb3..ae4b6b9 100644
> > --- a/drivers/input/touchscreen/usbtouchscreen.c
> > +++ b/drivers/input/touchscreen/usbtouchscreen.c
> > @@ -146,12 +146,10 @@ enum {
> >  
> >  #define USB_DEVICE_HID_CLASS(vend, prod) \
> >  	.match_flags = USB_DEVICE_ID_MATCH_INT_CLASS \
> > -		| USB_DEVICE_ID_MATCH_INT_PROTOCOL \
> >  		| USB_DEVICE_ID_MATCH_DEVICE, \
> >  	.idVendor = (vend), \
> >  	.idProduct = (prod), \
> > -	.bInterfaceClass = USB_INTERFACE_CLASS_HID, \
> > -	.bInterfaceProtocol = USB_INTERFACE_PROTOCOL_MOUSE
> > +	.bInterfaceClass = USB_INTERFACE_CLASS_HID
> >  
> >  static const struct usb_device_id usbtouch_devices[] = {
> >  #ifdef CONFIG_TOUCHSCREEN_USB_EGALAX
> > -- 
> > 1.7.9.5
> > 
> 
> -- 
> Jiri Kosina
> SUSE Labs

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH 1/5] HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel
From: simon @ 2013-11-08 15:54 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Simon Wood, linux-input, linux-kernel, Elias Vanderstuyft,
	"Michal Malý"
In-Reply-To: <alpine.LNX.2.00.1311081414470.835@pobox.suse.cz>

> On Wed, 6 Nov 2013, Simon Wood wrote:
>
>> Adjust the scaling and lineartity to match that of the Windows
>> driver (from MOMO testing).
>>
>> Reported-by: Elias Vanderstuyft <elias.vds@gmail.com>
>> Signed-off-by: Simon Wood <simon@mungewell.org>
>
> I have applied the series, thanks.

Thanks to all involved.
Simon


^ permalink raw reply

* Re: [PATCH] HID: roccat: Adding missing special driver declarations
From: Jiri Kosina @ 2013-11-08 13:21 UTC (permalink / raw)
  To: Stefan Achatz; +Cc: linux-input, linux-kernel
In-Reply-To: <1383916320.2478.0.camel@neuromancer.tessier-ashpool>

On Fri, 8 Nov 2013, Stefan Achatz wrote:

> Forgot two special driver declarations and sorted the list.
> 
> Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* [PATCHv9][ 3/3] ARM: dts: cpuimx35 Add touchscreen support.
From: Denis Carikli @ 2013-11-08 13:17 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
	linux-fbdev, Shawn Guo, Sascha Hauer, devicetree, Denis Carikli,
	Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren,
	Ian Campbell, Grant Likely, linux-arm-kernel, Lothar Waßmann,
	Eric Bénard
In-Reply-To: <1383916659-9988-1-git-send-email-denis@eukrea.com>

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Eric Bénard <eric@eukrea.com>
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v8->v9:
- Added Grant Likely in the cc list.
- Adapted to the removal of the pinctrl properties in the tsc2007 documentation.
- Fixed the gpios property (before, it was set to active high by error).

ChangeLog v7->v8:
- Added Shawn Guo in the cc list.
---
 arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi b/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi
index b9cb5a5..f25a40f 100644
--- a/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi
+++ b/arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi
@@ -36,6 +36,27 @@
 		compatible = "nxp,pcf8563";
 		reg = <0x51>;
 	};
+
+	tsc2007: tsc2007@48 {
+		compatible = "ti,tsc2007";
+		reg = <0x48>;
+		interrupt-parent = <&gpio3>;
+		interrupts = <0x2 0x8>;
+		gpios = <&gpio3 2 1>;
+		ti,x-plate-ohms = <180>;
+        };
+
+};
+
+&iomuxc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	imx35-eukrea {
+		pinctrl_hog: hoggrp {
+			fsl,pins = <MX35_PAD_ATA_DA2__GPIO3_2 0x80000000>;
+		};
+	};
 };
 
 &nfc {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCHv9][ 2/3] ARM: dts: cpuimx51 Add touchscreen support.
From: Denis Carikli @ 2013-11-08 13:17 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
	linux-fbdev, Shawn Guo, Sascha Hauer, devicetree, Denis Carikli,
	Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren,
	Ian Campbell, Grant Likely, linux-arm-kernel, Lothar Waßmann,
	Eric Bénard
In-Reply-To: <1383916659-9988-1-git-send-email-denis@eukrea.com>

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Eric Bénard <eric@eukrea.com>
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v8->v9:
- Added Grant Likely in the Cc list.
- Adapted to the removal of the pinctrl properties in the tsc2007 documentation.
- Fixed the gpios property (before, it was set to active high by error).

ChangeLog v7->v8:
- Added Shawn Guo in the cc list.
---
 arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi b/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi
index b22841a..b04c65b 100644
--- a/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi
+++ b/arch/arm/boot/dts/imx51-eukrea-cpuimx51.dtsi
@@ -42,11 +42,23 @@
 		compatible = "nxp,pcf8563";
 		reg = <0x51>;
 	};
+
+	tsc2007: tsc2007@49 {
+		compatible = "ti,tsc2007";
+		reg = <0x49>;
+		interrupt-parent = <&gpio4>;
+		interrupts = <0x0 0x8>;
+		gpios = <&gpio4 0 1>;
+		ti,x-plate-ohms = <180>;
+	};
 };
 
 &iomuxc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
 	imx51-eukrea {
-		pinctrl_tsc2007_1: tsc2007grp-1 {
+		pinctrl_hog: hoggrp {
 			fsl,pins = <
 				MX51_PAD_GPIO_NAND__GPIO_NAND 0x1f5
 				MX51_PAD_NANDF_D8__GPIO4_0 0x1f5
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCHv9][ 1/3] Input: tsc2007: Add device tree support.
From: Denis Carikli @ 2013-11-08 13:17 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
	linux-fbdev, Shawn Guo, Sascha Hauer, devicetree, Denis Carikli,
	Rob Herring, Pawel Moll, Mark Rutland, Stephen Warren,
	Ian Campbell, Grant Likely, linux-arm-kernel, Lothar Waßmann,
	Eric Bénard

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Eric Bénard <eric@eukrea.com>
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v8->v9:
- Added Grant Likely in the Cc list.
- Removed the mention of the pinctrl properties in the documentation.

ChangeLog v7->v8:
- Fixed the lack of x and z fuzz properties.
- The pendown gpio is better documented.
- Added Shawn Guo in the cc list.
---
 .../bindings/input/touchscreen/tsc2007.txt         |   41 ++++
 drivers/input/touchscreen/tsc2007.c                |  204 ++++++++++++++++----
 2 files changed, 204 insertions(+), 41 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt

diff --git a/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt b/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
new file mode 100644
index 0000000..028aba66d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
@@ -0,0 +1,41 @@
+* Texas Instruments tsc2007 touchscreen controller
+
+Required properties:
+- compatible: must be "ti,tsc2007".
+- reg: I2C address of the chip.
+- ti,x-plate-ohms: X-plate resistance in ohms.
+
+Optional properties:
+- gpios: the interrupt gpio the chip is connected to (trough the penirq pin).
+  The penirq pin goes to low when the panel is touched.
+  (see GPIO binding[1] for more details).
+- interrupt-parent: the phandle for the gpio controller
+  (see interrupt binding[0]).
+- interrupts: (gpio) interrupt to which the chip is connected
+  (see interrupt binding[0]).
+- ti,max-rt: maximum pressure.
+- ti,fuzzx: specifies the absolute input fuzz x value.
+  If set, it will permit noise in the data up to +- the value given to the fuzz
+  parameter, that is used to filter noise from the event stream.
+- ti,fuzzy: specifies the absolute input fuzz y value.
+- ti,fuzzz: specifies the absolute input fuzz z value.
+- ti,poll-period: how much time to wait(in millisecond) before reading again the
+  values from the tsc2007.
+
+[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+[1]: Documentation/devicetree/bindings/gpio/gpio.txt
+
+Example:
+	&i2c1 {
+		/* ... */
+		tsc2007@49 {
+			compatible = "ti,tsc2007";
+			reg = <0x49>;
+			interrupt-parent = <&gpio4>;
+			interrupts = <0x0 0x8>;
+			gpios = <&gpio4 0 0>;
+			ti,x-plate-ohms = <180>;
+		};
+
+		/* ... */
+	};
diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c
index 0b67ba4..3168a99 100644
--- a/drivers/input/touchscreen/tsc2007.c
+++ b/drivers/input/touchscreen/tsc2007.c
@@ -26,6 +26,9 @@
 #include <linux/interrupt.h>
 #include <linux/i2c.h>
 #include <linux/i2c/tsc2007.h>
+#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #define TSC2007_MEASURE_TEMP0		(0x0 << 4)
 #define TSC2007_MEASURE_AUX		(0x2 << 4)
@@ -74,7 +77,12 @@ struct tsc2007 {
 	u16			max_rt;
 	unsigned long		poll_delay;
 	unsigned long		poll_period;
+	int			fuzzx;
+	int			fuzzy;
+	int			fuzzz;
+	char			of;
 
+	unsigned		gpio;
 	int			irq;
 
 	wait_queue_head_t	wait;
@@ -84,6 +92,11 @@ struct tsc2007 {
 	void			(*clear_penirq)(void);
 };
 
+static int tsc2007_get_pendown_state_dt(struct tsc2007 *ts)
+{
+	return !gpio_get_value(ts->gpio);
+}
+
 static inline int tsc2007_xfer(struct tsc2007 *tsc, u8 cmd)
 {
 	s32 data;
@@ -142,6 +155,14 @@ static u32 tsc2007_calculate_pressure(struct tsc2007 *tsc, struct ts_event *tc)
 	return rt;
 }
 
+static bool tsc2007_is_pen_down_valid(struct tsc2007 *ts)
+{
+	if (ts->of)
+		return gpio_is_valid(ts->gpio);
+	else
+		return ts->get_pendown_state ? true : false;
+}
+
 static bool tsc2007_is_pen_down(struct tsc2007 *ts)
 {
 	/*
@@ -158,10 +179,13 @@ static bool tsc2007_is_pen_down(struct tsc2007 *ts)
 	 * to fall back on the pressure reading.
 	 */
 
-	if (!ts->get_pendown_state)
+	if (!tsc2007_is_pen_down_valid(ts))
 		return true;
 
-	return ts->get_pendown_state();
+	if (ts->of)
+		return tsc2007_get_pendown_state_dt(ts);
+	else
+		return ts->get_pendown_state();
 }
 
 static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
@@ -178,7 +202,7 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
 
 		rt = tsc2007_calculate_pressure(ts, &tc);
 
-		if (rt == 0 && !ts->get_pendown_state) {
+		if (!rt && !tsc2007_is_pen_down_valid(ts)) {
 			/*
 			 * If pressure reported is 0 and we don't have
 			 * callback to check pendown state, we have to
@@ -228,7 +252,7 @@ static irqreturn_t tsc2007_hard_irq(int irq, void *handle)
 {
 	struct tsc2007 *ts = handle;
 
-	if (!ts->get_pendown_state || likely(ts->get_pendown_state()))
+	if (tsc2007_is_pen_down(ts))
 		return IRQ_WAKE_THREAD;
 
 	if (ts->clear_penirq)
@@ -273,34 +297,71 @@ static void tsc2007_close(struct input_dev *input_dev)
 	tsc2007_stop(ts);
 }
 
-static int tsc2007_probe(struct i2c_client *client,
-				   const struct i2c_device_id *id)
+#ifdef CONFIG_OF
+static int tsc2007_probe_dt(struct i2c_client *client, struct tsc2007 *ts,
+			    struct device_node *np)
 {
-	struct tsc2007 *ts;
-	struct tsc2007_platform_data *pdata = client->dev.platform_data;
-	struct input_dev *input_dev;
-	int err;
-
-	if (!pdata) {
-		dev_err(&client->dev, "platform data is required!\n");
+	int err = 0;
+	u32 val32;
+	u64 val64;
+
+	if (!of_property_read_u32(np, "ti,max-rt", &val32))
+		ts->max_rt = val32;
+	else
+		ts->max_rt = MAX_12BIT;
+
+	if (!of_property_read_u32(np, "ti,fuzzx", &val32))
+		ts->fuzzx = val32;
+
+	if (!of_property_read_u32(np, "ti,fuzzy", &val32))
+		ts->fuzzy = val32;
+
+	if (!of_property_read_u32(np, "ti,fuzzz", &val32))
+		ts->fuzzz = val32;
+
+	if (!of_property_read_u64(np, "ti,poll-period", &val64))
+		ts->poll_period = val64;
+	else
+		ts->poll_period = 1;
+
+	if (!of_property_read_u32(np, "ti,x-plate-ohms", &val32)) {
+		ts->x_plate_ohms = val32;
+	} else {
+		dev_err(&client->dev,
+			"Error: lacking ti,x-plate-ohms devicetree property. (err %d).",
+			err);
 		return -EINVAL;
 	}
 
-	if (!i2c_check_functionality(client->adapter,
-				     I2C_FUNC_SMBUS_READ_WORD_DATA))
-		return -EIO;
+	ts->gpio = of_get_gpio(np, 0);
+	if (!gpio_is_valid(ts->gpio))
+		dev_err(&client->dev,
+			"GPIO not found (of_get_gpio returned %d)\n",
+			ts->gpio);
 
-	ts = kzalloc(sizeof(struct tsc2007), GFP_KERNEL);
-	input_dev = input_allocate_device();
-	if (!ts || !input_dev) {
-		err = -ENOMEM;
-		goto err_free_mem;
-	}
+	/* Used to detect if it is probed trough the device tree,
+	 * in order to be able to use that information in the IRQ handler.
+	 */
+	ts->of = 1;
 
-	ts->client = client;
-	ts->irq = client->irq;
-	ts->input = input_dev;
-	init_waitqueue_head(&ts->wait);
+	return 0;
+}
+#else
+static int tsc2007_probe_dt(struct i2c_client *client, struct tsc2007 *ts,
+			    struct device_node *np)
+{
+	return -ENODEV;
+}
+#endif
+
+static int tsc2007_probe_pdev(struct i2c_client *client, struct tsc2007 *ts,
+			      struct tsc2007_platform_data *pdata,
+			      const struct i2c_device_id *id)
+{
+	if (!pdata) {
+		dev_err(&client->dev, "platform data is required!\n");
+		return -EINVAL;
+	}
 
 	ts->model             = pdata->model;
 	ts->x_plate_ohms      = pdata->x_plate_ohms;
@@ -309,13 +370,59 @@ static int tsc2007_probe(struct i2c_client *client,
 	ts->poll_period       = pdata->poll_period ? : 1;
 	ts->get_pendown_state = pdata->get_pendown_state;
 	ts->clear_penirq      = pdata->clear_penirq;
+	ts->fuzzx             = pdata->fuzzx;
+	ts->fuzzy             = pdata->fuzzy;
+	ts->fuzzz             = pdata->fuzzz;
 
 	if (pdata->x_plate_ohms == 0) {
 		dev_err(&client->dev, "x_plate_ohms is not set up in platform data");
-		err = -EINVAL;
-		goto err_free_mem;
+		return -EINVAL;
 	}
 
+	/* Used to detect if it is probed trough the device tree,
+	 * in order to be able to use that information in the IRQ handler.
+	 */
+	ts->of = 0;
+
+	return 0;
+}
+
+static int tsc2007_probe(struct i2c_client *client,
+			 const struct i2c_device_id *id)
+{
+	struct device_node *np = client->dev.of_node;
+	struct tsc2007_platform_data *pdata = client->dev.platform_data;
+	struct tsc2007 *ts;
+	struct input_dev *input_dev;
+	int err = 0;
+
+	ts = devm_kzalloc(&client->dev, sizeof(struct tsc2007), GFP_KERNEL);
+	if (!ts)
+		return -ENOMEM;
+
+	if (np)
+		err = tsc2007_probe_dt(client, ts, np);
+	else
+		err = tsc2007_probe_pdev(client, ts, pdata, id);
+
+	if (err)
+		return err;
+
+	if (!i2c_check_functionality(client->adapter,
+				     I2C_FUNC_SMBUS_READ_WORD_DATA))
+		return -EIO;
+
+	input_dev = input_allocate_device();
+	if (!input_dev) {
+		err = -ENOMEM;
+		goto err_free_input;
+	};
+
+	ts->client = client;
+	ts->irq = client->irq;
+	ts->input = input_dev;
+	init_waitqueue_head(&ts->wait);
+
 	snprintf(ts->phys, sizeof(ts->phys),
 		 "%s/input0", dev_name(&client->dev));
 
@@ -331,19 +438,21 @@ static int tsc2007_probe(struct i2c_client *client,
 	input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
 	input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
 
-	input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, pdata->fuzzx, 0);
-	input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, pdata->fuzzy, 0);
+	input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, ts->fuzzx, 0);
+	input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, ts->fuzzy, 0);
 	input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT,
-			pdata->fuzzz, 0);
+			     ts->fuzzz, 0);
 
-	if (pdata->init_platform_hw)
-		pdata->init_platform_hw();
+	if (!np) {
+		if (pdata->init_platform_hw)
+			pdata->init_platform_hw();
+	}
 
 	err = request_threaded_irq(ts->irq, tsc2007_hard_irq, tsc2007_soft_irq,
 				   IRQF_ONESHOT, client->dev.driver->name, ts);
 	if (err < 0) {
 		dev_err(&client->dev, "irq %d busy?\n", ts->irq);
-		goto err_free_mem;
+		goto err_free_input;
 	}
 
 	tsc2007_stop(ts);
@@ -358,23 +467,27 @@ static int tsc2007_probe(struct i2c_client *client,
 
  err_free_irq:
 	free_irq(ts->irq, ts);
-	if (pdata->exit_platform_hw)
-		pdata->exit_platform_hw();
- err_free_mem:
+	if (!np) {
+		if (pdata->exit_platform_hw)
+			pdata->exit_platform_hw();
+	}
+ err_free_input:
 	input_free_device(input_dev);
-	kfree(ts);
 	return err;
 }
 
 static int tsc2007_remove(struct i2c_client *client)
 {
+	struct device_node *np = client->dev.of_node;
 	struct tsc2007	*ts = i2c_get_clientdata(client);
 	struct tsc2007_platform_data *pdata = client->dev.platform_data;
 
 	free_irq(ts->irq, ts);
 
-	if (pdata->exit_platform_hw)
-		pdata->exit_platform_hw();
+	if (!np) {
+		if (pdata->exit_platform_hw)
+			pdata->exit_platform_hw();
+	}
 
 	input_unregister_device(ts->input);
 	kfree(ts);
@@ -389,10 +502,19 @@ static const struct i2c_device_id tsc2007_idtable[] = {
 
 MODULE_DEVICE_TABLE(i2c, tsc2007_idtable);
 
+#ifdef CONFIG_OF
+static const struct of_device_id tsc2007_of_match[] = {
+	{ .compatible = "ti,tsc2007" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, tsc2007_of_match);
+#endif
+
 static struct i2c_driver tsc2007_driver = {
 	.driver = {
 		.owner	= THIS_MODULE,
-		.name	= "tsc2007"
+		.name	= "tsc2007",
+		.of_match_table = of_match_ptr(tsc2007_of_match),
 	},
 	.id_table	= tsc2007_idtable,
 	.probe		= tsc2007_probe,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH 1/5] HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel
From: Jiri Kosina @ 2013-11-08 13:14 UTC (permalink / raw)
  To: Simon Wood
  Cc: linux-input, linux-kernel, Elias Vanderstuyft, Michal Malý
In-Reply-To: <1383766244-2336-1-git-send-email-simon@mungewell.org>

On Wed, 6 Nov 2013, Simon Wood wrote:

> Adjust the scaling and lineartity to match that of the Windows
> driver (from MOMO testing).
> 
> Reported-by: Elias Vanderstuyft <elias.vds@gmail.com>
> Signed-off-by: Simon Wood <simon@mungewell.org>

I have applied the series, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* [PATCH] HID: roccat: Adding missing special driver declarations
From: Stefan Achatz @ 2013-11-08 13:12 UTC (permalink / raw)
  To: Jiri Kosina, linux-input, linux-kernel

Forgot two special driver declarations and sorted the list.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
---
 drivers/hid/hid-core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0079422..ec6ba50 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1801,12 +1801,14 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
 #if IS_ENABLED(CONFIG_HID_ROCCAT)
-	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKU) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKUFX) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPURE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPURE_OPTICAL) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEXTD) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_LUA) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
-- 
1.7.3.4

^ permalink raw reply related

* Re: [PATCH v2 2/2] Input: wacom - add support for three new Intuos devices
From: Chris Bagwell @ 2013-11-08  2:25 UTC (permalink / raw)
  To: Ping Cheng
  Cc: linux-input@vger.kernel.org, Dmitry Torokhov, Peter Hutterer,
	Ping Cheng
In-Reply-To: <1381439866-1161-1-git-send-email-pingc@wacom.com>

On Thu, Oct 10, 2013 at 4:17 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> This series of models added a hardware switch to turn touch
> data on/off. To report the state of the switch, SW_TOUCH
> is added in include/uapi/linux/input.h.

So I guess the big point is this patch can't go in until a SW_TOUCH
goes in first.

Since the 1/2 or this 2/2 series has already gone in, would you mind
breaking this
remaining patch up into the basic support for new Intuos (without the
SW_TOUCH) and
then a separate patch to add SW_TOUCH support on top of that?  Then
the basic support can go in ASAP.

I only have comments on this patch related to the SW_TOUCH part... things like:

 * should the SW_TOUCH be reported against the wireless interface or
the touch interface... userland apps may have an opinion on which is
best.
 * the part with updating SW_TOUCH from unrelated interfaces could use
a review by someone like Dmitry for possible issues.
 * It would be better if you didn't add that EV_SW for HW that will
not report the SW_TOUCH.

If you break the patch into 2, you can add my line for the basic
support without SW_TOUCH:

Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>

Chris

>
> The driver is also updated to process wireless devices that do
> not support touch interface.
>
> Tested-by: Jason Gerecke <killertofu@gmail.com>
> Signed-off-by: Ping Cheng <pingc@wacom.com>
> ---
> v2: Change SW_TOUCH_ENABLED to SW_TOUCH and clear BTN_TOUCH bit
> for button only interfaces as suggested by Peter Hutterer.
> ---
>  drivers/input/tablet/wacom_sys.c | 16 +++++++-
>  drivers/input/tablet/wacom_wac.c | 87 ++++++++++++++++++++++++++++++++--------
>  drivers/input/tablet/wacom_wac.h |  7 ++++
>  include/uapi/linux/input.h       |  1 +
>  4 files changed, 93 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
> index 7bdb5e9..efd9729 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -1190,12 +1190,15 @@ static void wacom_wireless_work(struct work_struct *work)
>                 wacom_wac1->features.device_type = BTN_TOOL_PEN;
>                 snprintf(wacom_wac1->name, WACOM_NAME_MAX, "%s (WL) Pen",
>                          wacom_wac1->features.name);
> +               wacom_wac1->shared->touch_max = wacom_wac1->features.touch_max;
> +               wacom_wac1->shared->type = wacom_wac1->features.type;
>                 error = wacom_register_input(wacom1);
>                 if (error)
>                         goto fail;
>
>                 /* Touch interface */
> -               if (wacom_wac1->features.touch_max) {
> +               if (wacom_wac1->features.touch_max ||
> +                   wacom_wac1->features.type == INTUOS_HT) {
>                         wacom_wac2->features =
>                                 *((struct wacom_features *)id->driver_info);
>                         wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3;
> @@ -1210,6 +1213,10 @@ static void wacom_wireless_work(struct work_struct *work)
>                         error = wacom_register_input(wacom2);
>                         if (error)
>                                 goto fail;
> +
> +                       if (wacom_wac1->features.type == INTUOS_HT &&
> +                           wacom_wac1->features.touch_max)
> +                               wacom_wac->shared->touch_input = wacom_wac2->input;
>                 }
>
>                 error = wacom_initialize_battery(wacom);
> @@ -1318,7 +1325,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
>          * HID descriptor. If this is the touch interface (wMaxPacketSize
>          * of WACOM_PKGLEN_BBTOUCH3), override the table values.
>          */
> -       if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
> +       if (features->type >= INTUOS5S && features->type <= INTUOS_HT) {
>                 if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) {
>                         features->device_type = BTN_TOOL_FINGER;
>                         features->pktlen = WACOM_PKGLEN_BBTOUCH3;
> @@ -1390,6 +1397,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
>                 }
>         }
>
> +       if (wacom_wac->features.type == INTUOS_HT && wacom_wac->features.touch_max) {
> +               if (wacom_wac->features.device_type == BTN_TOOL_FINGER)
> +                       wacom_wac->shared->touch_input = wacom_wac->input;
> +       }
> +
>         return 0;
>
>   fail5: wacom_destroy_leds(wacom);
> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
> index 9c8eded..4cbea85 100644
> --- a/drivers/input/tablet/wacom_wac.c
> +++ b/drivers/input/tablet/wacom_wac.c
> @@ -1176,10 +1176,17 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
>  static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
>  {
>         struct input_dev *input = wacom->input;
> +       struct wacom_features *features = &wacom->features;
>
> -       input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
> +       if (features->type == INTUOS_HT) {
> +               input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0);
> +               input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0);
> +       } else {
> +
> +               input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
> +               input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
> +       }
>         input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0);
> -       input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
>         input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0);
>  }
>
> @@ -1213,13 +1220,23 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
>
>  static int wacom_bpt_pen(struct wacom_wac *wacom)
>  {
> +       struct wacom_features *features = &wacom->features;
>         struct input_dev *input = wacom->input;
>         unsigned char *data = wacom->data;
>         int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0;
>
> -       if (data[0] != 0x02)
> +       if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_USB_MODE)
>             return 0;
>
> +       if (data[0] == WACOM_REPORT_USB_MODE) {
> +               if ((features->type == INTUOS_HT) && features->touch_max) {
> +                       input_report_switch(wacom->shared->touch_input,
> +                                           SW_TOUCH, data[8] & 0x40);
> +                       input_sync(wacom->shared->touch_input);
> +               }
> +               return 0;
> +       }
> +
>         prox = (data[1] & 0x20) == 0x20;
>
>         /*
> @@ -1297,13 +1314,20 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len)
>         unsigned char *data = wacom->data;
>         int connected;
>
> -       if (len != WACOM_PKGLEN_WIRELESS || data[0] != 0x80)
> +       if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL_MODE)
>                 return 0;
>
>         connected = data[1] & 0x01;
>         if (connected) {
>                 int pid, battery;
>
> +               if ((wacom->shared->type == INTUOS_HT) &&
> +                               wacom->shared->touch_max) {
> +                       input_report_switch(wacom->shared->touch_input,
> +                                       SW_TOUCH, data[5] & 0x40);
> +                       input_sync(wacom->shared->touch_input);
> +               }
> +
>                 pid = get_unaligned_be16(&data[6]);
>                 battery = data[5] & 0x3f;
>                 if (wacom->pid != pid) {
> @@ -1391,6 +1415,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
>                 break;
>
>         case BAMBOO_PT:
> +       case INTUOS_HT:
>                 sync = wacom_bpt_irq(wacom_wac, len);
>                 break;
>
> @@ -1459,7 +1484,7 @@ void wacom_setup_device_quirks(struct wacom_features *features)
>
>         /* these device have multiple inputs */
>         if (features->type >= WIRELESS ||
> -           (features->type >= INTUOS5S && features->type <= INTUOSPL) ||
> +           (features->type >= INTUOS5S && features->type <= INTUOS_HT) ||
>             (features->oVid && features->oPid))
>                 features->quirks |= WACOM_QUIRK_MULTI_INPUT;
>
> @@ -1531,7 +1556,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
>         struct wacom_features *features = &wacom_wac->features;
>         int i;
>
> -       input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
> +       input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) |
> +                              BIT_MASK(EV_SW);
>
>         __set_bit(BTN_TOUCH, input_dev->keybit);
>         __set_bit(ABS_MISC, input_dev->absbit);
> @@ -1771,33 +1797,48 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
>                 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
>                 break;
>
> +       case INTUOS_HT:
> +               if (features->touch_max &&
> +                   (features->device_type == BTN_TOOL_FINGER))
> +                       __set_bit(SW_TOUCH, input_dev->swbit);
> +               /* fall through */
> +
>         case BAMBOO_PT:
>                 __clear_bit(ABS_MISC, input_dev->absbit);
>
> -               __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
> -
>                 if (features->device_type == BTN_TOOL_FINGER) {
> -                       unsigned int flags = INPUT_MT_POINTER;
>
>                         __set_bit(BTN_LEFT, input_dev->keybit);
>                         __set_bit(BTN_FORWARD, input_dev->keybit);
>                         __set_bit(BTN_BACK, input_dev->keybit);
>                         __set_bit(BTN_RIGHT, input_dev->keybit);
>
> -                       if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
> -                               input_set_abs_params(input_dev,
> +                       if (features->touch_max) {
> +                               /* touch interface */
> +                               unsigned int flags = INPUT_MT_POINTER;
> +
> +                               __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
> +                               if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
> +                                       input_set_abs_params(input_dev,
>                                                      ABS_MT_TOUCH_MAJOR,
>                                                      0, features->x_max, 0, 0);
> -                               input_set_abs_params(input_dev,
> +                                       input_set_abs_params(input_dev,
>                                                      ABS_MT_TOUCH_MINOR,
>                                                      0, features->y_max, 0, 0);
> +                               } else {
> +                                       __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
> +                                       __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
> +                                       flags = 0;
> +                               }
> +                               input_mt_init_slots(input_dev, features->touch_max, flags);
>                         } else {
> -                               __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
> -                               __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
> -                               flags = 0;
> +                               /* buttons/keys only interface */
> +                               __clear_bit(ABS_X, input_dev->absbit);
> +                               __clear_bit(ABS_Y, input_dev->absbit);
> +                               __clear_bit(BTN_TOUCH, input_dev->keybit);
>                         }
> -                       input_mt_init_slots(input_dev, features->touch_max, flags);
>                 } else if (features->device_type == BTN_TOOL_PEN) {
> +                       __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
>                         __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
>                         __set_bit(BTN_TOOL_PEN, input_dev->keybit);
>                         __set_bit(BTN_STYLUS, input_dev->keybit);
> @@ -2194,6 +2235,17 @@ static const struct wacom_features wacom_features_0x300 =
>  static const struct wacom_features wacom_features_0x301 =
>         { "Wacom Bamboo One M",    WACOM_PKGLEN_BBPEN,    21648, 13530, 1023,
>           31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
> +static const struct wacom_features wacom_features_0x302 =
> +       { "Wacom Intuos PT S",     WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
> +         31, INTUOS_HT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
> +         .touch_max = 16 };
> +static const struct wacom_features wacom_features_0x303 =
> +       { "Wacom Intuos PT M",     WACOM_PKGLEN_BBPEN,    21600, 13500, 1023,
> +         31, INTUOS_HT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
> +         .touch_max = 16 };
> +static const struct wacom_features wacom_features_0x30E =
> +       { "Wacom Intuos S",        WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
> +         31, INTUOS_HT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>  static const struct wacom_features wacom_features_0x6004 =
>         { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
>           0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
> @@ -2329,6 +2381,9 @@ const struct usb_device_id wacom_ids[] = {
>         { USB_DEVICE_WACOM(0x10D) },
>         { USB_DEVICE_WACOM(0x300) },
>         { USB_DEVICE_WACOM(0x301) },
> +       { USB_DEVICE_WACOM(0x302) },
> +       { USB_DEVICE_DETAILED(0x303, USB_CLASS_HID, 0, 0) },
> +       { USB_DEVICE_DETAILED(0x30E, USB_CLASS_HID, 0, 0) },
>         { USB_DEVICE_WACOM(0x304) },
>         { USB_DEVICE_DETAILED(0x314, USB_CLASS_HID, 0, 0) },
>         { USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) },
> diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
> index fd23a37..ba9e335 100644
> --- a/drivers/input/tablet/wacom_wac.h
> +++ b/drivers/input/tablet/wacom_wac.h
> @@ -54,6 +54,8 @@
>  #define WACOM_REPORT_TPCST             16
>  #define WACOM_REPORT_TPC1FGE           18
>  #define WACOM_REPORT_24HDT             1
> +#define WACOM_REPORT_WL_MODE           128
> +#define WACOM_REPORT_USB_MODE          192
>
>  /* device quirks */
>  #define WACOM_QUIRK_MULTI_INPUT                0x0001
> @@ -81,6 +83,7 @@ enum {
>         INTUOSPS,
>         INTUOSPM,
>         INTUOSPL,
> +       INTUOS_HT,
>         WACOM_21UX2,
>         WACOM_22HD,
>         DTK,
> @@ -129,6 +132,10 @@ struct wacom_features {
>  struct wacom_shared {
>         bool stylus_in_proximity;
>         bool touch_down;
> +       /* for wireless device to access USB interfaces */
> +       unsigned touch_max;
> +       int type;
> +       struct input_dev *touch_input;
>  };
>
>  struct wacom_wac {
> diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
> index d08abf9..70e53e8 100644
> --- a/include/uapi/linux/input.h
> +++ b/include/uapi/linux/input.h
> @@ -855,6 +855,7 @@ struct input_keymap_entry {
>  #define SW_FRONT_PROXIMITY     0x0b  /* set = front proximity sensor active */
>  #define SW_ROTATE_LOCK         0x0c  /* set = rotate locked/disabled */
>  #define SW_LINEIN_INSERT       0x0d  /* set = inserted */
> +#define SW_TOUCH               0x0e  /* set = touch switch turned on (touch events off) */
>  #define SW_MAX                 0x0f
>  #define SW_CNT                 (SW_MAX+1)
>
> --
> 1.8.1.2
>

^ permalink raw reply

* Re: [PATCH] INPUT: wacom: Added definition for Wacom CTH680 The Wacom Creative Pen & Touch Tablet M (CTH680, 056A:0303) is a newer revision of the Bamboo series. This patch adds product 0303 to wacom.ko.
From: Ping Cheng @ 2013-11-08  2:18 UTC (permalink / raw)
  To: Chris Bagwell, Peter Hutterer
  Cc: Dmitry Torokhov, matthew, linux-input@vger.kernel.org
In-Reply-To: <CAGzDe_YU58vy_t99+dVot2C1NzRFia4ONwCEpzc01PcRpY6xMg@mail.gmail.com>

On Thu, Nov 7, 2013 at 6:04 PM, Chris Bagwell <chris@cnpbagwell.com> wrote:
> On Thu, Nov 7, 2013 at 4:11 PM, Ping Cheng <pinglinux@gmail.com> wrote:
>> On Thu, Nov 7, 2013 at 8:03 AM, Chris Bagwell <chris@cnpbagwell.com> wrote:
>>> On Sat, Nov 2, 2013 at 2:04 PM,  <matthew@incomplete.io> wrote:
>>>> From: Matthew Geddes <matthew@incomplete.io>
>>>>
>>>
>>> Your whole commit message appears to be crammed into first summary
>>> line.  Could you please align with git conventions: put a line break
>>> after "CTH680", a blank line, and then the remaining description
>>> afterwards.
>>>
>>>> Signed-off-by: Matthew Geddes <matthew@incomplete.io>
>>
>> Nacked-by: Ping Cheng <pingc@wacom.com>
>>
>> Patch [1] that supports this device (and its friends) was posted early
>> last month. It was updated on Oct. 10 in version 2. Users at
>> linuxwacom.sf.net have tested the patch since then.
>
> Thanks Ping.  Those slipped past me and when I googled to see if you'd
> submitted anything yet I only found the Intuos Pro patches.
>
>>
>> Dmitry,
>>
>> We has 4 patches waiting to be merged. Do you have questions for any of them?
>
> Looking at mail archive, I found 2/2 patches related to the "new
> Intuos"/Bamboos.  I also see Dmitry applied the 1/2 patch to his next
> branch but not the 2/2...  I suspect he was waiting an ack from Peter
> after a question he had.
>
> I'll review that remaining 2/2 and see if I can help move it along.

Thank you Chris for helping us out. It is easy to miss patches when
they stayed outstanding in the mailing list for too long

Peter, do you have more questions about the patch [1]?

>> [1] http://www.spinics.net/lists/linux-input/msg27789.html
>>
>>>> ---
>>>>  drivers/input/tablet/wacom_wac.c | 4 ++++
>>>>  1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
>>>> index c59b797..5015269 100644
>>>> --- a/drivers/input/tablet/wacom_wac.c
>>>> +++ b/drivers/input/tablet/wacom_wac.c
>>>> @@ -2128,6 +2128,9 @@ static const struct wacom_features wacom_features_0x300 =
>>>>  static const struct wacom_features wacom_features_0x301 =
>>>>         { "Wacom Bamboo One M",    WACOM_PKGLEN_BBPEN,    21648, 13530, 1023,
>>>>           31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>>>> +static const struct wacom_features wacom_features_0x303 =
>>>> +       { "Wacom Creative Touch & Pen M", WACOM_PKGLEN_BBPEN, 21648, 13530,
>>>
>>> A search for model CTH680 shows this device is the newly released
>>> "Intuos Pen & Touch Medium"; which is also the new name for Bamboo's
>>> and with new form factor.  I do see occasional site that added
>>> Creative in there: "Intuos Creative Pen & Touch Medium".  Can you
>>> confirm if this is the model you have?
>>>
>>> I'd suggest using Wacom's terms closer (add in Intuos and swap Pen &
>>> Touch to their order; maybe drop phrase Creative).
>>>
>>> Also, the 21648/13530 values look copy&pasted from previous line.  Can
>>> you use "evtest" or similar to find real maximum values.  Previous
>>> "Bamboo Touch" models had 13700 as second number.  Since your tablet
>>> has different shape from previous Bamboo and the "Bamboo One" then
>>> there is good change you need unique values to get full usable area of
>>> tablet.
>>>
>>>> +         1023, 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>>>
>>> Can you update patch to exactly follow form of structures surrounding
>>> it?  Namely, put the "1023" value on first line like rest of lines do.
>>>
>>> Thanks!
>>> Chris
>>>
>>>
>>>>  static const struct wacom_features wacom_features_0x6004 =
>>>>         { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
>>>>           0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>>>> @@ -2258,6 +2261,7 @@ const struct usb_device_id wacom_ids[] = {
>>>>         { USB_DEVICE_WACOM(0x10F) },
>>>>         { USB_DEVICE_WACOM(0x300) },
>>>>         { USB_DEVICE_WACOM(0x301) },
>>>> +       { USB_DEVICE_WACOM(0x303) },
>>>>         { USB_DEVICE_WACOM(0x304) },
>>>>         { USB_DEVICE_WACOM(0x4001) },
>>>>         { USB_DEVICE_WACOM(0x47) },
>>>> --
>>>> 1.8.3.2
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] INPUT: wacom: Added definition for Wacom CTH680 The Wacom Creative Pen & Touch Tablet M (CTH680, 056A:0303) is a newer revision of the Bamboo series. This patch adds product 0303 to wacom.ko.
From: Chris Bagwell @ 2013-11-08  2:04 UTC (permalink / raw)
  To: Ping Cheng; +Cc: Dmitry Torokhov, matthew, linux-input@vger.kernel.org
In-Reply-To: <CAF8JNhK3GBj8nywibKnxgeMGf19f4iw1GW83s9uM78F1OoxTiQ@mail.gmail.com>

On Thu, Nov 7, 2013 at 4:11 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> On Thu, Nov 7, 2013 at 8:03 AM, Chris Bagwell <chris@cnpbagwell.com> wrote:
>> On Sat, Nov 2, 2013 at 2:04 PM,  <matthew@incomplete.io> wrote:
>>> From: Matthew Geddes <matthew@incomplete.io>
>>>
>>
>> Your whole commit message appears to be crammed into first summary
>> line.  Could you please align with git conventions: put a line break
>> after "CTH680", a blank line, and then the remaining description
>> afterwards.
>>
>>> Signed-off-by: Matthew Geddes <matthew@incomplete.io>
>
> Nacked-by: Ping Cheng <pingc@wacom.com>
>
> Patch [1] that supports this device (and its friends) was posted early
> last month. It was updated on Oct. 10 in version 2. Users at
> linuxwacom.sf.net have tested the patch since then.

Thanks Ping.  Those slipped past me and when I googled to see if you'd
submitted anything yet I only found the Intuos Pro patches.

>
> Dmitry,
>
> We has 4 patches waiting to be merged. Do you have questions for any of them?

Looking at mail archive, I found 2/2 patches related to the "new
Intuos"/Bamboos.  I also see Dmitry applied the 1/2 patch to his next
branch but not the 2/2...  I suspect he was waiting an ack from Peter
after a question he had.

I'll review that remaining 2/2 and see if I can help move it along.

Chris

>
> Ping
>
> [1] http://www.spinics.net/lists/linux-input/msg27789.html
>
>>> ---
>>>  drivers/input/tablet/wacom_wac.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
>>> index c59b797..5015269 100644
>>> --- a/drivers/input/tablet/wacom_wac.c
>>> +++ b/drivers/input/tablet/wacom_wac.c
>>> @@ -2128,6 +2128,9 @@ static const struct wacom_features wacom_features_0x300 =
>>>  static const struct wacom_features wacom_features_0x301 =
>>>         { "Wacom Bamboo One M",    WACOM_PKGLEN_BBPEN,    21648, 13530, 1023,
>>>           31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>>> +static const struct wacom_features wacom_features_0x303 =
>>> +       { "Wacom Creative Touch & Pen M", WACOM_PKGLEN_BBPEN, 21648, 13530,
>>
>> A search for model CTH680 shows this device is the newly released
>> "Intuos Pen & Touch Medium"; which is also the new name for Bamboo's
>> and with new form factor.  I do see occasional site that added
>> Creative in there: "Intuos Creative Pen & Touch Medium".  Can you
>> confirm if this is the model you have?
>>
>> I'd suggest using Wacom's terms closer (add in Intuos and swap Pen &
>> Touch to their order; maybe drop phrase Creative).
>>
>> Also, the 21648/13530 values look copy&pasted from previous line.  Can
>> you use "evtest" or similar to find real maximum values.  Previous
>> "Bamboo Touch" models had 13700 as second number.  Since your tablet
>> has different shape from previous Bamboo and the "Bamboo One" then
>> there is good change you need unique values to get full usable area of
>> tablet.
>>
>>> +         1023, 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>>
>> Can you update patch to exactly follow form of structures surrounding
>> it?  Namely, put the "1023" value on first line like rest of lines do.
>>
>> Thanks!
>> Chris
>>
>>
>>>  static const struct wacom_features wacom_features_0x6004 =
>>>         { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
>>>           0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>>> @@ -2258,6 +2261,7 @@ const struct usb_device_id wacom_ids[] = {
>>>         { USB_DEVICE_WACOM(0x10F) },
>>>         { USB_DEVICE_WACOM(0x300) },
>>>         { USB_DEVICE_WACOM(0x301) },
>>> +       { USB_DEVICE_WACOM(0x303) },
>>>         { USB_DEVICE_WACOM(0x304) },
>>>         { USB_DEVICE_WACOM(0x4001) },
>>>         { USB_DEVICE_WACOM(0x47) },
>>> --
>>> 1.8.3.2
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: My "enable bluetooth" hotkey increase brightness instead
From: Gianfranco Costamagna @ 2013-11-07 22:15 UTC (permalink / raw)
  To: David Herrmann; +Cc: linux-input@vger.kernel.org
In-Reply-To: <CANq1E4TBHcCe6V7PhP_guhS3=nTd=hTq2jYYCzp+w7NjZiEpiQ@mail.gmail.com>


----- Messaggio originale -----

> Da: David Herrmann <dh.herrmann@gmail.com>
> A: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
> Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
> Inviato: Giovedì 7 Novembre 2013 15:44
> Oggetto: Re: My "enable bluetooth" hotkey increase brightness instead
> 
> Hi

Hi David

> 
> On Tue, Oct 29, 2013 at 9:52 AM, Gianfranco Costamagna
> <costamagnagianfranco@yahoo.it> wrote:
>>  Hi linux-input developers, I write here since suggested on my launchpad 
> bug.
>> 
>>  The problem is really simple, I have an acer aspire 6930G and when I press 
> "enable bluetooth" on my keyboard I get the brightness of my screen 
> increased.
>>  I reported on launchpad my configuration [1], and also opened a bug here 
> [2].
>> 
>>  the problem seems to be in the kernel so far, but I honestly don't know 
> where to better report it and how to debug/check it.
>> 
>>  I tested also kernel 3.12rc6 without any better outcome.
>> 
>>  Can anybody please help me out with this problem?
>> 
>>  Many thanks!
> 
> Please use "evtest" to see which events are generated for your keys:
>   http://cgit.freedesktop.org/evtest/
> You need to run it on your keyboard-event chardev, something like:
> /dev/input/eventX (just try each until you find your keyboard).
> 
> Please append the information you get and press the key which is
> incorrectly mapped.

Wonderful hint! Now when I press the bluetooth key I see two different event fired from the keyboard
^Clocutus@Unimatrix02-Saucy:~ $ sudo evtest 
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:    Lid Switch
/dev/input/event1:    Power Button
/dev/input/event2:    Sleep Button
/dev/input/event3:    Power Button
/dev/input/event4:    AT Translated Set 2 keyboard
/dev/input/event5:    Video Bus
/dev/input/event6:    HDA Intel HDMI/DP,pcm=3 Phantom
/dev/input/event7:    HDA Intel Headphone
/dev/input/event8:    HDA Intel Line
/dev/input/event9:    HDA Intel Mic
/dev/input/event10:    SynPS/2 Synaptics TouchPad
/dev/input/event11:    Acer Crystal Eye webcam
Select the device event number [0-12]: 4
Input driver version is 1.0.1
Input device ID: bus 0x11 vendor 0x1 product 0x1 version 0xab41
Input device name: "AT Translated Set 2 keyboard"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 1 (KEY_ESC)
    Event code 2 (KEY_1)
    Event code 3 (KEY_2)
    Event code 4 (KEY_3)
    Event code 5 (KEY_4)
    Event code 6 (KEY_5)
    Event code 7 (KEY_6)
    Event code 8 (KEY_7)
    Event code 9 (KEY_8)
    Event code 10 (KEY_9)
    Event code 11 (KEY_0)
    Event code 12 (KEY_MINUS)
    Event code 13 (KEY_EQUAL)
    Event code 14 (KEY_BACKSPACE)
    Event code 15 (KEY_TAB)
    Event code 16 (KEY_Q)
    Event code 17 (KEY_W)
    Event code 18 (KEY_E)
    Event code 19 (KEY_R)
    Event code 20 (KEY_T)
    Event code 21 (KEY_Y)
    Event code 22 (KEY_U)
    Event code 23 (KEY_I)
    Event code 24 (KEY_O)
    Event code 25 (KEY_P)
    Event code 26 (KEY_LEFTBRACE)
    Event code 27 (KEY_RIGHTBRACE)
    Event code 28 (KEY_ENTER)
    Event code 29 (KEY_LEFTCTRL)
    Event code 30 (KEY_A)
    Event code 31 (KEY_S)
    Event code 32 (KEY_D)
    Event code 33 (KEY_F)
    Event code 34 (KEY_G)
    Event code 35 (KEY_H)
    Event code 36 (KEY_J)
    Event code 37 (KEY_K)
    Event code 38 (KEY_L)
    Event code 39 (KEY_SEMICOLON)
    Event code 40 (KEY_APOSTROPHE)
    Event code 41 (KEY_GRAVE)
    Event code 42 (KEY_LEFTSHIFT)
    Event code 43 (KEY_BACKSLASH)
    Event code 44 (KEY_Z)
    Event code 45 (KEY_X)
    Event code 46 (KEY_C)
    Event code 47 (KEY_V)
    Event code 48 (KEY_B)
    Event code 49 (KEY_N)
    Event code 50 (KEY_M)
    Event code 51 (KEY_COMMA)
    Event code 52 (KEY_DOT)
    Event code 53 (KEY_SLASH)
    Event code 54 (KEY_RIGHTSHIFT)
    Event code 55 (KEY_KPASTERISK)
    Event code 56 (KEY_LEFTALT)
    Event code 57 (KEY_SPACE)
    Event code 58 (KEY_CAPSLOCK)
    Event code 59 (KEY_F1)
    Event code 60 (KEY_F2)
    Event code 61 (KEY_F3)
    Event code 62 (KEY_F4)
    Event code 63 (KEY_F5)
    Event code 64 (KEY_F6)
    Event code 65 (KEY_F7)
    Event code 66 (KEY_F8)
    Event code 67 (KEY_F9)
    Event code 68 (KEY_F10)
    Event code 69 (KEY_NUMLOCK)
    Event code 70 (KEY_SCROLLLOCK)
    Event code 71 (KEY_KP7)
    Event code 72 (KEY_KP8)
    Event code 73 (KEY_KP9)
    Event code 74 (KEY_KPMINUS)
    Event code 75 (KEY_KP4)
    Event code 76 (KEY_KP5)
    Event code 77 (KEY_KP6)
    Event code 78 (KEY_KPPLUS)
    Event code 79 (KEY_KP1)
    Event code 80 (KEY_KP2)
    Event code 81 (KEY_KP3)
    Event code 82 (KEY_KP0)
    Event code 83 (KEY_KPDOT)
    Event code 85 (KEY_ZENKAKUHANKAKU)
    Event code 86 (KEY_102ND)
    Event code 87 (KEY_F11)
    Event code 88 (KEY_F12)
    Event code 89 (KEY_RO)
    Event code 90 (KEY_KATAKANA)
    Event code 91 (KEY_HIRAGANA)
    Event code 92 (KEY_HENKAN)
    Event code 93 (KEY_KATAKANAHIRAGANA)
    Event code 94 (KEY_MUHENKAN)
    Event code 95 (KEY_KPJPCOMMA)
    Event code 96 (KEY_KPENTER)
    Event code 97 (KEY_RIGHTCTRL)
    Event code 98 (KEY_KPSLASH)
    Event code 99 (KEY_SYSRQ)
    Event code 100 (KEY_RIGHTALT)
    Event code 102 (KEY_HOME)
    Event code 103 (KEY_UP)
    Event code 104 (KEY_PAGEUP)
    Event code 105 (KEY_LEFT)
    Event code 106 (KEY_RIGHT)
    Event code 107 (KEY_END)
    Event code 108 (KEY_DOWN)
    Event code 109 (KEY_PAGEDOWN)
    Event code 110 (KEY_INSERT)
    Event code 111 (KEY_DELETE)
    Event code 112 (KEY_MACRO)
    Event code 113 (KEY_MUTE)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 116 (KEY_POWER)
    Event code 117 (KEY_KPEQUAL)
    Event code 119 (KEY_PAUSE)
    Event code 121 (KEY_KPCOMMA)
    Event code 122 (KEY_HANGUEL)
    Event code 123 (KEY_HANJA)
    Event code 124 (KEY_YEN)
    Event code 125 (KEY_LEFTMETA)
    Event code 126 (KEY_RIGHTMETA)
    Event code 127 (KEY_COMPOSE)
    Event code 128 (KEY_STOP)
    Event code 138 (KEY_HELP)
    Event code 140 (KEY_CALC)
    Event code 141 (KEY_SETUP)
    Event code 142 (KEY_SLEEP)
    Event code 143 (KEY_WAKEUP)
    Event code 148 (KEY_PROG1)
    Event code 149 (KEY_PROG2)
    Event code 155 (KEY_MAIL)
    Event code 156 (KEY_BOOKMARKS)
    Event code 157 (KEY_COMPUTER)
    Event code 158 (KEY_BACK)
    Event code 159 (KEY_FORWARD)
    Event code 163 (KEY_NEXTSONG)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 165 (KEY_PREVIOUSSONG)
    Event code 166 (KEY_STOPCD)
    Event code 172 (KEY_HOMEPAGE)
    Event code 173 (KEY_REFRESH)
    Event code 183 (KEY_F13)
    Event code 184 (KEY_F14)
    Event code 185 (KEY_F15)
    Event code 192 (KEY_F22)
    Event code 193 (KEY_F23)
    Event code 217 (KEY_SEARCH)
    Event code 224 (KEY_BRIGHTNESSDOWN)
    Event code 225 (KEY_BRIGHTNESSUP)
    Event code 226 (KEY_MEDIA)
    Event code 227 (KEY_SWITCHVIDEOMODE)
    Event code 236 (KEY_BATTERY)
    Event code 237 (KEY_BLUETOOTH)
    Event code 238 (KEY_WLAN)
    Event code 425 (KEY_PRESENTATION)
    Event code 434 (KEY_DOLLAR)
    Event code 435 (KEY_EURO)
    Event code 464 (KEY_FN)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
  Event type 17 (EV_LED)
    Event code 0 (LED_NUML)
    Event code 1 (LED_CAPSL)
    Event code 2 (LED_SCROLLL)
Properties:
  Property type 20 (EV_REP)
    Property code 0 (REP_DELAY)
      Value    250
    Property code 1 (REP_PERIOD)
      Value     33
Testing ... (interrupt to exit)
Event: time 1383862330.411016, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1c
Event: time 1383862330.411016, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
Event: time 1383862330.411016, -------------- SYN_REPORT ------------
Event: time 1383862331.588429, type 4 (EV_MSC), code 4 (MSC_SCAN), value d9
Event: time 1383862331.588429, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 1
Event: time 1383862331.588429, -------------- SYN_REPORT ------------
Event: time 1383862331.810012, type 4 (EV_MSC), code 4 (MSC_SCAN), value d9
Event: time 1383862331.810012, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 0
Event: time 1383862331.810012, -------------- SYN_REPORT ------------
Event: time 1383862332.498971, type 4 (EV_MSC), code 4 (MSC_SCAN), value d4
Event: time 1383862332.498971, type 1 (EV_KEY), code 237 (KEY_BLUETOOTH), value 1
Event: time 1383862332.498971, -------------- SYN_REPORT ------------
Event: time 1383862332.720524, type 4 (EV_MSC), code 4 (MSC_SCAN), value d4
Event: time 1383862332.720524, type 1 (EV_KEY), code 237 (KEY_BLUETOOTH), value 0
Event: time 1383862332.720524, -------------- SYN_REPORT ------------
Event: time 1383862333.631341, type 4 (EV_MSC), code 4 (MSC_SCAN), value d9
Event: time 1383862333.631341, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 1
Event: time 1383862333.631341, -------------- SYN_REPORT ------------
Event: time 1383862333.832775, type 4 (EV_MSC), code 4 (MSC_SCAN), value d9
Event: time 1383862333.832775, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 0
Event: time 1383862333.832775, -------------- SYN_REPORT ------------
Event: time 1383862334.682950, type 4 (EV_MSC), code 4 (MSC_SCAN), value d4
Event: time 1383862334.682950, type 1 (EV_KEY), code 237 (KEY_BLUETOOTH), value 1
Event: time 1383862334.682950, -------------- SYN_REPORT ------------
Event: time 1383862334.844099, type 4 (EV_MSC), code 4 (MSC_SCAN), value d4
Event: time 1383862334.844099, type 1 (EV_KEY), code 237 (KEY_BLUETOOTH), value 0
Event: time 1383862334.844099, -------------- SYN_REPORT ------------
Event: time 1383862338.144505, type 4 (EV_MSC), code 4 (MSC_SCAN), value d9
Event: time 1383862338.144505, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 1
Event: time 1383862338.144505, -------------- SYN_REPORT ------------
Event: time 1383862338.386205, type 4 (EV_MSC), code 4 (MSC_SCAN), value d9
Event: time 1383862338.386205, type 1 (EV_KEY), code 225 (KEY_BRIGHTNESSUP), value 0
Event: time 1383862338.386205, -------------- SYN_REPORT ------------
Event: time 1383862339.167990, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1d
Event: time 1383862339.167990, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1383862339.167990, -------------- SYN_REPORT ------------
Event: time 1383862339.319043, type 4 (EV_MSC), code 4 (MSC_SCAN), value 2e
Event: time 1383862339.319043, type 1 (EV_KEY), code 46 (KEY_C), value 1
Event: time 1383862339.319043, -------------- SYN_REPORT ------------


Thanks to you, you were really useful, but I don't know how to fix this properly :)

Cheers,

Gianfranco

> 
> Thanks
> David
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] INPUT: wacom: Added definition for Wacom CTH680 The Wacom Creative Pen & Touch Tablet M (CTH680, 056A:0303) is a newer revision of the Bamboo series. This patch adds product 0303 to wacom.ko.
From: Ping Cheng @ 2013-11-07 22:11 UTC (permalink / raw)
  To: Chris Bagwell, Dmitry Torokhov; +Cc: matthew, linux-input@vger.kernel.org
In-Reply-To: <CAGzDe_ZSVEkH0BaU1oZjPWjKuR02ibs=r+jQEU7hF-R68q7rfA@mail.gmail.com>

On Thu, Nov 7, 2013 at 8:03 AM, Chris Bagwell <chris@cnpbagwell.com> wrote:
> On Sat, Nov 2, 2013 at 2:04 PM,  <matthew@incomplete.io> wrote:
>> From: Matthew Geddes <matthew@incomplete.io>
>>
>
> Your whole commit message appears to be crammed into first summary
> line.  Could you please align with git conventions: put a line break
> after "CTH680", a blank line, and then the remaining description
> afterwards.
>
>> Signed-off-by: Matthew Geddes <matthew@incomplete.io>

Nacked-by: Ping Cheng <pingc@wacom.com>

Patch [1] that supports this device (and its friends) was posted early
last month. It was updated on Oct. 10 in version 2. Users at
linuxwacom.sf.net have tested the patch since then.

Dmitry,

We has 4 patches waiting to be merged. Do you have questions for any of them?

Ping

[1] http://www.spinics.net/lists/linux-input/msg27789.html

>> ---
>>  drivers/input/tablet/wacom_wac.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
>> index c59b797..5015269 100644
>> --- a/drivers/input/tablet/wacom_wac.c
>> +++ b/drivers/input/tablet/wacom_wac.c
>> @@ -2128,6 +2128,9 @@ static const struct wacom_features wacom_features_0x300 =
>>  static const struct wacom_features wacom_features_0x301 =
>>         { "Wacom Bamboo One M",    WACOM_PKGLEN_BBPEN,    21648, 13530, 1023,
>>           31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>> +static const struct wacom_features wacom_features_0x303 =
>> +       { "Wacom Creative Touch & Pen M", WACOM_PKGLEN_BBPEN, 21648, 13530,
>
> A search for model CTH680 shows this device is the newly released
> "Intuos Pen & Touch Medium"; which is also the new name for Bamboo's
> and with new form factor.  I do see occasional site that added
> Creative in there: "Intuos Creative Pen & Touch Medium".  Can you
> confirm if this is the model you have?
>
> I'd suggest using Wacom's terms closer (add in Intuos and swap Pen &
> Touch to their order; maybe drop phrase Creative).
>
> Also, the 21648/13530 values look copy&pasted from previous line.  Can
> you use "evtest" or similar to find real maximum values.  Previous
> "Bamboo Touch" models had 13700 as second number.  Since your tablet
> has different shape from previous Bamboo and the "Bamboo One" then
> there is good change you need unique values to get full usable area of
> tablet.
>
>> +         1023, 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>
> Can you update patch to exactly follow form of structures surrounding
> it?  Namely, put the "1023" value on first line like rest of lines do.
>
> Thanks!
> Chris
>
>
>>  static const struct wacom_features wacom_features_0x6004 =
>>         { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
>>           0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
>> @@ -2258,6 +2261,7 @@ const struct usb_device_id wacom_ids[] = {
>>         { USB_DEVICE_WACOM(0x10F) },
>>         { USB_DEVICE_WACOM(0x300) },
>>         { USB_DEVICE_WACOM(0x301) },
>> +       { USB_DEVICE_WACOM(0x303) },
>>         { USB_DEVICE_WACOM(0x304) },
>>         { USB_DEVICE_WACOM(0x4001) },
>>         { USB_DEVICE_WACOM(0x47) },
>> --
>> 1.8.3.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* hi
From: Bobinette Hadden @ 2013-11-07 20:59 UTC (permalink / raw)
  To: linux-input

I live for music and love going to see live shows. I am a hard worker and also am still in school working on my business degree. I am in the cosmotology profession and hopefully will be in it for a long time. I love traveling and am addicted to cruising. I am an extremely laid back female and am looking for a man that is just as laid back. I believe that those that take life to seriously will never get out alive. I love making people laugh simply because it always keeps me smiling as well. I have multiple piercings and tattoos and love the same on guys.I would like to eventually get married but am not sure that I actually want children. I have a very bold personality but am also very loving and loyal. Anything thing else you want to know just message me.
odwpevargk dumgtggeh dlyytsqcct
oshtsdzt zdobhwkmy huqmimtjpy
mwhpaokh J V C W F Z H B U M I J D A F P
bmgebxude W J A E J R M N U

^ permalink raw reply

* Re: [PATCH] INPUT: wacom: Added definition for Wacom CTH680 The Wacom Creative Pen & Touch Tablet M (CTH680, 056A:0303) is a newer revision of the Bamboo series. This patch adds product 0303 to wacom.ko.
From: Chris Bagwell @ 2013-11-07 16:03 UTC (permalink / raw)
  To: matthew; +Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
In-Reply-To: <1383419089-31248-1-git-send-email-matthew@incomplete.io>

On Sat, Nov 2, 2013 at 2:04 PM,  <matthew@incomplete.io> wrote:
> From: Matthew Geddes <matthew@incomplete.io>
>

Your whole commit message appears to be crammed into first summary
line.  Could you please align with git conventions: put a line break
after "CTH680", a blank line, and then the remaining description
afterwards.

> Signed-off-by: Matthew Geddes <matthew@incomplete.io>
> ---
>  drivers/input/tablet/wacom_wac.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
> index c59b797..5015269 100644
> --- a/drivers/input/tablet/wacom_wac.c
> +++ b/drivers/input/tablet/wacom_wac.c
> @@ -2128,6 +2128,9 @@ static const struct wacom_features wacom_features_0x300 =
>  static const struct wacom_features wacom_features_0x301 =
>         { "Wacom Bamboo One M",    WACOM_PKGLEN_BBPEN,    21648, 13530, 1023,
>           31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
> +static const struct wacom_features wacom_features_0x303 =
> +       { "Wacom Creative Touch & Pen M", WACOM_PKGLEN_BBPEN, 21648, 13530,

A search for model CTH680 shows this device is the newly released
"Intuos Pen & Touch Medium"; which is also the new name for Bamboo's
and with new form factor.  I do see occasional site that added
Creative in there: "Intuos Creative Pen & Touch Medium".  Can you
confirm if this is the model you have?

I'd suggest using Wacom's terms closer (add in Intuos and swap Pen &
Touch to their order; maybe drop phrase Creative).

Also, the 21648/13530 values look copy&pasted from previous line.  Can
you use "evtest" or similar to find real maximum values.  Previous
"Bamboo Touch" models had 13700 as second number.  Since your tablet
has different shape from previous Bamboo and the "Bamboo One" then
there is good change you need unique values to get full usable area of
tablet.

> +         1023, 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };

Can you update patch to exactly follow form of structures surrounding
it?  Namely, put the "1023" value on first line like rest of lines do.

Thanks!
Chris


>  static const struct wacom_features wacom_features_0x6004 =
>         { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
>           0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
> @@ -2258,6 +2261,7 @@ const struct usb_device_id wacom_ids[] = {
>         { USB_DEVICE_WACOM(0x10F) },
>         { USB_DEVICE_WACOM(0x300) },
>         { USB_DEVICE_WACOM(0x301) },
> +       { USB_DEVICE_WACOM(0x303) },
>         { USB_DEVICE_WACOM(0x304) },
>         { USB_DEVICE_WACOM(0x4001) },
>         { USB_DEVICE_WACOM(0x47) },
> --
> 1.8.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [appleir] BUG: unable to handle kernel NULL pointer dereference
From: Benjamin Tissoires @ 2013-11-07 15:49 UTC (permalink / raw)
  To: James Henstridge, Jiri Kosina
  Cc: Luis Henriques, linux-kernel, linux-input, Fabien André,
	Bastien Nocera
In-Reply-To: <CALcaVO=jOEqCwLCMUgEkFJMcc4H6bMLU4yvjo1fJ7DeXgkZH6A@mail.gmail.com>

Hi James,

On 07/11/13 02:52, James Henstridge wrote:
> On Wed, Nov 6, 2013 at 11:38 PM, Jiri Kosina <jkosina@suse.cz> wrote:
>> On Tue, 29 Oct 2013, Luis Henriques wrote:
>>
>>> James has reported a NULL pointer dereference[1] on the appleir
>>> driver.  From the bug report[2] it looks like it is 100%
>>> reproducible using a 3.12-rc6 kernel simply by pressing any button on
>>> the IR remote.
>>>
>>> >From the stack trace, it looks like input_event is invoked with the
>>> input_dev parameter set to NULL, which seems to indicate that
>>> appleir_input_configured is never invoked.
>>>
>>> Any ideas?
>>>
>>> [1] https://launchpadlibrarian.net/154942024/macmini-oops.jpg
>>> [2] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1244505
>>
>> [ adding some more CCs ]
>>
>> Okay, so apparently we didn't register with input, but only hiddev /
>> hidraw.
>>
>> appleir 0003:05AC:8240.0005: hiddev0,hidraw4: USB HID v1.11 Device [Apple Computer, Inc. IR Receiver] on usb-0000:00:1d.3-2/input0
>>
>> Therefore ->input_configured() callback has never been called, and thus we
>> oops due to appleir->input_dev being NULL when the first raw event is
>> reported.
>>
>> Could you please provide report descriptor of the device?
>>
>> The driver apparently relies on it being registered with hid-input, but
>> for some reason that doesn't happen.
> 
> Here is the relevant lsusb output that I think contains what you're
> asking for (I had to unbind usbhid for it to include the descriptor):
> 
> Bus 005 Device 003: ID 05ac:8240 Apple, Inc. Built-in IR Receiver
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
> ...

Ok, thanks for the report. Could you please test the following patch
which should solve your problem (hopefully)?

Cheers,
Benjamin

--

>From 54b332b992da1666abe7180b6cecd313c864e0b7 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Thu, 7 Nov 2013 10:46:48 -0500
Subject: [PATCH] HID: appleir: force input to be set

Some weird remotes are not correctly creating the input device. Their
report descriptor starts with:
0x06, 0x00, 0xff,              // Usage Page (Vendor Defined Page 1)  0
0xa1, 0x01,                    // Collection (Application)            3

whereas others (which are correctly handled) start with:
0x05, 0x0c,                    // Usage Page (Consumer Devices)       0
0x09, 0x01,                    // Usage (Consumer Control)            2
0xa1, 0x01,                    // Collection (Application)            4

The rest of the report descriptor is the same.

Adding the quirk HID_QUIRK_HIDINPUT_FORCE forces hid-input to allocate
the inputs, and everything should be ok.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/hid/hid-appleir.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c
index a42e6a3..0e6a42d 100644
--- a/drivers/hid/hid-appleir.c
+++ b/drivers/hid/hid-appleir.c
@@ -297,6 +297,9 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
 
 	appleir->hid = hid;
 
+	/* force input as some remotes bypass the input registration */
+	hid->quirks |= HID_QUIRK_HIDINPUT_FORCE;
+
 	spin_lock_init(&appleir->lock);
 	setup_timer(&appleir->key_up_timer,
 		    key_up_tick, (unsigned long) appleir);
-- 
1.8.3.1


^ permalink raw reply related

* Re: [PATCH] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
From: Jens Axboe @ 2013-11-07 15:29 UTC (permalink / raw)
  To: Duan Jiong, kernel, linux, a.zummo, airlied, dmitry.torokhov
  Cc: linux-kernel, rtc-linux, dri-devel, linux-tegra, linux-input,
	devel
In-Reply-To: <1383724599-15754-1-git-send-email-duanj.fnst@cn.fujitsu.com>

On 11/06/2013 12:56 AM, Duan Jiong wrote:
> This patch fixes coccinelle error regarding usage of IS_ERR and
> PTR_ERR instead of PTR_ERR_OR_ZERO.

Applied, thanks.

-- 
Jens Axboe

^ permalink raw reply

* Re: [PATCH] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
From: Jens Axboe @ 2013-11-07 15:29 UTC (permalink / raw)
  To: Duan Jiong, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, a.zummo-BfzFCNDTiLLj+vYz1yj4TQ,
	airlied-cv59FeDIM0c, dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b
In-Reply-To: <1383724544-15662-1-git-send-email-duanj.fnst-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>

On 11/06/2013 12:55 AM, Duan Jiong wrote:
> This patch fixes coccinelle error regarding usage of IS_ERR and
> PTR_ERR instead of PTR_ERR_OR_ZERO.

Applied, thanks.

-- 
Jens Axboe

^ permalink raw reply

* Re: My "enable bluetooth" hotkey increase brightness instead
From: David Herrmann @ 2013-11-07 14:44 UTC (permalink / raw)
  To: Gianfranco Costamagna; +Cc: linux-input@vger.kernel.org
In-Reply-To: <1383036747.30147.YahooMailNeo@web171802.mail.ir2.yahoo.com>

Hi

On Tue, Oct 29, 2013 at 9:52 AM, Gianfranco Costamagna
<costamagnagianfranco@yahoo.it> wrote:
> Hi linux-input developers, I write here since suggested on my launchpad bug.
>
> The problem is really simple, I have an acer aspire 6930G and when I press "enable bluetooth" on my keyboard I get the brightness of my screen increased.
> I reported on launchpad my configuration [1], and also opened a bug here [2].
>
> the problem seems to be in the kernel so far, but I honestly don't know where to better report it and how to debug/check it.
>
> I tested also kernel 3.12rc6 without any better outcome.
>
> Can anybody please help me out with this problem?
>
> Many thanks!

Please use "evtest" to see which events are generated for your keys:
  http://cgit.freedesktop.org/evtest/
You need to run it on your keyboard-event chardev, something like:
/dev/input/eventX (just try each until you find your keyboard).

Please append the information you get and press the key which is
incorrectly mapped.

Thanks
David

^ permalink raw reply

* Re: [PATCH] net:drivers/net: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
From: David Miller @ 2013-11-07  8:02 UTC (permalink / raw)
  To: duanj.fnst
  Cc: kernel, linux, a.zummo, airlied, dmitry.torokhov, axboe,
	linux-kernel, rtc-linux, dri-devel, linux-tegra, linux-input,
	devel, netdev
In-Reply-To: <1383724693-16220-1-git-send-email-duanj.fnst@cn.fujitsu.com>

From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Date: Wed, 6 Nov 2013 15:58:13 +0800

> This patch fixes coccinelle error regarding usage of IS_ERR and
> PTR_ERR instead of PTR_ERR_OR_ZERO.
> 
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>

Applied.

^ permalink raw reply

* Re: [PATCH] smsc: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
From: David Miller @ 2013-11-07  8:02 UTC (permalink / raw)
  To: duanj.fnst
  Cc: kernel, linux, a.zummo, airlied, dmitry.torokhov, axboe,
	linux-kernel, rtc-linux, dri-devel, linux-tegra, linux-input,
	devel, netdev
In-Reply-To: <1383724637-15849-1-git-send-email-duanj.fnst@cn.fujitsu.com>

From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Date: Wed, 6 Nov 2013 15:57:17 +0800

> This patch fixes coccinelle error regarding usage of IS_ERR and
> PTR_ERR instead of PTR_ERR_OR_ZERO.
> 
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>

Applied.

^ permalink raw reply

* [patch] Input: tnetv107x-keypad - make irqs signed for error handling
From: Dan Carpenter @ 2013-11-07  7:52 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Bill Pemberton, Mark Brown, Javier Martinez Canillas,
	Russell King, Sachin Kamat, linux-input, kernel-janitors

There is a bug in keypad_probe() where we do:

	kp->irq_press   = platform_get_irq_byname(pdev, "press");
	kp->irq_release = platform_get_irq_byname(pdev, "release");
	if (kp->irq_press < 0 || kp->irq_release < 0) {

The problem is that these irq variables are unsigned so the error
handling doesn't work.  I've changed them to signed values.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c
index 5f7b427..8bd24d5 100644
--- a/drivers/input/keyboard/tnetv107x-keypad.c
+++ b/drivers/input/keyboard/tnetv107x-keypad.c
@@ -60,8 +60,8 @@ struct keypad_data {
 	struct clk			*clk;
 	struct device			*dev;
 	spinlock_t			lock;
-	u32				irq_press;
-	u32				irq_release;
+	int				irq_press;
+	int				irq_release;
 	int				rows, cols, row_shift;
 	int				debounce_ms, active_low;
 	u32				prev_keys[3];

^ permalink raw reply related

* Re: [appleir] BUG: unable to handle kernel NULL pointer dereference
From: James Henstridge @ 2013-11-07  7:52 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Luis Henriques, Benjamin Tissoires, linux-kernel, linux-input,
	Fabien André, Bastien Nocera
In-Reply-To: <alpine.LNX.2.00.1311061635160.835@pobox.suse.cz>

On Wed, Nov 6, 2013 at 11:38 PM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Tue, 29 Oct 2013, Luis Henriques wrote:
>
>> James has reported a NULL pointer dereference[1] on the appleir
>> driver.  From the bug report[2] it looks like it is 100%
>> reproducible using a 3.12-rc6 kernel simply by pressing any button on
>> the IR remote.
>>
>> >From the stack trace, it looks like input_event is invoked with the
>> input_dev parameter set to NULL, which seems to indicate that
>> appleir_input_configured is never invoked.
>>
>> Any ideas?
>>
>> [1] https://launchpadlibrarian.net/154942024/macmini-oops.jpg
>> [2] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1244505
>
> [ adding some more CCs ]
>
> Okay, so apparently we didn't register with input, but only hiddev /
> hidraw.
>
> appleir 0003:05AC:8240.0005: hiddev0,hidraw4: USB HID v1.11 Device [Apple Computer, Inc. IR Receiver] on usb-0000:00:1d.3-2/input0
>
> Therefore ->input_configured() callback has never been called, and thus we
> oops due to appleir->input_dev being NULL when the first raw event is
> reported.
>
> Could you please provide report descriptor of the device?
>
> The driver apparently relies on it being registered with hid-input, but
> for some reason that doesn't happen.

Here is the relevant lsusb output that I think contains what you're
asking for (I had to unbind usbhid for it to include the descriptor):

Bus 005 Device 003: ID 05ac:8240 Apple, Inc. Built-in IR Receiver
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x05ac Apple, Inc.
  idProduct          0x8240 Built-in IR Receiver
  bcdDevice            1.10
  iManufacturer           1 Apple Computer, Inc.
  iProduct                2 IR Receiver
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      41
          Report Descriptor: (length is 41)
            Item(Global): Usage Page, data= [ 0x00 0xff ] 65280
                            (null)
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x04 ] 4
            Item(Global): Report ID, data= [ 0x24 ] 36
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Input, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position
Non_Volatile Bitfield
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x04 ] 4
            Item(Global): Report ID, data= [ 0x25 ] 37
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Input, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position
Non_Volatile Bitfield
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x04 ] 4
            Item(Global): Report ID, data= [ 0x26 ] 38
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Input, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position
Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)


James.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox