Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] input: Add support for Wacom protocol 4 serial tablets
From: Hans de Goede @ 2014-07-19 16:38 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Julian Squires, linux-input

Hi All,

Recent version of xf86-input-wacom no longer support directly accessing
serial tablets. Instead xf86-input-wacom now expects all wacom tablets to
be driven by the kernel and to show up as evdev devices.

This has caused old serial Wacom tablets to stop working for people who still
have such tablets. Julian Squires has written a serio input driver to fix this:
https://github.com/tokenrove/wacom-serial-iv

About a year ago Julian submitted this upstream, back then the response by
Dmitry was:

> The driver looks quite reasonable, however that would be the 4th Wacom
> driver in the tree... I wonder if it is time to split out transport
> parts from core wacom functionality so that it can be shared by USB, I2C
> and serio devices.

I've taken a quick look at this, the i2c driver is for touchscreens and in
the protocol has nothing in common with the other wacom drivers. The w8001
driver is for serial touchscreens and again a completely different protocol.

The wacom usb driver already deals with what appears to be a lot of different
protocol nuances, see for example wacom_wac.c, and non of all the different
package formats parsed in wacom_wac.c seem to have anything in common with
the wacom protocol 4 spoken over serial. So it seems that there is nothing
to be shared since these are really significant different devices which happen
to be from the same vendor. Moreover the usb wacom bits are being reworked
to use hid instead of to more or less parse usb hid reports themselves, and
I certainly don't want this driver to get in the way of that.

So all in all I believe it is best to keep this as a standalone driver.

Hence I'm hereby re-submitting this driver for upstream inclusion.

This is a significantly cleaned up version of the driver initially submitted
by Julian, with improved Graphire support (I own an old Graphire myself).

Regards,

Hans

^ permalink raw reply

* Re: Power-managing devices that are not of interest at some point in time
From: Alan Stern @ 2014-07-19 17:59 UTC (permalink / raw)
  To: Benson Leung
  Cc: Dmitry Torokhov, Rafael J. Wysocki, Patrik Fimml, Bastien Nocera,
	linux-pm, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <CANLzEkt4g_Y+nC6PSFCch6hR6YSE-S6FBe0Rt=adgWBi3vjM8Q@mail.gmail.com>

On Sat, 19 Jul 2014, Benson Leung wrote:

> > This raises an interesting question.  Suppose the system gets suspended
> > while the lid is closed.  At that point, shouldn't wakeup devices be
> > enabled, even if they were already inhibited?
> 
> It's possible that this could be a policy decision, ie, whether
> power/wakeup is set to enabled for those devices or not.
> However, I'd say that there's only one policy that makes sense in that
> case : wakeups should be disabled while suspended.
> 
> If we inhibited the device during runtime to prevent stray input
> events from being generated, it wouldn't make sense to allow the
> device to potentially generate an accidental wakeup while suspended.

That doesn't really make sense.  If you're afraid of a device 
generating spurious wakeup events when the lid is closed, you should 
never enable it for wakeup.  After all, one of the first things that 
people often do after suspending their laptop is close the lid.

Alan Stern


^ permalink raw reply

* Re: Power-managing devices that are not of interest at some point in time
From: Dmitry Torokhov @ 2014-07-19 18:21 UTC (permalink / raw)
  To: Alan Stern
  Cc: Benson Leung, Rafael J. Wysocki, Patrik Fimml, Bastien Nocera,
	linux-pm, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <Pine.LNX.4.44L0.1407191357140.28179-100000@netrider.rowland.org>

On Saturday, July 19, 2014 01:59:01 PM Alan Stern wrote:
> On Sat, 19 Jul 2014, Benson Leung wrote:
> > > This raises an interesting question.  Suppose the system gets suspended
> > > while the lid is closed.  At that point, shouldn't wakeup devices be
> > > enabled, even if they were already inhibited?
> > 
> > It's possible that this could be a policy decision, ie, whether
> > power/wakeup is set to enabled for those devices or not.
> > However, I'd say that there's only one policy that makes sense in that
> > case : wakeups should be disabled while suspended.
> > 
> > If we inhibited the device during runtime to prevent stray input
> > events from being generated, it wouldn't make sense to allow the
> > device to potentially generate an accidental wakeup while suspended.
> 
> That doesn't really make sense.  If you're afraid of a device
> generating spurious wakeup events when the lid is closed, you should
> never enable it for wakeup.  After all, one of the first things that
> people often do after suspending their laptop is close the lid.

That's a fair point, and I think should be done by default. But that does not 
change what Benson said - I think if we inhibited the device it should stay 
inhibited across system suspend, including being disabled as wakeup source 
even if it could be enabled as such.

Thanks,
Dmitry


^ permalink raw reply

* Re: Power-managing devices that are not of interest at some point in time
From: Rafael J. Wysocki @ 2014-07-19 20:19 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Alan Stern, Benson Leung, Patrik Fimml, Bastien Nocera, linux-pm,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <2047146.r4vphTZhkk@dtor-glaptop>

On Saturday, July 19, 2014 11:21:52 AM Dmitry Torokhov wrote:
> On Saturday, July 19, 2014 01:59:01 PM Alan Stern wrote:
> > On Sat, 19 Jul 2014, Benson Leung wrote:
> > > > This raises an interesting question.  Suppose the system gets suspended
> > > > while the lid is closed.  At that point, shouldn't wakeup devices be
> > > > enabled, even if they were already inhibited?
> > > 
> > > It's possible that this could be a policy decision, ie, whether
> > > power/wakeup is set to enabled for those devices or not.
> > > However, I'd say that there's only one policy that makes sense in that
> > > case : wakeups should be disabled while suspended.
> > > 
> > > If we inhibited the device during runtime to prevent stray input
> > > events from being generated, it wouldn't make sense to allow the
> > > device to potentially generate an accidental wakeup while suspended.
> > 
> > That doesn't really make sense.  If you're afraid of a device
> > generating spurious wakeup events when the lid is closed, you should
> > never enable it for wakeup.  After all, one of the first things that
> > people often do after suspending their laptop is close the lid.
> 
> That's a fair point, and I think should be done by default. But that does not 
> change what Benson said - I think if we inhibited the device it should stay 
> inhibited across system suspend, including being disabled as wakeup source 
> even if it could be enabled as such.

This seems to be the best approach to me too.

Rafael


^ permalink raw reply

* Re: [PATCH 0/5] Input - wacom: battery enhancements and unifying hid-wacom and wacom
From: Przemo Firszt @ 2014-07-19 21:15 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Dmitry Torokhov, Jiri Kosina, Ping Cheng, Jason Gerecke,
	linux-kernel, linux-input
In-Reply-To: <1405017900-16024-1-git-send-email-benjamin.tissoires@redhat.com>

Dnia 2014-07-10, czw o godzinie 14:44 -0400, Benjamin Tissoires pisze:
> Hi guys,
> 
> Continuing on the Wacom cleanup, here are 5 patches.
> 
> The first two enhance the battery reporting for the Wireless receiver by
> adding the status of the battery (discharging, full, charging) - inspired by
> the code found in hid-wacom.c, and also by adding notifications to the power
> system so that upower knows when the battery changed.
> 
> The last three are the handling of the two Wacom Bluetooth devices in wacom.ko.
> Some enhancements here:
> - Intuos4 now supports other tools than just the plain stylus (mouse, artpen, ...)
> - one less driver for Wacom (~700 lines of code less in total)
> - unifying access to LEDs/OLEDs from Bluetooth and USB devices
> 
> However, I did not backport the speed attribute and the ac power device (which
> is infered by the battery status). I don't know if there are users of those two,
> so I let them aside for now. Przemo, any ideas if this is actually used?
> 
> This whole code is based on top of the previous HID conversion patches.
> I pushed a branch with all I have queued on the list here:
> https://github.com/bentiss/linux/commits/hid-wacom-legacy-3.16-rc4
> 
> Again, given that there has been no answer on how this can be merged upstream
> (Jiri? Dmitry?), I just piled those on top of the previous.
> I wouldn't to resplit the input and hid specific changes if this is the choice
> that is made.
> 
> Cheers,
> Benjamin
> 
> Benjamin Tissoires (5):
>   Input - wacom: enhance Wireless Receiver battery reporting
>   Input - wacom: use a specific name for the battery device
>   Input - wacom: handle Graphire BT tablets in wacom.ko
>   Input - wacom: handle Intuos 4 BT in wacom.ko
>   HID: remove hid-wacom Bluetooth driver
> 
>  drivers/hid/Kconfig              |   8 -
>  drivers/hid/Makefile             |   1 -
>  drivers/hid/hid-core.c           |   2 -
>  drivers/hid/hid-wacom.c          | 973 ---------------------------------------
>  drivers/input/tablet/wacom.h     |   6 +
>  drivers/input/tablet/wacom_sys.c | 114 ++++-
>  drivers/input/tablet/wacom_wac.c | 189 +++++++-
>  drivers/input/tablet/wacom_wac.h |   8 +
>  8 files changed, 303 insertions(+), 998 deletions(-)
>  delete mode 100644 drivers/hid/hid-wacom.c
> 
Benjamin,
I think we might try to fix that [1] as well when making changes to the
sysfs entries. Currently every tablet connected wirelessly will trigger
creating new sysfs entries:

/sys/class/power_supply/wacom_ac
/sys/class/power_supply/wacom_battery

so sysfs is not happy about attempts to create duplicates. We need to
distinguish between devices using consecutive numbers or something else.

[1] https://sourceforge.net/p/linuxwacom/bugs/248/
-- 
Kind regards,
Przemo Firszt



^ permalink raw reply

* Re: [PATCH] input: Add support for Wacom protocol 4 serial tablets
From: Dmitry Torokhov @ 2014-07-19 23:08 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Julian Squires, linux-input
In-Reply-To: <1405787920-3354-2-git-send-email-hdegoede@redhat.com>

Hi Hans,

On Sat, Jul 19, 2014 at 06:38:40PM +0200, Hans de Goede wrote:
> Recent version of xf86-input-wacom no longer support directly accessing
> serial tablets. Instead xf86-input-wacom now expects all wacom tablets to
> be driven by the kernel and to show up as evdev devices.
> 
> This has caused old serial Wacom tablets to stop working for people who still
> have such tablets. Julian Squires has written a serio input driver to fix this:
> https://github.com/tokenrove/wacom-serial-iv
> 
> This is a cleaned up version of this driver with improved Graphire support
> (I own an old Graphire myself).
> 
> Signed-off-by: Julian Squires <julian@cipht.net>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  MAINTAINERS                          |   7 +
>  drivers/input/tablet/Kconfig         |  12 +
>  drivers/input/tablet/Makefile        |   1 +
>  drivers/input/tablet/wacom_serial4.c | 600 +++++++++++++++++++++++++++++++++++
>  include/uapi/linux/serio.h           |   1 +
>  5 files changed, 621 insertions(+)
>  create mode 100644 drivers/input/tablet/wacom_serial4.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1629ac9..1128b57 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9855,6 +9855,13 @@ M:	Pierre Ossman <pierre@ossman.eu>
>  S:	Maintained
>  F:	drivers/mmc/host/wbsd.*
>  
> +WACOM PROTOCOL 4 SERIAL TABLETS
> +M:	Julian Squires <julian@cipht.net>
> +M:	Hans de Goede <hdegoede@redhat.com>
> +L:	linux-input@vger.kernel.org
> +S:	Maintained
> +F:	drivers/input/tablet/wacom_serial4.c
> +
>  WATCHDOG DEVICE DRIVERS
>  M:	Wim Van Sebroeck <wim@iguana.be>
>  L:	linux-watchdog@vger.kernel.org
> diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig
> index bed7cbf..d7c764a 100644
> --- a/drivers/input/tablet/Kconfig
> +++ b/drivers/input/tablet/Kconfig
> @@ -89,4 +89,16 @@ config TABLET_USB_WACOM
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called wacom.
>  
> +config TABLET_SERIAL_WACOM4
> +	tristate "Wacom protocol 4 serial tablet support"
> +	select SERIO
> +	help
> +	  Say Y here if you want to use Wacom protocol 4 serial tablets.
> +	  E.g. serial versions of the Cintiq, Graphire or Penpartner.
> +	  Make sure to say Y to "Mouse support" (CONFIG_INPUT_MOUSEDEV) and/or
> +	  "Event interface support" (CONFIG_INPUT_EVDEV) as well.

Do we really need mousedev for wacom to work?

> +
> +	  To compile this driver as a module, choose M here: the
> +	  module will be called wacom_serial4.
> +
>  endif
> diff --git a/drivers/input/tablet/Makefile b/drivers/input/tablet/Makefile
> index 3f6c252..4d9339f 100644
> --- a/drivers/input/tablet/Makefile
> +++ b/drivers/input/tablet/Makefile
> @@ -11,3 +11,4 @@ obj-$(CONFIG_TABLET_USB_GTCO)	+= gtco.o
>  obj-$(CONFIG_TABLET_USB_HANWANG) += hanwang.o
>  obj-$(CONFIG_TABLET_USB_KBTAB)	+= kbtab.o
>  obj-$(CONFIG_TABLET_USB_WACOM)	+= wacom.o
> +obj-$(CONFIG_TABLET_SERIAL_WACOM4) += wacom_serial4.o
> diff --git a/drivers/input/tablet/wacom_serial4.c b/drivers/input/tablet/wacom_serial4.c
> new file mode 100644
> index 0000000..587e47c
> --- /dev/null
> +++ b/drivers/input/tablet/wacom_serial4.c
> @@ -0,0 +1,600 @@
> +/*
> + * Wacom protocol 4 serial tablet driver
> + *
> + * Copyright 2014      Hans de Goede <hdegoede@redhat.com>
> + * Copyright 2011-2012 Julian Squires <julian@cipht.net>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version of 2 of the License, or (at your
> + * option) any later version. See the file COPYING in the main directory of
> + * this archive for more details.
> + *
> + * Many thanks to Bill Seremetis, without whom PenPartner support
> + * would not have been possible. Thanks to Patrick Mahoney.
> + *
> + * This driver was developed with reference to much code written by others,
> + * particularly:
> + *  - elo, gunze drivers by Vojtech Pavlik <vojtech@ucw.cz>;
> + *  - wacom_w8001 driver by Jaya Kumar <jayakumar.lkml@gmail.com>;
> + *  - the USB wacom input driver, credited to many people
> + *    (see drivers/input/tablet/wacom.h);
> + *  - new and old versions of linuxwacom / xf86-input-wacom credited to
> + *    Frederic Lepied, France. <Lepied@XFree86.org> and
> + *    Ping Cheng, Wacom. <pingc@wacom.com>;
> + *  - and xf86wacom.c (a presumably ancient version of the linuxwacom code),
> + *    by Frederic Lepied and Raph Levien <raph@gtk.org>.
> + *
> + * To do:
> + *  - support pad buttons; (requires access to a model with pad buttons)
> + *  - support (protocol 4-style) tilt (requires access to a > 1.4 rom model)
> + */
> +
> +/*
> + * Wacom serial protocol 4 documentation taken from linuxwacom-0.9.9 code,
> + * protocol 4 uses 7 or 9 byte of data in the following format:
> + *
> + *	Byte 1
> + *	bit 7  Sync bit always 1
> + *	bit 6  Pointing device detected
> + *	bit 5  Cursor = 0 / Stylus = 1
> + *	bit 4  Reserved
> + *	bit 3  1 if a button on the pointing device has been pressed
> + *	bit 2  P0 (optional)
> + *	bit 1  X15
> + *	bit 0  X14
> + *
> + *	Byte 2
> + *	bit 7  Always 0
> + *	bits 6-0 = X13 - X7
> + *
> + *	Byte 3
> + *	bit 7  Always 0
> + *	bits 6-0 = X6 - X0
> + *
> + *	Byte 4
> + *	bit 7  Always 0
> + *	bit 6  B3
> + *	bit 5  B2
> + *	bit 4  B1
> + *	bit 3  B0
> + *	bit 2  P1 (optional)
> + *	bit 1  Y15
> + *	bit 0  Y14
> + *
> + *	Byte 5
> + *	bit 7  Always 0
> + *	bits 6-0 = Y13 - Y7
> + *
> + *	Byte 6
> + *	bit 7  Always 0
> + *	bits 6-0 = Y6 - Y0
> + *
> + *	Byte 7
> + *	bit 7 Always 0
> + *	bit 6  Sign of pressure data; or wheel-rel for cursor tool
> + *	bit 5  P7; or REL1 for cursor tool
> + *	bit 4  P6; or REL0 for cursor tool
> + *	bit 3  P5
> + *	bit 2  P4
> + *	bit 1  P3
> + *	bit 0  P2
> + *
> + *	byte 8 and 9 are optional and present only
> + *	in tilt mode.
> + *
> + *	Byte 8
> + *	bit 7 Always 0
> + *	bit 6 Sign of tilt X
> + *	bit 5  Xt6
> + *	bit 4  Xt5
> + *	bit 3  Xt4
> + *	bit 2  Xt3
> + *	bit 1  Xt2
> + *	bit 0  Xt1
> + *
> + *	Byte 9
> + *	bit 7 Always 0
> + *	bit 6 Sign of tilt Y
> + *	bit 5  Yt6
> + *	bit 4  Yt5
> + *	bit 3  Yt4
> + *	bit 2  Yt3
> + *	bit 1  Yt2
> + *	bit 0  Yt1
> + *
> + *	For more info see:
> + *	http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Serial_Protocol_IV

It looks this link is stale.

> + */
> +
> +#include <linux/completion.h>
> +#include <linux/init.h>
> +#include <linux/input.h>
> +#include <linux/interrupt.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/serio.h>
> +#include <linux/slab.h>
> +#include <linux/string.h>
> +#include "wacom_wac.h"
> +
> +MODULE_AUTHOR("Julian Squires <julian@cipht.net>, Hans de Goede <hdegoede@redhat.com>");
> +MODULE_DESCRIPTION("Wacom protocol 4 serial tablet driver");
> +MODULE_LICENSE("GPL");
> +
> +#define REQUEST_MODEL_AND_ROM_VERSION	"~#"
> +#define REQUEST_MAX_COORDINATES		"~C\r"
> +#define REQUEST_CONFIGURATION_STRING	"~R\r"
> +#define REQUEST_RESET_TO_PROTOCOL_IV	"\r#"
> +/* Note: sending "\r$\r" causes at least the Digitizer II to send
> + * packets in ASCII instead of binary.  "\r#" seems to undo that. */
> +
> +#define COMMAND_START_SENDING_PACKETS		"ST\r"
> +#define COMMAND_STOP_SENDING_PACKETS		"SP\r"
> +#define COMMAND_MULTI_MODE_INPUT		"MU1\r"
> +#define COMMAND_ORIGIN_IN_UPPER_LEFT		"OC1\r"
> +#define COMMAND_ENABLE_ALL_MACRO_BUTTONS	"~M0\r"
> +#define COMMAND_DISABLE_GROUP_1_MACRO_BUTTONS	"~M1\r"
> +#define COMMAND_TRANSMIT_AT_MAX_RATE		"IT0\r"
> +#define COMMAND_DISABLE_INCREMENTAL_MODE	"IN0\r"
> +#define COMMAND_ENABLE_CONTINUOUS_MODE		"SR\r"
> +#define COMMAND_ENABLE_PRESSURE_MODE		"PH1\r"
> +#define COMMAND_Z_FILTER			"ZF1\r"
> +
> +/* Note that this is a protocol 4 packet without tilt information. */
> +#define PACKET_LENGTH		7
> +#define DATA_SIZE		32
> +
> +/* flags */
> +#define F_COVERS_SCREEN		0x01
> +#define F_HAS_STYLUS2		0x02
> +#define F_HAS_SCROLLWHEEL	0x04
> +
> +enum { STYLUS = 1, ERASER, CURSOR };
> +struct { int device_id; int input_id; } tools[] = {
> +	{ 0, 0 },
> +	{ STYLUS_DEVICE_ID, BTN_TOOL_PEN },
> +	{ ERASER_DEVICE_ID, BTN_TOOL_RUBBER },
> +	{ CURSOR_DEVICE_ID, BTN_TOOL_MOUSE },
> +};
> +
> +struct wacom {
> +	struct input_dev *dev;
> +	struct completion cmd_done;
> +	int expect;
> +	int result;

I think these 2 should be u8.

> +	int extra_z_bits;
> +	int eraser_mask;
> +	int flags;
> +	int res_x, res_y;
> +	int max_x, max_y;
> +	int tool;
> +	int idx;

And these are unsigned ints.

> +	unsigned char data[DATA_SIZE];
> +	char phys[32];
> +};
> +
> +enum {
> +	MODEL_CINTIQ		= 0x504C, /* PL */
> +	MODEL_CINTIQ2		= 0x4454, /* DT */
> +	MODEL_DIGITIZER_II	= 0x5544, /* UD */
> +	MODEL_GRAPHIRE		= 0x4554, /* ET */
> +	MODEL_PENPARTNER	= 0x4354, /* CT */
> +};
> +
> +static void handle_model_response(struct wacom *wacom)
> +{
> +	int major_v, minor_v, r = 0;
> +	char *p;
> +
> +	p = strrchr(wacom->data, 'V');
> +	if (p)
> +		r = sscanf(p + 1, "%u.%u", &major_v, &minor_v);
> +	if (r != 2)
> +		major_v = minor_v = 0;
> +
> +	switch (wacom->data[2] << 8 | wacom->data[3]) {
> +	case MODEL_CINTIQ:	/* UNTESTED */
> +	case MODEL_CINTIQ2:
> +		if ((wacom->data[2] << 8 | wacom->data[3]) == MODEL_CINTIQ) {
> +			wacom->dev->name = "Wacom Cintiq";
> +			wacom->dev->id.version = MODEL_CINTIQ;
> +		} else {
> +			wacom->dev->name = "Wacom Cintiq II";
> +			wacom->dev->id.version = MODEL_CINTIQ2;
> +		}
> +		wacom->res_x = 508;
> +		wacom->res_y = 508;
> +		switch (wacom->data[5]<<8 | wacom->data[6]) {
> +		case 0x3731: /* PL-710 */
> +			wacom->res_x = 2540;
> +			wacom->res_y = 2540;
> +			/* fall through */
> +		case 0x3535: /* PL-550 */
> +		case 0x3830: /* PL-800 */
> +			wacom->extra_z_bits = 2;
> +		}
> +		wacom->flags = F_COVERS_SCREEN;
> +		break;
> +	case MODEL_PENPARTNER:
> +		wacom->dev->name = "Wacom Penpartner";
> +		wacom->dev->id.version = MODEL_PENPARTNER;
> +		wacom->res_x = 1000;
> +		wacom->res_y = 1000;
> +		break;
> +	case MODEL_GRAPHIRE:
> +		wacom->dev->name = "Wacom Graphire";
> +		wacom->dev->id.version = MODEL_GRAPHIRE;
> +		wacom->res_x = 1016;
> +		wacom->res_y = 1016;
> +		wacom->max_x = 5103;
> +		wacom->max_y = 3711;
> +		wacom->extra_z_bits = 2;
> +		wacom->eraser_mask = 0x08;
> +		wacom->flags = F_HAS_STYLUS2 | F_HAS_SCROLLWHEEL;
> +		break;
> +	case MODEL_DIGITIZER_II:
> +		wacom->dev->name = "Wacom Digitizer II";
> +		wacom->dev->id.version = MODEL_DIGITIZER_II;
> +		if (major_v == 1 && minor_v <= 2)
> +			wacom->extra_z_bits = 0; /* UNTESTED */
> +		break;
> +	default:
> +		dev_err(&wacom->dev->dev, "Unsupported Wacom model %s\n",
> +			wacom->data);
> +		wacom->result = -ENODEV;
> +		return;
> +	}
> +	dev_info(&wacom->dev->dev, "%s tablet, version %u.%u\n",
> +		 wacom->dev->name, major_v, minor_v);
> +}
> +
> +static void handle_configuration_response(struct wacom *wacom)
> +{
> +	int r, skip;
> +
> +	dev_dbg(&wacom->dev->dev, "Configuration string: %s\n", wacom->data);
> +	r = sscanf(wacom->data, "~R%x,%u,%u,%u,%u", &skip, &skip, &skip,
> +		   &wacom->res_x, &wacom->res_y);
> +	if (r != 5)
> +		dev_warn(&wacom->dev->dev, "could not get resolution\n");
> +}
> +
> +static void handle_coordinates_response(struct wacom *wacom)
> +{
> +	int r;
> +
> +	dev_dbg(&wacom->dev->dev, "Coordinates string: %s\n", wacom->data);
> +	r = sscanf(wacom->data, "~C%u,%u", &wacom->max_x, &wacom->max_y);
> +	if (r != 2)
> +		dev_warn(&wacom->dev->dev, "could not get max coordinates\n");
> +}
> +
> +static void handle_response(struct wacom *wacom)
> +{
> +	if (wacom->data[0] != '~' || wacom->data[1] != wacom->expect) {
> +		dev_err(&wacom->dev->dev,
> +			"Wacom got an unexpected response: %s\n", wacom->data);
> +		wacom->result = -EIO;
> +		complete(&wacom->cmd_done);
> +		return;
> +	}
> +
> +	wacom->result = 0;
> +
> +	switch (wacom->data[1]) {
> +	case '#':
> +		handle_model_response(wacom);
> +		break;
> +	case 'R':
> +		handle_configuration_response(wacom);
> +		break;
> +	case 'C':
> +		handle_coordinates_response(wacom);
> +		break;
> +	}
> +
> +	complete(&wacom->cmd_done);
> +}
> +
> +static void handle_packet(struct wacom *wacom)
> +{
> +	int in_proximity_p, stylus_p, button, x, y, z;
> +	int tool;
> +
> +	in_proximity_p = wacom->data[0] & 0x40;
> +	stylus_p = wacom->data[0] & 0x20;
> +	button = (wacom->data[3] & 0x78) >> 3;
> +	x = (wacom->data[0] & 3) << 14 | wacom->data[1]<<7 | wacom->data[2];
> +	y = (wacom->data[3] & 3) << 14 | wacom->data[4]<<7 | wacom->data[5];
> +
> +	if (in_proximity_p && stylus_p) {
> +		z = wacom->data[6] & 0x7f;
> +		if (wacom->extra_z_bits >= 1)
> +			z = z << 1 | (wacom->data[3] & 0x4) >> 2;
> +		if (wacom->extra_z_bits > 1)
> +			z = z << 1 | (wacom->data[0] & 0x4) >> 2;
> +		z = z ^ (0x40 << wacom->extra_z_bits);
> +	} else {
> +		z = -1;

I do not believe it is nice to send -1 as pressure. What does it even
mean to userspace? Does wacom_usb do this as well?

> +	}
> +
> +	if (stylus_p)
> +		tool = (button & wacom->eraser_mask) ? ERASER : STYLUS;
> +	else
> +		tool = CURSOR;
> +
> +	if (tool != wacom->tool && wacom->tool != 0) {
> +		input_report_key(wacom->dev, tools[wacom->tool].input_id, 0);
> +		input_sync(wacom->dev);
> +	}
> +	wacom->tool = tool;
> +
> +	input_report_key(wacom->dev, tools[tool].input_id, in_proximity_p);
> +	input_report_abs(wacom->dev, ABS_MISC,
> +			 in_proximity_p ? tools[tool].device_id : 0);
> +	input_report_abs(wacom->dev, ABS_X, x);
> +	input_report_abs(wacom->dev, ABS_Y, y);
> +	input_report_abs(wacom->dev, ABS_PRESSURE, z);
> +	if (stylus_p) {
> +		input_report_key(wacom->dev, BTN_TOUCH, button & 1);
> +		input_report_key(wacom->dev, BTN_STYLUS, button & 2);
> +		input_report_key(wacom->dev, BTN_STYLUS2, button & 4);
> +	} else {
> +		input_report_key(wacom->dev, BTN_LEFT, button & 1);
> +		input_report_key(wacom->dev, BTN_RIGHT, button & 2);
> +		input_report_key(wacom->dev, BTN_MIDDLE, button & 4);
> +		/* handle relative wheel for non-stylus device */
> +		z = (wacom->data[6] & 0x30) >> 4;
> +		if (wacom->data[6] & 0x40)
> +			z = -z;
> +		input_report_rel(wacom->dev, REL_WHEEL, z);
> +	}
> +	input_sync(wacom->dev);
> +}
> +
> +static void wacom_clear_data_buf(struct wacom *wacom)
> +{
> +	memset(wacom->data, 0, DATA_SIZE);
> +	wacom->idx = 0;
> +}
> +
> +static irqreturn_t wacom_interrupt(struct serio *serio, unsigned char data,
> +				   unsigned int flags)
> +{
> +	struct wacom *wacom = serio_get_drvdata(serio);
> +
> +	if (data & 0x80)
> +		wacom->idx = 0;
> +
> +	/*
> +	 * We're either expecting a carriage return-terminated ASCII
> +	 * response string, or a seven-byte packet with the MSB set on
> +	 * the first byte.
> +	 *
> +	 * Note however that some tablets (the PenPartner, for
> +	 * example) don't send a carriage return at the end of a
> +	 * command.  We handle these by waiting for timeout.
> +	 */
> +	if (data == '\r' && !(wacom->data[0] & 0x80)) {
> +		handle_response(wacom);
> +		wacom_clear_data_buf(wacom);
> +		return IRQ_HANDLED;
> +	}
> +
> +	/* Leave place for 0 termination */
> +	if (wacom->idx > (DATA_SIZE - 2)) {
> +		dev_dbg(&wacom->dev->dev,
> +			"throwing away %d bytes of garbage\n", wacom->idx);
> +		wacom_clear_data_buf(wacom);
> +	}
> +	wacom->data[wacom->idx++] = data;
> +
> +	if (wacom->idx == PACKET_LENGTH && (wacom->data[0] & 0x80)) {
> +		handle_packet(wacom);
> +		wacom_clear_data_buf(wacom);
> +	}
> +	return IRQ_HANDLED;
> +}
> +
> +static void wacom_disconnect(struct serio *serio)
> +{
> +	struct wacom *wacom = serio_get_drvdata(serio);
> +
> +	serio_close(serio);
> +	serio_set_drvdata(serio, NULL);
> +	input_unregister_device(wacom->dev);
> +	kfree(wacom);
> +}
> +
> +static int wacom_send(struct serio *serio, const char *command)
> +{
> +	int err = 0;
> +
> +	for (; !err && *command; command++)
> +		err = serio_write(serio, *command);
> +
> +	return err;
> +}
> +
> +static int send_setup_string(struct wacom *wacom, struct serio *serio)
> +{
> +	const char *s;
> +
> +	switch (wacom->dev->id.version) {
> +	case MODEL_CINTIQ:	/* UNTESTED */
> +		s = COMMAND_ORIGIN_IN_UPPER_LEFT
> +			COMMAND_TRANSMIT_AT_MAX_RATE
> +			COMMAND_ENABLE_CONTINUOUS_MODE
> +			COMMAND_START_SENDING_PACKETS;
> +		break;
> +	case MODEL_PENPARTNER:
> +		s = COMMAND_ENABLE_PRESSURE_MODE
> +			COMMAND_START_SENDING_PACKETS;
> +		break;
> +	default:
> +		s = COMMAND_MULTI_MODE_INPUT
> +			COMMAND_ORIGIN_IN_UPPER_LEFT
> +			COMMAND_ENABLE_ALL_MACRO_BUTTONS
> +			COMMAND_DISABLE_GROUP_1_MACRO_BUTTONS
> +			COMMAND_TRANSMIT_AT_MAX_RATE
> +			COMMAND_DISABLE_INCREMENTAL_MODE
> +			COMMAND_ENABLE_CONTINUOUS_MODE
> +			COMMAND_Z_FILTER
> +			COMMAND_START_SENDING_PACKETS;
> +		break;
> +	}
> +	return wacom_send(serio, s);
> +}
> +
> +static int wacom_send_and_wait(struct wacom *wacom, struct serio *serio,
> +	const char *cmd, const char *desc)
> +{
> +	int err;
> +	unsigned long u;
> +
> +	wacom->expect = cmd[1];
> +	init_completion(&wacom->cmd_done);
> +	err = wacom_send(serio, cmd);
> +	if (err)
> +		return err;
> +	u = wait_for_completion_timeout(&wacom->cmd_done, HZ);
> +	if (u == 0) {
> +		/* Timeout, process what we've received. */
> +		handle_response(wacom);
> +	}
> +	wacom->expect = 0;
> +	return wacom->result;
> +}
> +
> +static int wacom_setup(struct wacom *wacom, struct serio *serio)
> +{
> +	int err;
> +
> +	/* Note that setting the link speed is the job of inputattach.
> +	 * We assume that reset negotiation has already happened,
> +	 * here. */
> +	err = wacom_send_and_wait(wacom, serio, REQUEST_MODEL_AND_ROM_VERSION,
> +				  "model and version");
> +	if (err)
> +		return err;
> +
> +	if (!(wacom->res_x && wacom->res_y)) {
> +		err = wacom_send_and_wait(wacom, serio,
> +					  REQUEST_CONFIGURATION_STRING,
> +					  "configuration string");
> +		if (err)
> +			return err;
> +	}
> +
> +	if (!(wacom->max_x && wacom->max_y)) {
> +		err = wacom_send_and_wait(wacom, serio,
> +					  REQUEST_MAX_COORDINATES,
> +					  "coordinates string");
> +		if (err)
> +			return err;
> +	}
> +
> +	return send_setup_string(wacom, serio);
> +}
> +
> +static int wacom_connect(struct serio *serio, struct serio_driver *drv)
> +{
> +	struct wacom *wacom;
> +	struct input_dev *input_dev;
> +	int err = -ENOMEM;
> +
> +	wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
> +	input_dev = input_allocate_device();
> +	if (!wacom || !input_dev)
> +		goto free_device;
> +
> +	wacom->dev = input_dev;
> +	wacom->extra_z_bits = 1;
> +	wacom->eraser_mask = 0x04;
> +	wacom->tool = wacom->idx = 0;
> +	snprintf(wacom->phys, sizeof(wacom->phys), "%s/input0", serio->phys);
> +	input_dev->phys = wacom->phys;
> +	input_dev->id.bustype = BUS_RS232;
> +	input_dev->id.vendor  = SERIO_WACOM_IV;
> +	input_dev->id.product = serio->id.extra;
> +	input_dev->dev.parent = &serio->dev;
> +
> +	input_dev->evbit[0] =
> +		BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) | BIT_MASK(EV_REL);
> +	set_bit(ABS_MISC, input_dev->absbit);
> +	set_bit(BTN_TOOL_PEN, input_dev->keybit);
> +	set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
> +	set_bit(BTN_TOOL_MOUSE, input_dev->keybit);
> +	set_bit(BTN_TOUCH, input_dev->keybit);
> +	set_bit(BTN_STYLUS, input_dev->keybit);
> +	set_bit(BTN_LEFT, input_dev->keybit);
> +	set_bit(BTN_RIGHT, input_dev->keybit);
> +	set_bit(BTN_MIDDLE, input_dev->keybit);
> +
> +	serio_set_drvdata(serio, wacom);
> +
> +	err = serio_open(serio, drv);
> +	if (err)
> +		goto free_device;
> +
> +	err = wacom_setup(wacom, serio);
> +	if (err)
> +		goto close_serio;
> +
> +	set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
> +	if (!(wacom->flags & F_COVERS_SCREEN))
> +		set_bit(INPUT_PROP_POINTER, input_dev->propbit);
> +
> +	if (wacom->flags & F_HAS_STYLUS2)
> +		set_bit(BTN_STYLUS2, input_dev->keybit);
> +
> +	if (wacom->flags & F_HAS_SCROLLWHEEL)
> +		set_bit(REL_WHEEL, input_dev->relbit);
> +
> +	input_abs_set_res(wacom->dev, ABS_X, wacom->res_x);
> +	input_abs_set_res(wacom->dev, ABS_Y, wacom->res_y);
> +	input_set_abs_params(wacom->dev, ABS_X, 0, wacom->max_x, 0, 0);
> +	input_set_abs_params(wacom->dev, ABS_Y, 0, wacom->max_y, 0, 0);
> +	input_set_abs_params(wacom->dev, ABS_PRESSURE, -1,
> +			     (1 << (7 + wacom->extra_z_bits)) - 1, 0, 0);
> +
> +	err = input_register_device(wacom->dev);
> +	if (err)
> +		goto close_serio;
> +
> +	return 0;
> +
> +close_serio:
> +	serio_close(serio);
> +free_device:
> +	serio_set_drvdata(serio, NULL);
> +	input_free_device(input_dev);
> +	kfree(wacom);
> +	return err;
> +}
> +
> +static struct serio_device_id wacom_serio_ids[] = {
> +	{
> +		.type	= SERIO_RS232,
> +		.proto	= SERIO_WACOM_IV,
> +		.id	= SERIO_ANY,
> +		.extra	= SERIO_ANY,
> +	},
> +	{ 0 }
> +};
> +
> +MODULE_DEVICE_TABLE(serio, wacom_serio_ids);
> +
> +static struct serio_driver wacom_drv = {
> +	.driver		= {
> +		.name	= "wacom_serial4",
> +	},
> +	.description	= "Wacom protocol 4 serial tablet driver",
> +	.id_table	= wacom_serio_ids,
> +	.interrupt	= wacom_interrupt,
> +	.connect	= wacom_connect,
> +	.disconnect	= wacom_disconnect,
> +};
> +
> +module_serio_driver(wacom_drv);
> diff --git a/include/uapi/linux/serio.h b/include/uapi/linux/serio.h
> index 9f53fa7..becdd78 100644
> --- a/include/uapi/linux/serio.h
> +++ b/include/uapi/linux/serio.h
> @@ -76,5 +76,6 @@
>  #define SERIO_HAMPSHIRE	0x3b
>  #define SERIO_PS2MULT	0x3c
>  #define SERIO_TSC40	0x3d
> +#define SERIO_WACOM_IV	0x3e
>  
>  #endif /* _UAPI_SERIO_H */
> -- 
> 2.0.1
> 

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] input: Add support for Wacom protocol 4 serial tablets
From: Dmitry Torokhov @ 2014-07-19 23:09 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Julian Squires, linux-input
In-Reply-To: <1405787920-3354-1-git-send-email-hdegoede@redhat.com>

On Sat, Jul 19, 2014 at 06:38:39PM +0200, Hans de Goede wrote:
> Hi All,
> 
> Recent version of xf86-input-wacom no longer support directly accessing
> serial tablets. Instead xf86-input-wacom now expects all wacom tablets to
> be driven by the kernel and to show up as evdev devices.
> 
> This has caused old serial Wacom tablets to stop working for people who still
> have such tablets. Julian Squires has written a serio input driver to fix this:
> https://github.com/tokenrove/wacom-serial-iv
> 
> About a year ago Julian submitted this upstream, back then the response by
> Dmitry was:
> 
> > The driver looks quite reasonable, however that would be the 4th Wacom
> > driver in the tree... I wonder if it is time to split out transport
> > parts from core wacom functionality so that it can be shared by USB, I2C
> > and serio devices.
> 
> I've taken a quick look at this, the i2c driver is for touchscreens and in
> the protocol has nothing in common with the other wacom drivers. The w8001
> driver is for serial touchscreens and again a completely different protocol.
> 
> The wacom usb driver already deals with what appears to be a lot of different
> protocol nuances, see for example wacom_wac.c, and non of all the different
> package formats parsed in wacom_wac.c seem to have anything in common with
> the wacom protocol 4 spoken over serial. So it seems that there is nothing
> to be shared since these are really significant different devices which happen
> to be from the same vendor. Moreover the usb wacom bits are being reworked
> to use hid instead of to more or less parse usb hid reports themselves, and
> I certainly don't want this driver to get in the way of that.
> 
> So all in all I believe it is best to keep this as a standalone driver.
> 
> Hence I'm hereby re-submitting this driver for upstream inclusion.
> 
> This is a significantly cleaned up version of the driver initially submitted
> by Julian, with improved Graphire support (I own an old Graphire myself).

OK, fair enough, let's merge it. I sent out some questions in reply to
the patch itself.

Thanks.

-- 
Dmitry

^ permalink raw reply

* [PATCH] Input: fix defuzzing logic
From: Dmitry Torokhov @ 2014-07-19 23:49 UTC (permalink / raw)
  To: linux-input
  Cc: Benson Leung, David Herrmann, Andrew de los Reyes, Henrik Rydberg,
	linux-kernel

We attempt to remove noise from coordinates reported by devices in
input_handle_abs_event(), unfortunately, unless we were dropping the
event altogether, we were ignoring the adjusted value and were passing
on the original value instead.

Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/input.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index 1c4c0db..29ca0bb 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev,
 }
 
 static int input_get_disposition(struct input_dev *dev,
-			  unsigned int type, unsigned int code, int value)
+			  unsigned int type, unsigned int code, int *pval)
 {
 	int disposition = INPUT_IGNORE_EVENT;
+	int value = *pval;
 
 	switch (type) {
 
@@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev,
 		break;
 	}
 
+	*pval = value;
 	return disposition;
 }
 
@@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev,
 {
 	int disposition;
 
-	disposition = input_get_disposition(dev, type, code, value);
+	disposition = input_get_disposition(dev, type, code, &value);
 
 	if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
 		dev->event(dev, type, code, value);

-- 
Dmitry

^ permalink raw reply related

* [Problem] Samsung 700T1C Elan USB Touchpad not detected as touchpad
From: Daniel Heckenberg @ 2014-07-20  7:14 UTC (permalink / raw)
  To: linux-input

Hello,

I'm experiencing the following issue which I'd like to help resolve.
Please let me know if there's any other information or action that I
can provide.

I'll send additional information in subsequent mails to avoid the
majordomo length block.

Many thanks,
Daniel

[1] Summary:
Samsung 700T1C Elan USB Touchpad not detected as touchpad

[2] Full description:
The Elan USB Touchpad (part of a USB keyboard / touchpad combo device)
used in the keboard dock for the Samsung 700T1C Ativ Tab Pro hybrid
laptop / tablet is not identified as a touchpad, but instead functions
only as a mouse.

This is clearly evident in X, where the input class driver matching
process fails to assign the "synaptics" driver as the
"matchIsTouchpad" predicate fails.  Even if the "synaptics" driver is
directly assigned to the input device (/dev/input/event13 in this
case) with Option "protocol" "event", the synaptics driver fails to
communicate with the touchpad (see Xorg.0.log excerpt below).

[3] Keywords:

[4] Kernel version:
Linux version 3.16.0-031600rc5-generic (apw@gomeisa) (gcc version
4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #201407131735 SMP Sun Jul 13
21:36:15 UTC 2014

[5] Oops

[6] Repro
Boot.  Start X.

[7] Environment
Description:    Ubuntu 14.04 LTS
Release:    14.04

[7.1] sh ver_linux
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

Linux carbon-u 3.16.0-031600rc5-generic #201407131735 SMP Sun Jul 13
21:36:15 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Gnu C                  4.8
Gnu make               3.81
binutils               2.24
util-linux             2.20.1
mount                  support
module-init-tools      15
e2fsprogs              1.42.9
pcmciautils            018
PPP                    2.4.5
Linux C Library        2.19
Dynamic linker (ldd)   2.19
Procps                 3.3.9
Net-tools              1.60
Kbd                    1.15.5
Sh-utils               8.21
wireless-tools         30
Modules Loaded         ctr ccm uas usb_storage wacom
snd_hda_codec_hdmi rfcomm bnep snd_hda_codec_realtek
snd_hda_codec_generic uvcvideo videobuf2_vmalloc videobuf2_memops
videobuf2_core v4l2_common videodev media btusb bluetooth 6lowpan_iphc
joydev hid_sensor_magn_3d hid_sensor_gyro_3d hid_sensor_incl_3d
hid_sensor_rotation hid_sensor_accel_3d hid_multitouch
hid_sensor_trigger industrialio_triggered_buffer kfifo_buf
industrialio hid_sensor_iio_common hid_generic hid_sensor_hub usbhid
hid snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm
snd_seq_midi snd_seq_midi_event intel_rapl x86_pkg_temp_thermal
intel_powerclamp snd_rawmidi coretemp kvm_intel kvm binfmt_misc
crct10dif_pclmul crc32_pclmul ghash_clmulni_intel arc4 aesni_intel
aes_x86_64 lrw gf128mul glue_helper ablk_helper iwldvm cryptd
microcode snd_seq mac80211 serio_raw snd_seq_device nls_iso8859_1
snd_timer iwlwifi i915 cfg80211 drm_kms_helper wmi mac_hid video
tpm_infineon drm snd i2c_algo_bit soundcore mei_me lpc_ich mei
parport_pc ppdev lp parport ahci libahci

[7.2] cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 58
model name    : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping    : 9
microcode    : 0x19
cpu MHz        : 2498.132
cache size    : 3072 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 2
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat
epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
fsgsbase smep erms
bogomips    : 3591.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 58
model name    : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping    : 9
microcode    : 0x19
cpu MHz        : 2442.585
cache size    : 3072 KB
physical id    : 0
siblings    : 4
core id        : 1
cpu cores    : 2
apicid        : 2
initial apicid    : 2
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat
epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
fsgsbase smep erms
bogomips    : 3591.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 58
model name    : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping    : 9
microcode    : 0x19
cpu MHz        : 2012.484
cache size    : 3072 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 2
apicid        : 1
initial apicid    : 1
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat
epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
fsgsbase smep erms
bogomips    : 3591.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 58
model name    : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping    : 9
microcode    : 0x19
cpu MHz        : 2454.468
cache size    : 3072 KB
physical id    : 0
siblings    : 4
core id        : 1
cpu cores    : 2
apicid        : 3
initial apicid    : 3
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat
epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
fsgsbase smep erms
bogomips    : 3591.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

[7.3] cat /proc/modules
ctr 13193 3 - Live 0x0000000000000000
ccm 17856 3 - Live 0x0000000000000000
uas 27672 0 - Live 0x0000000000000000
usb_storage 67010 2 uas, Live 0x0000000000000000
wacom 68276 0 - Live 0x0000000000000000
snd_hda_codec_hdmi 48243 1 - Live 0x0000000000000000
rfcomm 75114 8 - Live 0x0000000000000000
bnep 19884 2 - Live 0x0000000000000000
snd_hda_codec_realtek 73695 1 - Live 0x0000000000000000
snd_hda_codec_generic 70087 1 snd_hda_codec_realtek, Live 0x0000000000000000
uvcvideo 86628 0 - Live 0x0000000000000000
videobuf2_vmalloc 13216 1 uvcvideo, Live 0x0000000000000000
videobuf2_memops 13362 1 videobuf2_vmalloc, Live 0x0000000000000000
videobuf2_core 59635 1 uvcvideo, Live 0x0000000000000000
v4l2_common 15715 1 videobuf2_core, Live 0x0000000000000000
videodev 154834 3 uvcvideo,videobuf2_core,v4l2_common, Live 0x0000000000000000
media 22008 2 uvcvideo,videodev, Live 0x0000000000000000
btusb 32605 0 - Live 0x0000000000000000
bluetooth 467228 22 rfcomm,bnep,btusb, Live 0x0000000000000000
6lowpan_iphc 18968 1 bluetooth, Live 0x0000000000000000
joydev 17587 0 - Live 0x0000000000000000
hid_sensor_magn_3d 13324 0 - Live 0x0000000000000000
hid_sensor_gyro_3d 13324 0 - Live 0x0000000000000000
hid_sensor_incl_3d 13324 0 - Live 0x0000000000000000
hid_sensor_rotation 13444 0 - Live 0x0000000000000000
hid_sensor_accel_3d 13338 0 - Live 0x0000000000000000
hid_multitouch 17657 0 - Live 0x0000000000000000
hid_sensor_trigger 13134 5
hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_rotation,hid_sensor_accel_3d,
Live 0x0000000000000000
industrialio_triggered_buffer 12882 5
hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_rotation,hid_sensor_accel_3d,
Live 0x0000000000000000
kfifo_buf 13432 1 industrialio_triggered_buffer, Live 0x0000000000000000
industrialio 55460 8
hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_rotation,hid_sensor_accel_3d,hid_sensor_trigger,industrialio_triggered_buffer,kfifo_buf,
Live 0x0000000000000000
hid_sensor_iio_common 14407 5
hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_rotation,hid_sensor_accel_3d,
Live 0x0000000000000000
hid_generic 12559 0 - Live 0x0000000000000000
hid_sensor_hub 19877 7
hid_sensor_magn_3d,hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_rotation,hid_sensor_accel_3d,hid_sensor_trigger,hid_sensor_iio_common,
Live 0x0000000000000000
usbhid 53122 0 - Live 0x0000000000000000
hid 110572 4 hid_multitouch,hid_generic,hid_sensor_hub,usbhid, Live
0x0000000000000000
snd_hda_intel 30683 3 - Live 0x0000000000000000
snd_hda_controller 35518 1 snd_hda_intel, Live 0x0000000000000000
snd_hda_codec 144889 5
snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller,
Live 0x0000000000000000
snd_hwdep 17709 1 snd_hda_codec, Live 0x0000000000000000
snd_pcm 105052 4
snd_hda_codec_hdmi,snd_hda_intel,snd_hda_controller,snd_hda_codec,
Live 0x0000000000000000
snd_seq_midi 13564 0 - Live 0x0000000000000000
snd_seq_midi_event 14899 1 snd_seq_midi, Live 0x0000000000000000
intel_rapl 19196 0 - Live 0x0000000000000000
x86_pkg_temp_thermal 14312 0 - Live 0x0000000000000000
intel_powerclamp 19099 0 - Live 0x0000000000000000
snd_rawmidi 31197 1 snd_seq_midi, Live 0x0000000000000000
coretemp 13638 0 - Live 0x0000000000000000
kvm_intel 149086 0 - Live 0x0000000000000000
kvm 464279 1 kvm_intel, Live 0x0000000000000000
binfmt_misc 17508 1 - Live 0x0000000000000000
crct10dif_pclmul 14268 0 - Live 0x0000000000000000
crc32_pclmul 13180 0 - Live 0x0000000000000000
ghash_clmulni_intel 13230 0 - Live 0x0000000000000000
arc4 12573 2 - Live 0x0000000000000000
aesni_intel 152648 7 - Live 0x0000000000000000
aes_x86_64 17131 1 aesni_intel, Live 0x0000000000000000
lrw 13323 1 aesni_intel, Live 0x0000000000000000
gf128mul 14951 1 lrw, Live 0x0000000000000000
glue_helper 14095 1 aesni_intel, Live 0x0000000000000000
ablk_helper 13597 1 aesni_intel, Live 0x0000000000000000
iwldvm 243680 0 - Live 0x0000000000000000
cryptd 20531 3 ghash_clmulni_intel,aesni_intel,ablk_helper, Live
0x0000000000000000
microcode 24525 0 - Live 0x0000000000000000
snd_seq 63540 2 snd_seq_midi,snd_seq_midi_event, Live 0x0000000000000000
mac80211 687067 1 iwldvm, Live 0x0000000000000000
serio_raw 13483 0 - Live 0x0000000000000000
snd_seq_device 14497 3 snd_seq_midi,snd_rawmidi,snd_seq, Live 0x0000000000000000
nls_iso8859_1 12713 1 - Live 0x0000000000000000
snd_timer 30118 2 snd_pcm,snd_seq, Live 0x0000000000000000
iwlwifi 190534 1 iwldvm, Live 0x0000000000000000
i915 945853 3 - Live 0x0000000000000000
cfg80211 521225 3 iwldvm,mac80211,iwlwifi, Live 0x0000000000000000
drm_kms_helper 62042 1 i915, Live 0x0000000000000000
wmi 19379 0 - Live 0x0000000000000000
mac_hid 13275 0 - Live 0x0000000000000000
video 20521 1 i915, Live 0x0000000000000000
tpm_infineon 17169 0 - Live 0x0000000000000000
drm 316819 5 i915,drm_kms_helper, Live 0x0000000000000000
snd 84025 17 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_seq_device,snd_timer,
Live 0x0000000000000000
i2c_algo_bit 13564 1 i915, Live 0x0000000000000000
soundcore 15091 2 snd_hda_codec,snd, Live 0x0000000000000000
mei_me 19565 0 - Live 0x0000000000000000
lpc_ich 21176 0 - Live 0x0000000000000000
mei 88632 1 mei_me, Live 0x0000000000000000
parport_pc 32906 0 - Live 0x0000000000000000
ppdev 17711 0 - Live 0x0000000000000000
lp 17799 0 - Live 0x0000000000000000
parport 42481 3 parport_pc,ppdev,lp, Live 0x0000000000000000
ahci 30167 3 - Live 0x0000000000000000
libahci 32533 1 ahci, Live 0x0000000000000000

[7.4] cat /proc/ioports; cat /proc/iomem
0000-0cf7 : PCI Bus 0000:00
  0000-001f : dma1
  0020-0021 : pic1
  0040-0043 : timer0
  0050-0053 : timer1
  0060-0060 : keyboard
  0062-0062 : PNP0C09:00
    0062-0062 : EC data
  0064-0064 : keyboard
  0066-0066 : PNP0C09:00
    0066-0066 : EC cmd
  0070-0077 : rtc0
  0080-008f : dma page reg
  00a0-00a1 : pic2
  00c0-00df : dma2
  00f0-00ff : PNP0C04:00
    00f0-00ff : fpu
  0400-0403 : ACPI PM1a_EVT_BLK
  0404-0405 : ACPI PM1a_CNT_BLK
  0408-040b : ACPI PM_TMR
  0410-0415 : ACPI CPU throttle
  0420-042f : ACPI GPE0_BLK
  0430-0433 : iTCO_wdt
  0450-0450 : ACPI PM2_CNT_BLK
  0454-0457 : pnp 00:03
  0458-047f : pnp 00:01
    0460-047f : iTCO_wdt
  04d0-04d1 : pnp 00:05
  0500-057f : pnp 00:01
  0680-069f : pnp 00:01
  0a00-0a07 : pnp 00:01
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
  1000-100f : pnp 00:01
  164e-164f : pnp 00:01
  f000-f03f : 0000:00:02.0
  f040-f05f : 0000:00:1f.3
  f060-f07f : 0000:00:1f.2
    f060-f07f : ahci
  f080-f083 : 0000:00:1f.2
    f080-f083 : ahci
  f090-f097 : 0000:00:1f.2
    f090-f097 : ahci
  f0a0-f0a3 : 0000:00:1f.2
    f0a0-f0a3 : ahci
  f0b0-f0b7 : 0000:00:1f.2
    f0b0-f0b7 : ahci
  ffff-ffff : pnp 00:01
    ffff-ffff : pnp 00:01

00000000-00000fff : reserved
00001000-0009dfff : System RAM
0009e000-0009ffff : reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000c3fff : PCI Bus 0000:00
000c4000-000c7fff : PCI Bus 0000:00
000c8000-000cbfff : PCI Bus 0000:00
000cc000-000cffff : PCI Bus 0000:00
000d0000-000d3fff : PCI Bus 0000:00
000d4000-000d7fff : PCI Bus 0000:00
000d8000-000dbfff : PCI Bus 0000:00
000dc000-000dffff : PCI Bus 0000:00
000e0000-000e3fff : PCI Bus 0000:00
000e4000-000e7fff : PCI Bus 0000:00
000e8000-000ebfff : PCI Bus 0000:00
000ec000-000effff : PCI Bus 0000:00
000f0000-000fffff : PCI Bus 0000:00
  000f0000-000fffff : System ROM
00100000-1fffffff : System RAM
  01000000-01794ed8 : Kernel code
  01794ed9-01d1713f : Kernel data
  01e76000-01fb8fff : Kernel bss
20000000-201fffff : reserved
  20000000-201fffff : pnp 00:07
20200000-40003fff : System RAM
40004000-40004fff : reserved
  40004000-40004fff : pnp 00:07
40005000-d95a3fff : System RAM
d95a4000-d9a23fff : reserved
d9a24000-d9a33fff : ACPI Tables
d9a34000-da052fff : ACPI Non-volatile Storage
da053000-da667fff : reserved
da668000-da886fff : reserved
da887000-da887fff : System RAM
da888000-da8cafff : ACPI Non-volatile Storage
da8cb000-dacebfff : System RAM
dacec000-daff3fff : reserved
daff4000-daffffff : System RAM
db000000-df9fffff : reserved
  dba00000-df9fffff : Graphics Stolen Memory
dfa00000-feafffff : PCI Bus 0000:00
  dfa00000-dfa00fff : pnp 00:06
  e0000000-efffffff : 0000:00:02.0
  f7800000-f7bfffff : 0000:00:02.0
  f7c00000-f7cfffff : PCI Bus 0000:01
    f7c00000-f7c01fff : 0000:01:00.0
      f7c00000-f7c01fff : iwlwifi
  f7d00000-f7d0ffff : 0000:00:14.0
    f7d00000-f7d0ffff : xhci_hcd
  f7d10000-f7d13fff : 0000:00:1b.0
    f7d10000-f7d13fff : ICH HD audio
  f7d15000-f7d150ff : 0000:00:1f.3
  f7d16000-f7d167ff : 0000:00:1f.2
    f7d16000-f7d167ff : ahci
  f7d17000-f7d173ff : 0000:00:1d.0
    f7d17000-f7d173ff : ehci_hcd
  f7d18000-f7d183ff : 0000:00:1a.0
    f7d18000-f7d183ff : ehci_hcd
  f7d1a000-f7d1a00f : 0000:00:16.0
    f7d1a000-f7d1a00f : mei_me
  f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
    f8000000-fbffffff : reserved
      f8000000-fbffffff : pnp 00:06
fec00000-fec00fff : reserved
  fec00000-fec003ff : IOAPIC 0
fed00000-fed03fff : reserved
  fed00000-fed003ff : HPET 0
    fed00000-fed003ff : PNP0103:00
fed10000-fed17fff : pnp 00:06
fed18000-fed18fff : pnp 00:06
fed19000-fed19fff : pnp 00:06
fed1c000-fed1ffff : reserved
  fed1c000-fed1ffff : pnp 00:06
    fed1f410-fed1f414 : iTCO_wdt
fed20000-fed3ffff : pnp 00:06
fed40000-fed44fff : pnp 00:00
fed45000-fed8ffff : pnp 00:06
fed90000-fed90fff : dmar0
fed91000-fed91fff : dmar1
fee00000-fee00fff : Local APIC
  fee00000-fee00fff : reserved
ff000000-ffffffff : reserved
  ff000000-ffffffff : INT0800:00
    ff000000-ffffffff : pnp 00:06
100000000-11f5fffff : System RAM
11f600000-11fffffff : RAM buffer

[7.5] sudo lscpi -vvv
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM
Controller (rev 09)
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort+ >SERR- <PERR- INTx-
    Latency: 0
    Capabilities: [e0] Vendor Specific Information: Len=0c <?>
    Kernel driver in use: ivb_uncore

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core
processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 46
    Region 0: Memory at f7800000 (64-bit, non-prefetchable) [size=4M]
    Region 2: Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Region 4: I/O ports at f000 [size=64]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Address: fee00018  Data: 0000
    Capabilities: [d0] Power Management version 2
        Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [a4] PCI Advanced Features
        AFCap: TP+ FLR+
        AFCtrl: FLR-
        AFStatus: TP-
    Kernel driver in use: i915

00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset
Family USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI])
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 42
    Region 0: Memory at f7d00000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [70] Power Management version 2
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0-,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
        Address: 00000000fee00298  Data: 0000
    Kernel driver in use: xhci_hcd

00:16.0 Communication controller: Intel Corporation 7 Series/C210
Series Chipset Family MEI Controller #1 (rev 04)
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 44
    Region 0: Memory at f7d1a000 (64-bit, non-prefetchable) [size=16]
    Capabilities: [50] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Address: 00000000fee002f8  Data: 0000
    Kernel driver in use: mei_me

00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset
Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 16
    Region 0: Memory at f7d18000 (32-bit, non-prefetchable) [size=1K]
    Capabilities: [50] Power Management version 2
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [58] Debug port: BAR=1 offset=00a0
    Capabilities: [98] PCI Advanced Features
        AFCap: TP+ FLR+
        AFCtrl: FLR-
        AFStatus: TP-
    Kernel driver in use: ehci-pci

00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset
Family High Definition Audio Controller (rev 04)
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 57
    Region 0: Memory at f7d10000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [50] Power Management version 2
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Address: 00000000fee00358  Data: 0000
    Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
        DevCap:    MaxPayload 128 bytes, PhantFunc 0
            ExtTag- RBE-
        DevCtl:    Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
    Capabilities: [100 v1] Virtual Channel
        Caps:    LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:    ArbSelect=Fixed
        Status:    InProgress-
        VC0:    Caps:    PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:    Enable+ ID=0 ArbSelect=Fixed TC/VC=01
            Status:    NegoPending- InProgress-
        VC1:    Caps:    PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:    Enable+ ID=1 ArbSelect=Fixed TC/VC=22
            Status:    NegoPending- InProgress-
    Capabilities: [130 v1] Root Complex Link
        Desc:    PortNumber=0f ComponentID=00 EltType=Config
        Link0:    Desc:    TargetPort=00 TargetComponent=00 AssocRCRB-
LinkType=MemMapped LinkValid+
            Addr:    00000000fed1c000
    Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset
Family PCI Express Root Port 1 (rev c4) (prog-if 00 [Normal decode])
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    I/O behind bridge: 0000f000-00000fff
    Memory behind bridge: f7c00000-f7cfffff
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort+ <SERR- <PERR-
    BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
        DevCap:    MaxPayload 128 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl:    Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
        LnkCap:    Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Exit
Latency L0s <512ns, L1 <16us
            ClockPM- Surprise- LLActRep+ BwNot-
        LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta:    Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
DLActive+ BWMgmt+ ABWMgmt-
        SltCap:    AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #0, PowerLimit 10.000W; Interlock- NoCompl+
        SltCtl:    Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt-
HPIrq- LinkChg-
            Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
        SltSta:    Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
            Changed: MRL- PresDet- LinkState-
        RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
        RootCap: CRSVisible-
        RootSta: PME ReqID 0000, PMEStatus- PMEPending-
        DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF
Not Supported ARIFwd-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-,
OBFF Disabled ARIFwd-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB,
EqualizationComplete-, EqualizationPhase1-
             EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
    Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
        Address: 00000000  Data: 0000
    Capabilities: [90] Subsystem: Samsung Electronics Co Ltd Device c0e1
    Capabilities: [a0] Power Management version 2
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset
Family USB Enhanced Host Controller #1 (rev 04) (prog-if 20 [EHCI])
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 23
    Region 0: Memory at f7d17000 (32-bit, non-prefetchable) [size=1K]
    Capabilities: [50] Power Management version 2
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [58] Debug port: BAR=1 offset=00a0
    Capabilities: [98] PCI Advanced Features
        AFCap: TP+ FLR+
        AFCtrl: FLR-
        AFStatus: TP-
    Kernel driver in use: ehci-pci

00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC
Controller (rev 04)
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Capabilities: [e0] Vendor Specific Information: Len=0c <?>
    Kernel driver in use: lpc_ich

00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family
6-port SATA Controller [AHCI mode] (rev 04) (prog-if 01 [AHCI 1.0])
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin B routed to IRQ 43
    Region 0: I/O ports at f0b0 [size=8]
    Region 1: I/O ports at f0a0 [size=4]
    Region 2: I/O ports at f090 [size=8]
    Region 3: I/O ports at f080 [size=4]
    Region 4: I/O ports at f060 [size=32]
    Region 5: Memory at f7d16000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Address: fee002d8  Data: 0000
    Capabilities: [70] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot+,D3cold-)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
    Capabilities: [b0] PCI Advanced Features
        AFCap: TP+ FLR+
        AFCtrl: FLR-
        AFStatus: TP-
    Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family
SMBus Controller (rev 04)
    Subsystem: Samsung Electronics Co Ltd Device c0e1
    Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Interrupt: pin C routed to IRQ 255
    Region 0: Memory at f7d15000 (64-bit, non-prefetchable) [size=256]
    Region 4: I/O ports at f040 [size=32]

01:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)
    Subsystem: Intel Corporation Centrino Advanced-N 6235 AGN
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 45
    Region 0: Memory at f7c00000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: [c8] Power Management version 3
        Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Address: 00000000fee00318  Data: 0000
    Capabilities: [e0] Express (v1) Endpoint, MSI 00
        DevCap:    MaxPayload 128 bytes, PhantFunc 0, Latency L0s
<512ns, L1 unlimited
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
        DevCtl:    Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
        LnkCap:    Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit
Latency L0s <4us, L1 <32us
            ClockPM+ Surprise- LLActRep- BwNot-
        LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta:    Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt:    DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
        CEMsk:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
        AERCap:    First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
    Capabilities: [140 v1] Device Serial Number c8-f7-33-ff-ff-f5-6f-4f
    Kernel driver in use: iwlwifi

[7.6] cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: SAMSUNG MZMTD128 Rev: 1K0Q
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi6 Channel: 00 Id: 00 Lun: 00
  Vendor: Generic  Model: STORAGE DEVICE   Rev: 0208
  Type:   Direct-Access                    ANSI  SCSI revision: 00

[7.7] ls /proc
1     145   1711  1891  2110  2317  2626  373  535  723  958
iomem         schedstat
10    146   1735  1896  2118  2324  27    38   54   724  991
ioports       scsi
1001  147   18    1897  2124  2325  28    39   541  725  997
irq           self
1003  148   1802  19    2127  2333  2806  390  542  766  acpi
kallsyms      slabinfo
1012  149   1807  1977  2131  2362  2820  40   543  767  asound
kcore         softirqs
1054  15    1815  1979  2134  2370  2842  41   550  768  buddyinfo
key-users     stat
11    150   1823  1981  2145  2371  2853  410  587  771  bus
kmsg          swaps
1101  151   1831  1983  2166  24    286   42   593  795  cgroups
kpagecount    sys
1104  152   1834  1988  2174  2419  289   429  594  8    cmdline
kpageflags    sysrq-trigger
1106  1522  1836  1993  2214  2431  29    43   609  825  consoles
loadavg       sysvipc
1117  153   1838  1996  2217  2442  290   44   619  843  cpuinfo
locks         timer_list
1120  154   1840  1997  2233  2453  3     45   646  89   crypto
mdstat        timer_stats
1145  1547  1845  2     2240  25    30    455  652  895  devices
meminfo       tty
1194  155   1847  20    2249  2548  31    46   654  898  diskstats
misc          uptime
12    1550  1855  2019  2251  2566  311   47   66   9    dma
modules       version
1222  156   1866  2025  2259  2568  322   48   67   90   driver
mounts        vmallocinfo
1285  157   1869  2034  2263  2580  33    5    68   92   execdomains
mtrr          vmstat
13    16    1876  2039  2292  2599  34    50   69   944  fb
net           zoneinfo
14    169   1878  21    23    26    35    515  7    948  filesystems
pagetypeinfo
143   17    1883  2102  2304  2612  36    52   721  954  fs           partitions
144   170   1886  2104  2306  2614  37    53   722  955  interrupts
sched_debug


[X.] Other

Ubuntu Launchpad bug report #134935
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1343935

^ permalink raw reply

* Re: [Problem] Samsung 700T1C Elan USB Touchpad not detected as touchpad
From: Daniel Heckenberg @ 2014-07-20  7:35 UTC (permalink / raw)
  To: linux-input
In-Reply-To: <CA+uZGHrv5BWjNOe5HZHg_i_8_-bnsLVMHd9w0ovwDkHO=RYZBA@mail.gmail.com>

[X.] Other
lsusb -v

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x8087 Intel Corp.
  idProduct          0x0024 Integrated Rate Matching Hub
  bcdDevice            0.00
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             6
  wHubCharacteristic 0x0009
    Per-port power switching
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0100 power
   Port 5: 0000.0100 power
   Port 6: 0000.0100 power
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            3.16
  iManufacturer           3
  iProduct                2
  iSerial                 1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12

Bus 001 Device 006: ID 2232:1036
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x2232
  idProduct          0x1036
  bcdDevice            0.13
  iManufacturer           3 Generic
  iProduct                1 WebCam SC-20HDM12347N
  iSerial                 2 200901010001
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength         1235
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 USB Camera
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0
      iFunction               5 WebCam SC-20HDM12347N
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0
      iInterface              5 WebCam SC-20HDM12347N
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           78
        dwClockFrequency       15.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x00000006
          Auto-Exposure Mode
          Auto-Exposure Priority
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier          0
        bControlSize            2
        bmControls     0x0000053f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          Backlight Compensation
          Power Line Frequency
        iProcessing             0
        bmVideoStandards     0x 9
          None
          SECAM - 625/50
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               4
        iTerminal               0
      VideoControl Interface Descriptor:
        bLength                27
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {8ca72912-b447-9440-b0ce-db07386fb938}
        bNumControl             2
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            2
        bmControls( 0)       0x00
        bmControls( 1)       0x06
        iExtension              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               6
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      VideoStreaming Interface Descriptor:
        bLength                            16
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         3
        wTotalLength                      998
        bEndPointAddress                  129
        bmInfo                              0
        bTerminalLink                       3
        bStillCaptureMethod                 2
        bTriggerSupport                     1
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                    27
        bmaControls( 1)                    27
        bmaControls( 2)                    27
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                8
        guidFormat
{59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 73728000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                  4608000
        dwMaxBitRate                  9216000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            176
        wHeight                           144
        dwMinBitRate                  6082560
        dwMaxBitRate                 12165120
        dwMaxVideoFrameBufferSize       50688
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 18432000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                 24330240
        dwMaxBitRate                 48660480
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            800
        wHeight                           600
        dwMinBitRate                 38400000
        dwMaxBitRate                 76800000
        dwMaxVideoFrameBufferSize      960000
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  2
        dwFrameInterval( 0)           1000000
        dwFrameInterval( 1)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         7
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                147456000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         8
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1600
        wHeight                          1200
        dwMinBitRate                153600000
        dwMaxBitRate                153600000
        dwMaxVideoFrameBufferSize     3840000
        dwDefaultFrameInterval        2000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            22
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               4
        wWidth( 0)                        640
        wHeight( 0)                       480
        wWidth( 1)                        160
        wHeight( 1)                       120
        wWidth( 2)                        320
        wHeight( 2)                       240
        wWidth( 3)                       1280
        wHeight( 3)                       800
        bNumCompressionPatterns             4
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  6 (FORMAT_MJPEG)
        bFormatIndex                        2
        bNumFrameDescriptors                8
        bFlags                              1
          Fixed-size samples: Yes
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 73728000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                  4608000
        dwMaxBitRate                  9216000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            176
        wHeight                           144
        dwMinBitRate                  6082560
        dwMaxBitRate                 12165120
        dwMaxVideoFrameBufferSize       50688
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 18432000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                 24330240
        dwMaxBitRate                 48660480
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            800
        wHeight                           600
        dwMinBitRate                115200000
        dwMaxBitRate                230400000
        dwMaxVideoFrameBufferSize      960000
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         7
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                221184000
        dwMaxBitRate                442368000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         8
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1600
        wHeight                          1200
        dwMinBitRate                307200000
        dwMaxBitRate                307200000
        dwMaxVideoFrameBufferSize     3840000
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
      VideoStreaming Interface Descriptor:
        bLength                            22
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               4
        wWidth( 0)                        640
        wHeight( 0)                       480
        wWidth( 1)                        160
        wHeight( 1)                       120
        wWidth( 2)                        320
        wHeight( 2)                       240
        wWidth( 3)                       1280
        wHeight( 3)                       800
        bNumCompressionPatterns             4
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
      VideoStreaming Interface Descriptor:
        bLength                            56
        bDescriptorType                    36
        bDescriptorSubtype                 14         Invalid desc
subtype: 03 08 4d 34 32 30 00 00 10 00 80 00 00 aa 00 38 9b 71 32 56
55 59 00 00 10 00 80 00 00 aa 00 38 9b 71 33 56 55 59 00 00 10 00 80
00 00 aa 00 38 9b 71 00 01 00
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 01 00 80 02 e0 01 00 00 65 04 00 00 ca 08 00 60 09 00 15 16
05 00 02 15 16 05 00 2a 2c 0a 00
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 02 00 a0 00 78 00 00 50 46 00 00 a0 8c 00 00 96 00 00 15 16
05 00 02 15 16 05 00 2a 2c 0a 00
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 03 00 b0 00 90 00 00 d0 5c 00 00 a0 b9 00 00 c6 00 00 15 16
05 00 02 15 16 05 00 2a 2c 0a 00
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 04 00 40 01 f0 00 00 40 19 01 00 80 32 02 00 58 02 00 15 16
05 00 02 15 16 05 00 2a 2c 0a 00
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 05 00 60 01 20 01 00 40 73 01 00 80 e6 02 00 18 03 00 15 16
05 00 02 15 16 05 00 2a 2c 0a 00
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 06 00 20 03 58 02 00 f0 49 02 00 d0 dd 06 00 a6 0e 00 2a 2c
0a 00 03 2a 2c 0a 00 40 42 0f 00 80 84 1e 00
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 07 00 00 05 d0 02 00 00 65 04 00 00 ab 09 00 20 1c 00 22 df
0d 00 02 22 df 0d 00 80 84 1e 00
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                 15         Invalid desc
subtype: 08 00 40 06 b0 04 00 c0 27 09 00 c0 27 09 00 98 3a 00 80 84
1e 00 01 80 84 1e 00
      VideoStreaming Interface Descriptor:
        bLength                            22
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               4
        wWidth( 0)                        640
        wHeight( 0)                       480
        wWidth( 1)                        160
        wHeight( 1)                       120
        wWidth( 2)                        320
        wHeight( 2)                       240
        wWidth( 3)                       1280
        wHeight( 3)                       800
        bNumCompressionPatterns             4
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0080  1x 128 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0b00  2x 768 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0c00  2x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1380  3x 896 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       7
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 007: ID 04f3:0740 Elan Microelectronics Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x04f3 Elan Microelectronics Corp.
  idProduct          0x0740
  bcdDevice            1.78
  iManufacturer           0
  iProduct                1
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    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      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      54
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     248
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10

Bus 001 Device 005: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0x2514 USB 2.0 Hub
  bcdDevice            b.b3
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      1 Single TT
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 TT per port
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12

Bus 001 Device 004: ID 2232:1034
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x2232
  idProduct          0x1034
  bcdDevice            0.33
  iManufacturer           1 Namuga Co
  iProduct                2 WebCam SC-50AFL11C54N
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          926
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0
      iFunction               2 WebCam SC-50AFL11C54N
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0
      iInterface              2 WebCam SC-50AFL11C54N
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           80
        dwClockFrequency       48.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x0002002e
          Auto-Exposure Mode
          Auto-Exposure Priority
          Exposure Time (Absolute)
          Focus (Absolute)
          Focus, Auto
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier      16384
        bControlSize            2
        bmControls     0x0000157f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0
        bmVideoStandards     0x1d
          None
          PAL - 625/50
          SECAM - 625/50
          NTSC - 625/50
      VideoControl Interface Descriptor:
        bLength                29
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {991d5a7d-325b-8b42-8cad-671b8a65f37a}
        bNumControl             0
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            4
        bmControls( 0)       0x3f
        bmControls( 1)       0x07
        bmControls( 2)       0x67
        bmControls( 3)       0x00
        iExtension              0
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               4
        iTerminal               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      VideoStreaming Interface Descriptor:
        bLength                            15
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         2
        wTotalLength                      623
        bEndPointAddress                  129
        bmInfo                              0
        bTerminalLink                       3
        bStillCaptureMethod                 1
        bTriggerSupport                     1
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                    27
        bmaControls( 1)                    27
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                8
        guidFormat
{59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                147456000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                  9216000
        dwMaxBitRate                  9216000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            176
        wHeight                           144
        dwMinBitRate                 12165120
        dwMaxBitRate                 12165120
        dwMaxVideoFrameBufferSize       50688
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                  6144000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                  8110080
        dwMaxBitRate                 48660480
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                   912384
        dwMaxBitRate                   912384
        dwMaxVideoFrameBufferSize     3932160
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         7
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1600
        wHeight                          1200
        dwMinBitRate                153600000
        dwMaxBitRate                153600000
        dwMaxVideoFrameBufferSize     3840000
        dwDefaultFrameInterval        5000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           5000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         8
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2048
        wHeight                          1536
        dwMinBitRate                161243136
        dwMaxBitRate                161243136
        dwMaxVideoFrameBufferSize    10077696
        dwDefaultFrameInterval        5000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           5000000
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  6 (FORMAT_MJPEG)
        bFormatIndex                        2
        bNumFrameDescriptors                9
        bFlags                              1
          Fixed-size samples: Yes
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 73728000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  3
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            500000
        dwFrameInterval( 2)            666666
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                  2027520
        dwMaxBitRate                 12165120
        dwMaxVideoFrameBufferSize       50688
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  3
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            500000
        dwFrameInterval( 2)            666666
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            176
        wHeight                           144
        dwMinBitRate                  1536000
        dwMaxBitRate                  9216000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  3
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            500000
        dwFrameInterval( 2)            666666
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                  6144000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  3
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            500000
        dwFrameInterval( 2)            666666
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                  8110080
        dwMaxBitRate                 48660480
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  3
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            500000
        dwFrameInterval( 2)            666666
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                 81920000
        dwMaxBitRate                491520000
        dwMaxVideoFrameBufferSize     2048000
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  3
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            500000
        dwFrameInterval( 2)            666666
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         7
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1600
        wHeight                          1200
        dwMinBitRate                153600000
        dwMaxBitRate                307200000
        dwMaxVideoFrameBufferSize     3840000
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         8
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2048
        wHeight                          1536
        dwMinBitRate                 73728000
        dwMaxBitRate                 73728000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         9
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2592
        wHeight                          1944
        dwMinBitRate                 73728000
        dwMaxBitRate                 73728000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x00c0  1x 192 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0180  1x 384 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0280  1x 640 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0320  1x 800 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x03b0  1x 944 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       7
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0a80  2x 640 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       8
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0b20  2x 800 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       9
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0be0  2x 992 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting      10
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1380  3x 896 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting      11
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x13fc  3x 1020 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 003: ID 8087:07da Intel Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x8087 Intel Corp.
  idProduct          0x07da
  bcdDevice           78.69
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          177
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x8087 Intel Corp.
  idProduct          0x0024 Integrated Rate Matching Hub
  bcdDevice            0.00
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             6
  wHubCharacteristic 0x0009
    Per-port power switching
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0503 highspeed power enable connect
   Port 3: 0000.0503 highspeed power enable connect
   Port 4: 0000.0503 highspeed power enable connect
   Port 5: 0000.0100 power
   Port 6: 0000.0100 power
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            3.16
  iManufacturer           3
  iProduct                2
  iSerial                 1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         3
  bMaxPacketSize0         9
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0003 3.0 root hub
  bcdDevice            3.16
  iManufacturer           3
  iProduct                2
  iSerial                 1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           31
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
        bMaxBurst               0

Bus 003 Device 004: ID 03eb:8411 Atmel Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x03eb Atmel Corp.
  idProduct          0x8411
  bcdDevice           12.32
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           66
    bNumInterfaces          2
    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              2
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     639
         Report Descriptors:
           ** UNAVAILABLE **
      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               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              3
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      39
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

Bus 003 Device 006: ID 05e3:0727 Genesys Logic, Inc. microSD Reader/Writer
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0727 microSD Reader/Writer
  bcdDevice            2.08
  iManufacturer           3
  iProduct                4
  iSerial                 2
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0

Bus 003 Device 005: ID 056a:00ec Wacom Co., Ltd
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x056a Wacom Co., Ltd
  idProduct          0x00ec
  bcdDevice           10.49
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     239
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               7

Bus 003 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0x2514 USB 2.0 Hub
  bcdDevice            b.b3
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      1 Single TT
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 TT per port
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12

Bus 003 Device 002: ID 0483:91d1 STMicroelectronics
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0483 STMicroelectronics
  idProduct          0x91d1
  bcdDevice            0.28
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self 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.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength    2837
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            3.16
  iManufacturer           3
  iProduct                2
  iSerial                 1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12

^ permalink raw reply

* Re: [Problem] Samsung 700T1C Elan USB Touchpad not detected as touchpad
From: Daniel Heckenberg @ 2014-07-20  7:37 UTC (permalink / raw)
  To: linux-input
In-Reply-To: <CA+uZGHo-D=6pE9scYE=-u9ksWk91hjj1gr3ztUqNB6Xs=nQ+dw@mail.gmail.com>

And some info from X:

xinput -list
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 EC Pen stylus                   id=9    [slave  pointer  (2)]
⎜   ↳ Atmel Atmel maXTouch Digitizer              id=10    [slave  pointer  (2)]
⎜   ↳ USB Keyboard+SmartPad                       id=13    [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 EC Pen eraser                   id=16    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Power Button                                id=6    [slave  keyboard (3)]
    ↳ Video Bus                                   id=7    [slave  keyboard (3)]
    ↳ Power Button                                id=8    [slave  keyboard (3)]
    ↳ WebCam SC-50AFL11C54N                       id=11    [slave  keyboard (3)]
    ↳ USB Keyboard+SmartPad                       id=12    [slave  keyboard (3)]
    ↳ WebCam SC-20HDM12347N                       id=14    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=15    [slave  keyboard (3)]

xinput list-props 13
Device 'USB Keyboard+SmartPad':
    Device Enabled (135):    1
    Coordinate Transformation Matrix (137):    1.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (256):    0
    Device Accel Constant Deceleration (257):    1.000000
    Device Accel Adaptive Deceleration (258):    1.000000
    Device Accel Velocity Scaling (259):    10.000000
    Device Product ID (252):    1267, 1856
    Device Node (253):    "/dev/input/event13"
    Evdev Axis Inversion (291):    0, 0
    Evdev Axes Swap (293):    0
    Axis Labels (294):    "Rel X" (145), "Rel Y" (146), "Rel Horiz
Wheel" (312), "Rel Dial" (313), "Rel Vert Wheel" (314)
    Button Labels (295):    "Button Left" (138), "Button Middle"
(139), "Button Right" (140), "Button Wheel Up" (141), "Button Wheel
Down" (142), "Button Horiz Wheel Left" (143), "Button Horiz Wheel
Right" (144), "Button Side" (310), "Button Extra" (311), "Button
Unknown" (283), "Button Unknown" (283), "Button Unknown" (283),
"Button Unknown" (283)
    Evdev Middle Button Emulation (296):    0
    Evdev Middle Button Timeout (297):    50
    Evdev Third Button Emulation (298):    0
    Evdev Third Button Emulation Timeout (299):    1000
    Evdev Third Button Emulation Button (300):    3
    Evdev Third Button Emulation Threshold (301):    20
    Evdev Wheel Emulation (302):    0
    Evdev Wheel Emulation Axes (303):    0, 0, 4, 5
    Evdev Wheel Emulation Inertia (304):    10
    Evdev Wheel Emulation Timeout (305):    200
    Evdev Wheel Emulation Button (306):    4
    Evdev Drag Lock Buttons (307):    0

cat /var/log/Xorg.0.log
[     4.564]
X.Org X Server 1.15.1
Release Date: 2014-04-13
[     4.564] X Protocol Version 11, Revision 0
[     4.564] Build Operating System: Linux 3.2.0-37-generic x86_64 Ubuntu
[     4.564] Current Operating System: Linux carbon-u
3.16.0-031600rc5-generic #201407131735 SMP Sun Jul 13 21:36:15 UTC
2014 x86_64
[     4.564] Kernel command line:
BOOT_IMAGE=/boot/vmlinuz-3.16.0-031600rc5-generic
root=UUID=7872ed11-61d6-461f-a463-c8c0f9ba0d2a ro quiet splash
vt.handoff=7
[     4.564] Build Date: 16 April 2014  01:36:29PM
[     4.564] xorg-server 2:1.15.1-0ubuntu2 (For technical support
please see http://www.ubuntu.com/support)
[     4.564] Current version of pixman: 0.30.2
[     4.564]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[     4.564] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     4.564] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Jul 20
11:10:29 2014
[     4.565] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     4.571] (==) No Layout section.  Using the first Screen section.
[     4.571] (==) No screen section available. Using defaults.
[     4.571] (**) |-->Screen "Default Screen Section" (0)
[     4.571] (**) |   |-->Monitor "<default monitor>"
[     4.571] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[     4.571] (==) Automatically adding devices
[     4.571] (==) Automatically enabling devices
[     4.571] (==) Automatically adding GPU devices
[     4.571] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[     4.571]     Entry deleted from font path.
[     4.571] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[     4.571]     Entry deleted from font path.
[     4.571] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[     4.571]     Entry deleted from font path.
[     4.571] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[     4.571]     Entry deleted from font path.
[     4.571] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[     4.571]     Entry deleted from font path.
[     4.572] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins
[     4.572] (==) ModulePath set to
"/usr/lib/x86_64-linux-gnu/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules"
[     4.572] (II) The server relies on udev to provide the list of
input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[     4.572] (II) Loader magic: 0x7f6a76fafd60
[     4.572] (II) Module ABI versions:
[     4.572]     X.Org ANSI C Emulation: 0.4
[     4.572]     X.Org Video Driver: 15.0
[     4.572]     X.Org XInput driver : 20.0
[     4.572]     X.Org Server Extension : 8.0
[     4.572] (II) xfree86: Adding drm device (/dev/dri/card0)
[     4.573] (--) PCI:*(0:0:2:0) 8086:0166:144d:c0e1 rev 9, Mem @
0xf7800000/4194304, 0xe0000000/268435456, I/O @ 0x0000f000/64
[     4.573] Initializing built-in extension Generic Event Extension
[     4.573] Initializing built-in extension SHAPE
[     4.573] Initializing built-in extension MIT-SHM
[     4.573] Initializing built-in extension XInputExtension
[     4.573] Initializing built-in extension XTEST
[     4.573] Initializing built-in extension BIG-REQUESTS
[     4.573] Initializing built-in extension SYNC
[     4.573] Initializing built-in extension XKEYBOARD
[     4.573] Initializing built-in extension XC-MISC
[     4.573] Initializing built-in extension SECURITY
[     4.573] Initializing built-in extension XINERAMA
[     4.573] Initializing built-in extension XFIXES
[     4.573] Initializing built-in extension RENDER
[     4.573] Initializing built-in extension RANDR
[     4.573] Initializing built-in extension COMPOSITE
[     4.573] Initializing built-in extension DAMAGE
[     4.573] Initializing built-in extension MIT-SCREEN-SAVER
[     4.573] Initializing built-in extension DOUBLE-BUFFER
[     4.573] Initializing built-in extension RECORD
[     4.573] Initializing built-in extension DPMS
[     4.574] Initializing built-in extension Present
[     4.574] Initializing built-in extension DRI3
[     4.574] Initializing built-in extension X-Resource
[     4.574] Initializing built-in extension XVideo
[     4.574] Initializing built-in extension XVideo-MotionCompensation
[     4.574] Initializing built-in extension SELinux
[     4.574] Initializing built-in extension XFree86-VidModeExtension
[     4.574] Initializing built-in extension XFree86-DGA
[     4.574] Initializing built-in extension XFree86-DRI
[     4.574] Initializing built-in extension DRI2
[     4.574] (II) LoadModule: "glx"
[     4.575] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     4.585] (II) Module glx: vendor="X.Org Foundation"
[     4.585]     compiled for 1.15.1, module version = 1.0.0
[     4.585]     ABI class: X.Org Server Extension, version 8.0
[     4.585] (==) AIGLX enabled
[     4.585] Loading extension GLX
[     4.585] (==) Matched intel as autoconfigured driver 0
[     4.585] (==) Matched intel as autoconfigured driver 1
[     4.585] (==) Matched modesetting as autoconfigured driver 2
[     4.585] (==) Matched fbdev as autoconfigured driver 3
[     4.585] (==) Matched vesa as autoconfigured driver 4
[     4.585] (==) Assigned the driver to the xf86ConfigLayout
[     4.585] (II) LoadModule: "intel"
[     4.589] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[     4.591] (II) Module intel: vendor="X.Org Foundation"
[     4.591]     compiled for 1.15.0, module version = 2.99.910
[     4.592]     Module class: X.Org Video Driver
[     4.592]     ABI class: X.Org Video Driver, version 15.0
[     4.592] (II) LoadModule: "modesetting"
[     4.592] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[     4.593] (II) Module modesetting: vendor="X.Org Foundation"
[     4.593]     compiled for 1.15.0, module version = 0.8.1
[     4.593]     Module class: X.Org Video Driver
[     4.593]     ABI class: X.Org Video Driver, version 15.0
[     4.593] (II) LoadModule: "fbdev"
[     4.593] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[     4.593] (II) Module fbdev: vendor="X.Org Foundation"
[     4.593]     compiled for 1.15.0, module version = 0.4.4
[     4.593]     Module class: X.Org Video Driver
[     4.593]     ABI class: X.Org Video Driver, version 15.0
[     4.594] (II) LoadModule: "vesa"
[     4.594] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[     4.594] (II) Module vesa: vendor="X.Org Foundation"
[     4.594]     compiled for 1.15.0, module version = 2.3.3
[     4.594]     Module class: X.Org Video Driver
[     4.594]     ABI class: X.Org Video Driver, version 15.0
[     4.594] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[     4.595] (II) intel: Driver for Intel(R) HD Graphics: 2000-5000
[     4.595] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100
[     4.595] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200
[     4.595] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[     4.595] (II) FBDEV: driver for framebuffer: fbdev
[     4.595] (II) VESA: driver for VESA chipsets: vesa
[     4.595] (++) using VT number 7

[     4.596] (II) intel(0): SNA compiled: xserver-xorg-video-intel
2:2.99.910-0ubuntu1 (Timo Aaltonen <tjaalton@ubuntu.com>)
[     4.596] (WW) Falling back to old probe method for modesetting
[     4.597] (WW) Falling back to old probe method for fbdev
[     4.597] (II) Loading sub module "fbdevhw"
[     4.597] (II) LoadModule: "fbdevhw"
[     4.597] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[     4.597] (II) Module fbdevhw: vendor="X.Org Foundation"
[     4.597]     compiled for 1.15.1, module version = 0.0.2
[     4.597]     ABI class: X.Org Video Driver, version 15.0
[     4.597] (WW) Falling back to old probe method for vesa
[     4.598] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD
Graphics 4000
[     4.598] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx
[     4.598] (II) intel(0): Creating default Display subsection in
Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[     4.598] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[     4.598] (==) intel(0): RGB weight 888
[     4.598] (==) intel(0): Default visual is TrueColor
[     4.598] (**) intel(0): Framebuffer tiled
[     4.598] (**) intel(0): Pixmaps tiled
[     4.598] (**) intel(0): "Tear free" disabled
[     4.598] (**) intel(0): Forcing per-crtc-pixmaps? no
[     4.599] (II) intel(0): Output eDP1 has no monitor section
[     4.599] (--) intel(0): found backlight control interface
intel_backlight (type 'raw')
[     4.599] (II) intel(0): Output VGA1 has no monitor section
[     4.599] (II) intel(0): Output HDMI1 has no monitor section
[     4.599] (II) intel(0): Output DP1 has no monitor section
[     4.599] (II) intel(0): Output VIRTUAL1 has no monitor section
[     4.599] (--) intel(0): Output eDP1 using initial mode 1920x1080 on pipe 2
[     4.599] (==) intel(0): DPI set to (96, 96)
[     4.599] (II) Loading sub module "dri2"
[     4.599] (II) LoadModule: "dri2"
[     4.599] (II) Module "dri2" already built-in
[     4.599] (II) UnloadModule: "modesetting"
[     4.599] (II) Unloading modesetting
[     4.599] (II) UnloadModule: "fbdev"
[     4.599] (II) Unloading fbdev
[     4.599] (II) UnloadSubModule: "fbdevhw"
[     4.599] (II) Unloading fbdevhw
[     4.599] (II) UnloadModule: "vesa"
[     4.599] (II) Unloading vesa
[     4.599] (==) Depth 24 pixmap format is 32 bpp
[     4.603] (II) intel(0): SNA initialized with Ivybridge (gen7, gt2) backend
[     4.603] (==) intel(0): Backing store enabled
[     4.603] (==) intel(0): Silken mouse enabled
[     4.604] (II) intel(0): HW Cursor enabled
[     4.604] (II) intel(0): RandR 1.2 enabled, ignore the following
RandR disabled message.
[     4.604] (==) intel(0): DPMS enabled
[     4.604] (II) intel(0): [DRI2] Setup complete
[     4.604] (II) intel(0): [DRI2]   DRI driver: i965
[     4.604] (II) intel(0): [DRI2]   VDPAU driver: i965
[     4.604] (II) intel(0): direct rendering: DRI2 Enabled
[     4.604] (==) intel(0): hotplug detection: "enabled"
[     4.604] (--) RandR disabled
[     4.610] (II) SELinux: Disabled on system
[     4.622] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[     4.622] (II) AIGLX: enabled GLX_ARB_create_context
[     4.622] (II) AIGLX: enabled GLX_ARB_create_context_profile
[     4.622] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile
[     4.622] (II) AIGLX: enabled GLX_INTEL_swap_event
[     4.622] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[     4.622] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[     4.622] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[     4.622] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[     4.622] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[     4.622] (II) AIGLX: Loaded and initialized i965
[     4.622] (II) GLX: Initialized DRI2 GL provider for screen 0
[     4.625] (II) intel(0): switch to mode 1920x1080@60.0 on eDP1
using pipe 2, position (0, 0), rotation normal, reflection none
[     4.644] (II) intel(0): Setting screen physical size to 508 x 285
[     4.654] (II) XKB: reuse xkmfile
/var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm
[     4.656] (II) config/udev: Adding input device Power Button
(/dev/input/event2)
[     4.656] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[     4.656] (II) LoadModule: "evdev"
[     4.657] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[     4.657] (II) Module evdev: vendor="X.Org Foundation"
[     4.657]     compiled for 1.15.0, module version = 2.8.2
[     4.657]     Module class: X.Org XInput Driver
[     4.657]     ABI class: X.Org XInput driver, version 20.0
[     4.657] (II) Using input driver 'evdev' for 'Power Button'
[     4.657] (**) Power Button: always reports core events
[     4.657] (**) evdev: Power Button: Device: "/dev/input/event2"
[     4.658] (--) evdev: Power Button: Vendor 0 Product 0x1
[     4.658] (--) evdev: Power Button: Found keys
[     4.658] (II) evdev: Power Button: Configuring as keyboard
[     4.658] (**) Option "config_info"
"udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2"
[     4.658] (II) XINPUT: Adding extended input device "Power Button"
(type: KEYBOARD, id 6)
[     4.658] (**) Option "xkb_rules" "evdev"
[     4.658] (**) Option "xkb_model" "pc105"
[     4.658] (**) Option "xkb_layout" "us"
[     4.658] (II) config/udev: Adding input device Video Bus (/dev/input/event7)
[     4.658] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[     4.658] (II) Using input driver 'evdev' for 'Video Bus'
[     4.658] (**) Video Bus: always reports core events
[     4.658] (**) evdev: Video Bus: Device: "/dev/input/event7"
[     4.658] (--) evdev: Video Bus: Vendor 0 Product 0x6
[     4.658] (--) evdev: Video Bus: Found keys
[     4.658] (II) evdev: Video Bus: Configuring as keyboard
[     4.658] (**) Option "config_info"
"udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input8/event7"
[     4.658] (II) XINPUT: Adding extended input device "Video Bus"
(type: KEYBOARD, id 7)
[     4.658] (**) Option "xkb_rules" "evdev"
[     4.658] (**) Option "xkb_model" "pc105"
[     4.658] (**) Option "xkb_layout" "us"
[     4.658] (II) config/udev: Adding input device Power Button
(/dev/input/event1)
[     4.658] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[     4.658] (II) Using input driver 'evdev' for 'Power Button'
[     4.658] (**) Power Button: always reports core events
[     4.658] (**) evdev: Power Button: Device: "/dev/input/event1"
[     4.659] (--) evdev: Power Button: Vendor 0 Product 0x1
[     4.659] (--) evdev: Power Button: Found keys
[     4.659] (II) evdev: Power Button: Configuring as keyboard
[     4.659] (**) Option "config_info"
"udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1/event1"
[     4.659] (II) XINPUT: Adding extended input device "Power Button"
(type: KEYBOARD, id 8)
[     4.659] (**) Option "xkb_rules" "evdev"
[     4.659] (**) Option "xkb_model" "pc105"
[     4.659] (**) Option "xkb_layout" "us"
[     4.659] (II) config/udev: Adding input device Lid Switch
(/dev/input/event0)
[     4.659] (II) No input driver specified, ignoring this device.
[     4.659] (II) This device may have been added with another device file.
[     4.659] (II) config/udev: Adding drm device (/dev/dri/card0)
[     4.659] (II) config/udev: Ignoring already known drm device
(/dev/dri/card0)
[     4.659] (II) config/udev: Adding input device Wacom ISDv4 EC Pen
(/dev/input/event11)
[     4.659] (**) Wacom ISDv4 EC Pen: Applying InputClass "evdev
tablet catchall"
[     4.659] (**) Wacom ISDv4 EC Pen: Applying InputClass "Wacom class"
[     4.659] (II) LoadModule: "wacom"
[     4.660] (II) Loading /usr/lib/xorg/modules/input/wacom_drv.so
[     4.660] (II) Module wacom: vendor="X.Org Foundation"
[     4.660]     compiled for 1.15.0, module version = 0.23.0
[     4.660]     Module class: X.Org XInput Driver
[     4.660]     ABI class: X.Org XInput driver, version 20.0
[     4.660] (II) wacom: Driver for Wacom graphics tablets:
PenPartner, Graphire,
    Graphire2 4x5, Graphire2 5x7, Graphire3 4x5, Graphire3 6x8,
    Graphire4 4x5, Graphire4 6x8, BambooFun 4x5, BambooFun 6x8,
    Bamboo1 Medium, Graphire4 6x8 BlueTooth, CTL-460, CTH-461, CTL-660,
    CTL-461/S, Bamboo Touch, CTH-460/K, CTH-461/S, CTH-661/S1, CTH-461/L,
    CTH-661/L, Intuos 4x5, Intuos 6x8, Intuos 9x12, Intuos 12x12,
    Intuos 12x18, PTU600, PL400, PL500, PL600, PL600SX, PL550, PL800,
    PL700, PL510, PL710, DTI520, DTF720, DTF720a, DTF521, DTU1931,
    DTU2231, DTU1631, Intuos2 4x5, Intuos2 6x8, Intuos2 9x12,
    Intuos2 12x12, Intuos2 12x18, Intuos2 6x8 , Volito, PenStation,
    Volito2 4x5, Volito2 2x3, PenPartner2, Bamboo, Bamboo1, Bamboo1 4x6,
    Bamboo1 5x8, Intuos3 4x5, Intuos3 6x8, Intuos3 9x12, Intuos3 12x12,
    Intuos3 12x19, Intuos3 6x11, Intuos3 4x6, Intuos4 4x6, Intuos4 6x9,
    Intuos4 8x13, Intuos4 12x19, Intuos4 WL USB Endpoint,
    Intuos4 WL Bluetooth Endpoint, Intuos5 touch S, Intuos5 touch M,
    Intuos5 touch L, Intuos5 S, Intuos5 M, Intuos Pro S, Intuos Pro M,
    Intuos Pro L, Cintiq 21UX, Cintiq 20WSX, Cintiq 12WX, Cintiq 21UX2,
    Cintiq 24HD, Cintiq 22HD, Cintiq 24HD touch (EMR digitizer),
    Cintiq 13HD, DTK2241, DTH2242, Cintiq 22HDT, TabletPC 0x90,
    TabletPC 0x93, TabletPC 0x97, TabletPC 0x9A, CapPlus  0x9F,
    TabletPC 0xE2, TabletPC 0xE3, TabletPC 0xE5, TabletPC 0xE6,
    TabletPC 0xEC, TabletPC 0xED, TabletPC 0xEF, TabletPC 0x100,
    TabletPC 0x101, TabletPC 0x10D, TabletPC 0x4001, usb:172f:0024,
    usb:172f:0025, usb:172f:0026, usb:172f:0027, usb:172f:0028,
    usb:172f:0030, usb:172f:0031, usb:172f:0032, usb:172f:0033,
    usb:172f:0034, usb:172f:0035, usb:172f:0036, usb:172f:0037,
    usb:172f:0038, usb:172f:0039, usb:172f:0051, usb:172f:0052,
    usb:172f:0053, usb:172f:0054, usb:172f:0055, usb:172f:0056,
    usb:172f:0057, usb:172f:0058, usb:172f:0500, usb:172f:0501,
    usb:172f:0502, usb:172f:0503, usb:1b96:0001, usb:17ef:6004
[     4.661] (II) Using input driver 'wacom' for 'Wacom ISDv4 EC Pen'
[     4.661] (**) Wacom ISDv4 EC Pen: always reports core events
[     4.661] (**) Option "Device" "/dev/input/event11"
[     4.662] (II) Wacom ISDv4 EC Pen: type not specified, assuming 'stylus'.
[     4.662] (II) Wacom ISDv4 EC Pen: other types will be automatically added.
[     4.662] (--) Wacom ISDv4 EC Pen stylus: using pressure threshold
of 27 for button 1
[     4.662] (--) Wacom ISDv4 EC Pen stylus: Wacom USB TabletPC tablet
maxX=25632 maxY=14418 maxZ=1023 resX=99000 resY=99000  tilt=disabled
[     4.662] (II) Wacom ISDv4 EC Pen stylus: hotplugging dependent devices.
[     4.662] (EE) Wacom ISDv4 EC Pen stylus: Invalid type 'cursor' for
this device.
[     4.662] (EE) Wacom ISDv4 EC Pen stylus: Invalid type 'touch' for
this device.
[     4.662] (EE) Wacom ISDv4 EC Pen stylus: Invalid type 'pad' for this device.
[     4.662] (II) Wacom ISDv4 EC Pen stylus: hotplugging completed.
[     4.680] (**) Option "config_info"
"udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.2/3-3.2:1.0/input/input12/event11"
[     4.680] (II) XINPUT: Adding extended input device "Wacom ISDv4 EC
Pen stylus" (type: STYLUS, id 9)
[     4.680] (**) Wacom ISDv4 EC Pen stylus: (accel) keeping
acceleration scheme 1
[     4.680] (**) Wacom ISDv4 EC Pen stylus: (accel) acceleration profile 0
[     4.680] (**) Wacom ISDv4 EC Pen stylus: (accel) acceleration factor: 2.000
[     4.680] (**) Wacom ISDv4 EC Pen stylus: (accel) acceleration threshold: 4
[     4.680] (II) config/udev: Adding input device Wacom ISDv4 EC Pen
(/dev/input/mouse1)
[     4.680] (II) No input driver specified, ignoring this device.
[     4.681] (II) This device may have been added with another device file.
[     4.681] (II) config/udev: Adding input device Atmel Atmel
maXTouch Digitizer (/dev/input/event4)
[     4.681] (**) Atmel Atmel maXTouch Digitizer: Applying InputClass
"evdev touchscreen catchall"
[     4.681] (II) Using input driver 'evdev' for 'Atmel Atmel maXTouch
Digitizer'
[     4.681] (**) Atmel Atmel maXTouch Digitizer: always reports core events
[     4.681] (**) evdev: Atmel Atmel maXTouch Digitizer: Device:
"/dev/input/event4"
[     4.681] (II) evdev: Atmel Atmel maXTouch Digitizer: Using mtdev
for this device
[     4.681] (--) evdev: Atmel Atmel maXTouch Digitizer: Vendor 0x3eb
Product 0x8411
[     4.681] (--) evdev: Atmel Atmel maXTouch Digitizer: Found absolute axes
[     4.681] (--) evdev: Atmel Atmel maXTouch Digitizer: Found
absolute multitouch axes
[     4.681] (II) evdev: Atmel Atmel maXTouch Digitizer: No buttons
found, faking one.
[     4.681] (--) evdev: Atmel Atmel maXTouch Digitizer: Found x and y
absolute axes
[     4.681] (--) evdev: Atmel Atmel maXTouch Digitizer: Found
absolute touchscreen
[     4.681] (II) evdev: Atmel Atmel maXTouch Digitizer: Configuring
as touchscreen
[     4.681] (**) evdev: Atmel Atmel maXTouch Digitizer: YAxisMapping:
buttons 4 and 5
[     4.681] (**) evdev: Atmel Atmel maXTouch Digitizer:
EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout:
200
[     4.681] (**) Option "config_info"
"udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:03EB:8411.0002/input/input4/event4"
[     4.681] (II) XINPUT: Adding extended input device "Atmel Atmel
maXTouch Digitizer" (type: TOUCHSCREEN, id 10)
[     4.681] (II) evdev: Atmel Atmel maXTouch Digitizer: initialized
for absolute axes.
[     4.681] (**) Atmel Atmel maXTouch Digitizer: (accel) keeping
acceleration scheme 1
[     4.681] (**) Atmel Atmel maXTouch Digitizer: (accel) acceleration profile 0
[     4.681] (**) Atmel Atmel maXTouch Digitizer: (accel) acceleration
factor: 2.000
[     4.681] (**) Atmel Atmel maXTouch Digitizer: (accel) acceleration
threshold: 4
[     4.681] (II) config/udev: Adding input device Atmel Atmel
maXTouch Digitizer (/dev/input/mouse0)
[     4.681] (II) No input driver specified, ignoring this device.
[     4.681] (II) This device may have been added with another device file.
[     4.682] (II) config/udev: Adding input device WebCam
SC-50AFL11C54N (/dev/input/event5)
[     4.682] (**) WebCam SC-50AFL11C54N: Applying InputClass "evdev
keyboard catchall"
[     4.682] (II) Using input driver 'evdev' for 'WebCam SC-50AFL11C54N'
[     4.682] (**) WebCam SC-50AFL11C54N: always reports core events
[     4.682] (**) evdev: WebCam SC-50AFL11C54N: Device: "/dev/input/event5"
[     4.682] (--) evdev: WebCam SC-50AFL11C54N: Vendor 0x2232 Product 0x1034
[     4.682] (--) evdev: WebCam SC-50AFL11C54N: Found keys
[     4.682] (II) evdev: WebCam SC-50AFL11C54N: Configuring as keyboard
[     4.682] (**) Option "config_info"
"udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input6/event5"
[     4.682] (II) XINPUT: Adding extended input device "WebCam
SC-50AFL11C54N" (type: KEYBOARD, id 11)
[     4.682] (**) Option "xkb_rules" "evdev"
[     4.682] (**) Option "xkb_model" "pc105"
[     4.682] (**) Option "xkb_layout" "us"
[     4.682] (II) config/udev: Adding input device USB
Keyboard+SmartPad (/dev/input/event12)
[     4.682] (**) USB Keyboard+SmartPad: Applying InputClass "evdev
keyboard catchall"
[     4.682] (II) Using input driver 'evdev' for 'USB Keyboard+SmartPad'
[     4.682] (**) USB Keyboard+SmartPad: always reports core events
[     4.682] (**) evdev: USB Keyboard+SmartPad: Device: "/dev/input/event12"
[     4.682] (--) evdev: USB Keyboard+SmartPad: Vendor 0x4f3 Product 0x740
[     4.682] (--) evdev: USB Keyboard+SmartPad: Found keys
[     4.682] (II) evdev: USB Keyboard+SmartPad: Configuring as keyboard
[     4.682] (**) Option "config_info"
"udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1:1.0/0003:04F3:0740.0004/input/input13/event12"
[     4.682] (II) XINPUT: Adding extended input device "USB
Keyboard+SmartPad" (type: KEYBOARD, id 12)
[     4.682] (**) Option "xkb_rules" "evdev"
[     4.682] (**) Option "xkb_model" "pc105"
[     4.682] (**) Option "xkb_layout" "us"
[     4.683] (II) config/udev: Adding input device USB
Keyboard+SmartPad (/dev/input/event13)
[     4.683] (**) USB Keyboard+SmartPad: Applying InputClass "evdev
pointer catchall"
[     4.683] (**) USB Keyboard+SmartPad: Applying InputClass "evdev
keyboard catchall"
[     4.683] (II) Using input driver 'evdev' for 'USB Keyboard+SmartPad'
[     4.683] (**) USB Keyboard+SmartPad: always reports core events
[     4.683] (**) evdev: USB Keyboard+SmartPad: Device: "/dev/input/event13"
[     4.683] (II) evdev: USB Keyboard+SmartPad: Using mtdev for this device
[     4.683] (--) evdev: USB Keyboard+SmartPad: Vendor 0x4f3 Product 0x740
[     4.683] (--) evdev: USB Keyboard+SmartPad: Found 9 mouse buttons
[     4.683] (--) evdev: USB Keyboard+SmartPad: Found scroll wheel(s)
[     4.683] (--) evdev: USB Keyboard+SmartPad: Found relative axes
[     4.683] (--) evdev: USB Keyboard+SmartPad: Found x and y relative axes
[     4.683] (--) evdev: USB Keyboard+SmartPad: Found absolute axes
[     4.683] (--) evdev: USB Keyboard+SmartPad: Found absolute multitouch axes
[     4.683] (--) evdev: USB Keyboard+SmartPad: Found keys
[     4.683] (II) evdev: USB Keyboard+SmartPad: Configuring as mouse
[     4.683] (II) evdev: USB Keyboard+SmartPad: Configuring as keyboard
[     4.683] (II) evdev: USB Keyboard+SmartPad: Adding scrollwheel support
[     4.683] (**) evdev: USB Keyboard+SmartPad: YAxisMapping: buttons 4 and 5
[     4.683] (**) evdev: USB Keyboard+SmartPad: EmulateWheelButton: 4,
EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[     4.683] (**) Option "config_info"
"udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1:1.1/0003:04F3:0740.0005/input/input14/event13"
[     4.683] (II) XINPUT: Adding extended input device "USB
Keyboard+SmartPad" (type: KEYBOARD, id 13)
[     4.683] (**) Option "xkb_rules" "evdev"
[     4.683] (**) Option "xkb_model" "pc105"
[     4.683] (**) Option "xkb_layout" "us"
[     4.683] (II) evdev: USB Keyboard+SmartPad: initialized for relative axes.
[     4.683] (WW) evdev: USB Keyboard+SmartPad: ignoring absolute axes.
[     4.683] (**) USB Keyboard+SmartPad: (accel) keeping acceleration scheme 1
[     4.683] (**) USB Keyboard+SmartPad: (accel) acceleration profile 0
[     4.683] (**) USB Keyboard+SmartPad: (accel) acceleration factor: 2.000
[     4.683] (**) USB Keyboard+SmartPad: (accel) acceleration threshold: 4
[     4.684] (II) config/udev: Adding input device USB
Keyboard+SmartPad (/dev/input/mouse2)
[     4.684] (II) No input driver specified, ignoring this device.
[     4.684] (II) This device may have been added with another device file.
[     4.684] (II) config/udev: Adding input device WebCam
SC-20HDM12347N (/dev/input/event6)
[     4.684] (**) WebCam SC-20HDM12347N: Applying InputClass "evdev
keyboard catchall"
[     4.684] (II) Using input driver 'evdev' for 'WebCam SC-20HDM12347N'
[     4.684] (**) WebCam SC-20HDM12347N: always reports core events
[     4.684] (**) evdev: WebCam SC-20HDM12347N: Device: "/dev/input/event6"
[     4.684] (--) evdev: WebCam SC-20HDM12347N: Vendor 0x2232 Product 0x1036
[     4.684] (--) evdev: WebCam SC-20HDM12347N: Found keys
[     4.684] (II) evdev: WebCam SC-20HDM12347N: Configuring as keyboard
[     4.684] (**) Option "config_info"
"udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input7/event6"
[     4.684] (II) XINPUT: Adding extended input device "WebCam
SC-20HDM12347N" (type: KEYBOARD, id 14)
[     4.684] (**) Option "xkb_rules" "evdev"
[     4.684] (**) Option "xkb_model" "pc105"
[     4.684] (**) Option "xkb_layout" "us"
[     4.684] (II) config/udev: Adding input device HDA Intel PCH
Headphone (/dev/input/event9)
[     4.684] (II) No input driver specified, ignoring this device.
[     4.684] (II) This device may have been added with another device file.
[     4.685] (II) config/udev: Adding input device HDA Intel PCH
HDMI/DP,pcm=3 (/dev/input/event10)
[     4.685] (II) No input driver specified, ignoring this device.
[     4.685] (II) This device may have been added with another device file.
[     4.685] (II) config/udev: Adding input device HDA Intel PCH Mic
(/dev/input/event8)
[     4.685] (II) No input driver specified, ignoring this device.
[     4.685] (II) This device may have been added with another device file.
[     4.685] (II) config/udev: Adding input device AT Translated Set 2
keyboard (/dev/input/event3)
[     4.685] (**) AT Translated Set 2 keyboard: Applying InputClass
"evdev keyboard catchall"
[     4.685] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'
[     4.685] (**) AT Translated Set 2 keyboard: always reports core events
[     4.685] (**) evdev: AT Translated Set 2 keyboard: Device:
"/dev/input/event3"
[     4.685] (--) evdev: AT Translated Set 2 keyboard: Vendor 0x1 Product 0x1
[     4.685] (--) evdev: AT Translated Set 2 keyboard: Found keys
[     4.685] (II) evdev: AT Translated Set 2 keyboard: Configuring as keyboard
[     4.685] (**) Option "config_info"
"udev:/sys/devices/platform/i8042/serio0/input/input3/event3"
[     4.685] (II) XINPUT: Adding extended input device "AT Translated
Set 2 keyboard" (type: KEYBOARD, id 15)
[     4.685] (**) Option "xkb_rules" "evdev"
[     4.685] (**) Option "xkb_model" "pc105"
[     4.685] (**) Option "xkb_layout" "us"
[     4.689] (**) Wacom ISDv4 EC Pen eraser: Applying InputClass
"evdev tablet catchall"
[     4.689] (**) Wacom ISDv4 EC Pen eraser: Applying InputClass "Wacom class"
[     4.689] (II) Using input driver 'wacom' for 'Wacom ISDv4 EC Pen eraser'
[     4.689] (**) Wacom ISDv4 EC Pen eraser: always reports core events
[     4.689] (**) Option "Device" "/dev/input/event11"
[     4.689] (**) Option "Type" "eraser"
[     4.689] (--) Wacom ISDv4 EC Pen eraser: Wacom USB TabletPC tablet
maxX=25632 maxY=14418 maxZ=1023 resX=99000 resY=99000  tilt=disabled
[     4.696] (**) Option "config_info"
"udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.2/3-3.2:1.0/input/input12/event11"
[     4.696] (II) XINPUT: Adding extended input device "Wacom ISDv4 EC
Pen eraser" (type: ERASER, id 16)
[     4.696] (**) Wacom ISDv4 EC Pen eraser: (accel) keeping
acceleration scheme 1
[     4.696] (**) Wacom ISDv4 EC Pen eraser: (accel) acceleration profile 0
[     4.696] (**) Wacom ISDv4 EC Pen eraser: (accel) acceleration factor: 2.000
[     4.696] (**) Wacom ISDv4 EC Pen eraser: (accel) acceleration threshold: 4
[     5.553] (II) intel(0): EDID vendor "AUO", prod id 12637
[     5.553] (II) intel(0): Printing DDC gathered Modelines:
[     5.553] (II) intel(0): Modeline "1920x1080"x0.0  141.41  1920
1978 2020 2108  1080 1088 1102 1118 -hsync -vsync (67.1 kHz eP)
[     6.096] (II) intel(0): switch to mode 1920x1080@60.0 on eDP1
using pipe 0, position (0, 0), rotation normal, reflection none
[    12.663] (II) XKB: reuse xkmfile
/var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm
[    12.936] (II) XKB: reuse xkmfile
/var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm
[    12.981] (II) XKB: reuse xkmfile
/var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm
[    14.082] (II) XKB: reuse xkmfile
/var/lib/xkb/server-34CEB476A3CB596DA76FD7010A029F76732EF824.xkm

cat /var/log/Xorg.0.log [excerpt when forcing synaptics driver]
[ 10517.611] (II) LoadModule: "synaptics"
[ 10517.611] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
[ 10517.611] (II) Module synaptics: vendor="X.Org Foundation"
[ 10517.611] compiled for 1.15.0, module version = 1.7.4
[ 10517.611] Module class: X.Org XInput Driver
[ 10517.611] ABI class: X.Org XInput driver, version 20.0
[ 10517.611] (II) Using input driver 'synaptics' for 'USB Keyboard+SmartPad'
[ 10517.611] (**) USB Keyboard+SmartPad: always reports core events
[ 10517.611] (**) Option "Protocol" "event"
[ 10517.611] (**) Option "Device" "/dev/input/event13"
[ 10517.611] (--) synaptics: USB Keyboard+SmartPad: Vendor 0x4f3 Product 0x740
[ 10517.611] (--) synaptics: USB Keyboard+SmartPad: invalid x-axis
range. defaulting to 1615 - 5685
[ 10517.611] (--) synaptics: USB Keyboard+SmartPad: invalid y-axis
range. defaulting to 1729 - 4171
[ 10517.611] (--) synaptics: USB Keyboard+SmartPad: invalid pressure
range. defaulting to 0 - 255
[ 10517.611] (--) synaptics: USB Keyboard+SmartPad: invalid finger
width range. defaulting to 0 - 15
[ 10517.611] (--) synaptics: USB Keyboard+SmartPad: no supported touchpad found
[ 10517.611] (EE) synaptics: USB Keyboard+SmartPad: Unable to
query/initialize Synaptics hardware.
[ 10517.620] (EE) PreInit returned 11 for "USB Keyboard+SmartPad"
[ 10517.620] (II) UnloadModule: "synaptics"
--
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] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'
From: Chen Gang @ 2014-07-20  8:38 UTC (permalink / raw)
  To: Lennox Wu
  Cc: linux-iio, Benjamin Herrenschmidt, Tom Gundersen, Thierry Reding,
	Marek Vasut, Liqin Chen, Lars-Peter Clausen, Richard Weinberger,
	Geert Uytterhoeven, msalter, Guenter Roeck, linux-pwm, devel,
	linux-watchdog, Arnd Bergmann, linux-input, Greg Kroah-Hartman,
	Dmitry Torokhov, linux-kernel@vger.kernel.org, knaack.h,
	Martin Schwidefsky, Mischa.Jonker, jic23
In-Reply-To: <53C9612E.3040001@gmail.com>

On 07/19/2014 02:02 AM, Chen Gang wrote:
>> 2014-07-18 18:51 GMT+08:00 Richard Weinberger <richard@nod.at>:
>>> Am 18.07.2014 12:44, schrieb Chen Gang:
>>>> On 07/18/2014 03:35 PM, Richard Weinberger wrote:
>>>>> Am 18.07.2014 02:36, schrieb Chen Gang:
>>>>>>
>>>>>> On 07/18/2014 02:09 AM, Richard Weinberger wrote:
>>>>>>> Am 17.07.2014 12:48, schrieb Arnd Bergmann:
>>>>>>>> AFAICT, NO_IOMEM only has a real purpose on UML these days. Could we take
>>>>>>>> a shortcut here and make COMPILE_TEST depend on !UML? Getting random stuff
>>>>>>>> to build on UML seems pointless to me and we special-case it in a number of
>>>>>>>> places already.
>>>>>>>
>>>>>>> If UML is the only arch without io memory the dependency on !UML seems
>>>>>>> reasonable to me. :-)
>>>>>>>
>>>>>>
>>>>>> For me, if only uml left, I suggest to implement dummy functions within
>>>>>> uml instead of let CONFIG_UML appear in generic include directory. And
>>>>>> then remove all HAS_IOMEM and NO_IOMEM from kernel.
>>>>>
>>>>> Erm, this is something completely different.
>>>>> I thought we're focusing on COMPILE_TEST?
>>>>>
>>>>
>>>> COMPILE_TEST is none-architecture specific, but UML is. So in generic
>>>> include folder, if we're focusing on choosing whether COMPILE_TEST or
>>>> UML, for me, I will choose COMPILE_TEST.
>>>>
>>>> If we're not only focusing on COMPILE_TEST, for me, if something only
>>>> depend on one architecture, I'd like to put them under "arch/*/" folder.
>>>>
>>>> Especially, after that, we can remove all HAS_IOMEM and NO_IOMEM, nobody
>>>> has to think of them again. :-)
>>>
>>> And then we end up with a solution that on UML a lot of completely useless
>>> drivers are build which fail in various interesting manners because you'll
>>> add stubs for all kinds of io memory related functions to arch/um/?
>>> We had this kind of discussion already. You'll need more than ioremap...
>>>
>>> I like Arnd's idea *much* more to make COMPILE_TEST depend on !UML.
>>>
> 
> That will let UML itself against COMPILE_TEST (but all the other
> architectures not).
> 
> And if let COMPILE_TEST depend on !UML, can we still remove all
> HAS_IOMEM and NO_IOMEM from kernel? (I guess so).
> 
> If we can remove them, we can send related patch firstly -- that will
> let current discussion be in UML architecture wide instead of kernel
> wide.
> 

Next, I shall:

 - Remove HAS_IOMEM and NO_IOMEM from kernel, firstly.

 - Try to make dummy IOMEM functions for score architecture.

 - Continue discussing with UML for it.


By the way: how about HAS_DMA? can we treat it as HAS_IOMEM (remove
it from kernel)? (for me, I guess we can not).


At present, I shall finish sending patch for removing IOMEM today, and
continue to welcome any ideas, suggestions or completions for IOMEM or
DMA.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed

^ permalink raw reply

* Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'
From: Richard Weinberger @ 2014-07-20  9:45 UTC (permalink / raw)
  To: Chen Gang, Lennox Wu
  Cc: linux-iio, Benjamin Herrenschmidt, Tom Gundersen, Thierry Reding,
	Marek Vasut, Liqin Chen, Lars-Peter Clausen, Geert Uytterhoeven,
	msalter, Guenter Roeck, linux-pwm, devel, linux-watchdog,
	Arnd Bergmann, linux-input, Greg Kroah-Hartman, Dmitry Torokhov,
	linux-kernel@vger.kernel.org, knaack.h, Martin Schwidefsky,
	Mischa.Jonker, jic23
In-Reply-To: <53CB801D.1030603@gmail.com>



Am 20.07.2014 10:38, schrieb Chen Gang:
> On 07/19/2014 02:02 AM, Chen Gang wrote:
>>> 2014-07-18 18:51 GMT+08:00 Richard Weinberger <richard@nod.at>:
>>>> Am 18.07.2014 12:44, schrieb Chen Gang:
>>>>> On 07/18/2014 03:35 PM, Richard Weinberger wrote:
>>>>>> Am 18.07.2014 02:36, schrieb Chen Gang:
>>>>>>>
>>>>>>> On 07/18/2014 02:09 AM, Richard Weinberger wrote:
>>>>>>>> Am 17.07.2014 12:48, schrieb Arnd Bergmann:
>>>>>>>>> AFAICT, NO_IOMEM only has a real purpose on UML these days. Could we take
>>>>>>>>> a shortcut here and make COMPILE_TEST depend on !UML? Getting random stuff
>>>>>>>>> to build on UML seems pointless to me and we special-case it in a number of
>>>>>>>>> places already.
>>>>>>>>
>>>>>>>> If UML is the only arch without io memory the dependency on !UML seems
>>>>>>>> reasonable to me. :-)
>>>>>>>>
>>>>>>>
>>>>>>> For me, if only uml left, I suggest to implement dummy functions within
>>>>>>> uml instead of let CONFIG_UML appear in generic include directory. And
>>>>>>> then remove all HAS_IOMEM and NO_IOMEM from kernel.
>>>>>>
>>>>>> Erm, this is something completely different.
>>>>>> I thought we're focusing on COMPILE_TEST?
>>>>>>
>>>>>
>>>>> COMPILE_TEST is none-architecture specific, but UML is. So in generic
>>>>> include folder, if we're focusing on choosing whether COMPILE_TEST or
>>>>> UML, for me, I will choose COMPILE_TEST.
>>>>>
>>>>> If we're not only focusing on COMPILE_TEST, for me, if something only
>>>>> depend on one architecture, I'd like to put them under "arch/*/" folder.
>>>>>
>>>>> Especially, after that, we can remove all HAS_IOMEM and NO_IOMEM, nobody
>>>>> has to think of them again. :-)
>>>>
>>>> And then we end up with a solution that on UML a lot of completely useless
>>>> drivers are build which fail in various interesting manners because you'll
>>>> add stubs for all kinds of io memory related functions to arch/um/?
>>>> We had this kind of discussion already. You'll need more than ioremap...
>>>>
>>>> I like Arnd's idea *much* more to make COMPILE_TEST depend on !UML.
>>>>
>>
>> That will let UML itself against COMPILE_TEST (but all the other
>> architectures not).
>>
>> And if let COMPILE_TEST depend on !UML, can we still remove all
>> HAS_IOMEM and NO_IOMEM from kernel? (I guess so).
>>
>> If we can remove them, we can send related patch firstly -- that will
>> let current discussion be in UML architecture wide instead of kernel
>> wide.
>>
> 
> Next, I shall:
> 
>  - Remove HAS_IOMEM and NO_IOMEM from kernel, firstly.

This needs to be last, otherwise lot's of stuff will break.

>  - Try to make dummy IOMEM functions for score architecture.
> 
>  - Continue discussing with UML for it.

If you find sane dummy functions for both UML and score I'm fine with it.

Thanks,
//richard

^ permalink raw reply

* Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'
From: Chen Gang @ 2014-07-20  9:45 UTC (permalink / raw)
  To: Lennox Wu
  Cc: linux-iio, Benjamin Herrenschmidt, heiko.carstens, Tom Gundersen,
	Thierry Reding, Marek Vasut, Liqin Chen, Lars-Peter Clausen,
	Richard Weinberger, Geert Uytterhoeven, msalter, Guenter Roeck,
	linux-pwm, devel, linux-watchdog, Arnd Bergmann, linux-input,
	cmetcalf, Greg Kroah-Hartman, Dmitry Torokhov,
	linux-kernel@vger.kernel.org, knaack.h, Martin Schwidefsky, jic23
In-Reply-To: <53CB801D.1030603@gmail.com>

On 07/20/2014 04:38 PM, Chen Gang wrote:
> On 07/19/2014 02:02 AM, Chen Gang wrote:
>>> 2014-07-18 18:51 GMT+08:00 Richard Weinberger <richard@nod.at>:
>>>> Am 18.07.2014 12:44, schrieb Chen Gang:
>>>>> On 07/18/2014 03:35 PM, Richard Weinberger wrote:
>>>>>> Am 18.07.2014 02:36, schrieb Chen Gang:
>>>>>>>
>>>>>>> On 07/18/2014 02:09 AM, Richard Weinberger wrote:
>>>>>>>> Am 17.07.2014 12:48, schrieb Arnd Bergmann:
>>>>>>>>> AFAICT, NO_IOMEM only has a real purpose on UML these days. Could we take
>>>>>>>>> a shortcut here and make COMPILE_TEST depend on !UML? Getting random stuff
>>>>>>>>> to build on UML seems pointless to me and we special-case it in a number of
>>>>>>>>> places already.
>>>>>>>>
>>>>>>>> If UML is the only arch without io memory the dependency on !UML seems
>>>>>>>> reasonable to me. :-)
>>>>>>>>
>>>>>>>
>>>>>>> For me, if only uml left, I suggest to implement dummy functions within
>>>>>>> uml instead of let CONFIG_UML appear in generic include directory. And
>>>>>>> then remove all HAS_IOMEM and NO_IOMEM from kernel.
>>>>>>
>>>>>> Erm, this is something completely different.
>>>>>> I thought we're focusing on COMPILE_TEST?
>>>>>>
>>>>>
>>>>> COMPILE_TEST is none-architecture specific, but UML is. So in generic
>>>>> include folder, if we're focusing on choosing whether COMPILE_TEST or
>>>>> UML, for me, I will choose COMPILE_TEST.
>>>>>
>>>>> If we're not only focusing on COMPILE_TEST, for me, if something only
>>>>> depend on one architecture, I'd like to put them under "arch/*/" folder.
>>>>>
>>>>> Especially, after that, we can remove all HAS_IOMEM and NO_IOMEM, nobody
>>>>> has to think of them again. :-)
>>>>
>>>> And then we end up with a solution that on UML a lot of completely useless
>>>> drivers are build which fail in various interesting manners because you'll
>>>> add stubs for all kinds of io memory related functions to arch/um/?
>>>> We had this kind of discussion already. You'll need more than ioremap...
>>>>
>>>> I like Arnd's idea *much* more to make COMPILE_TEST depend on !UML.
>>>>
>>
>> That will let UML itself against COMPILE_TEST (but all the other
>> architectures not).
>>
>> And if let COMPILE_TEST depend on !UML, can we still remove all
>> HAS_IOMEM and NO_IOMEM from kernel? (I guess so).
>>
>> If we can remove them, we can send related patch firstly -- that will
>> let current discussion be in UML architecture wide instead of kernel
>> wide.
>>
> 
> Next, I shall:
> 
>  - Remove HAS_IOMEM and NO_IOMEM from kernel, firstly.
> 
>  - Try to make dummy IOMEM functions for score architecture.
> 
>  - Continue discussing with UML for it.
>
 
Oh, sorry, I forgot, after remove IOMEM from kernel, also s390 and tile
need implement dummy IOMEM if !PCI.

If possible, I shall try to implement the dummy IOMEM in 'asm-generic',
and let uml, score, s390 and tile use them when they need.

> 
> By the way: how about HAS_DMA? can we treat it as HAS_IOMEM (remove
> it from kernel)? (for me, I guess we can not).
> 
> 
> At present, I shall finish sending patch for removing IOMEM today, and
> continue to welcome any ideas, suggestions or completions for IOMEM or
> DMA.
> 
> 

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed

^ permalink raw reply

* Re: [PATCH] Input: fix defuzzing logic
From: David Herrmann @ 2014-07-20  9:50 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: open list:HID CORE LAYER, Benson Leung, Andrew de los Reyes,
	Henrik Rydberg, linux-kernel
In-Reply-To: <20140719234843.GA28580@core.coreip.homeip.net>

Hi

On Sun, Jul 20, 2014 at 1:49 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> We attempt to remove noise from coordinates reported by devices in
> input_handle_abs_event(), unfortunately, unless we were dropping the
> event altogether, we were ignoring the adjusted value and were passing
> on the original value instead.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>

Thanks
David

> Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
> Reviewed-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/input/input.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 1c4c0db..29ca0bb 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev,
>  }
>
>  static int input_get_disposition(struct input_dev *dev,
> -                         unsigned int type, unsigned int code, int value)
> +                         unsigned int type, unsigned int code, int *pval)
>  {
>         int disposition = INPUT_IGNORE_EVENT;
> +       int value = *pval;
>
>         switch (type) {
>
> @@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev,
>                 break;
>         }
>
> +       *pval = value;
>         return disposition;
>  }
>
> @@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev,
>  {
>         int disposition;
>
> -       disposition = input_get_disposition(dev, type, code, value);
> +       disposition = input_get_disposition(dev, type, code, &value);
>
>         if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
>                 dev->event(dev, type, code, value);
>
> --
> Dmitry

^ permalink raw reply

* Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'
From: Chen Gang @ 2014-07-20  9:51 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Lennox Wu, Arnd Bergmann, Lars-Peter Clausen, Guenter Roeck,
	Greg Kroah-Hartman, Dmitry Torokhov,
	linux-iio-u79uwXL29TY76Z2rM5mHXA, Benjamin Herrenschmidt,
	Tom Gundersen, Thierry Reding, Marek Vasut, Liqin Chen,
	msalter-H+wXaHxf7aLQT0dZR+AlfA, linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	knaack.h-Mmb7MZpHnFY, Martin Schwidefsky,
	Mischa.Jonker-HKixBCOQz3hWk0Htik3J/w,
	jic23-DgEjT+Ai2ygdnm+yROfE0A, Geert Uytterhoeven,
	cmetcalf-kv+TWInifGbQT0dZR+AlfA
In-Reply-To: <53CB8FBF.2070206-/L3Ra7n9ekc@public.gmane.org>

On 07/20/2014 05:45 PM, Richard Weinberger wrote:
> 
> 
> Am 20.07.2014 10:38, schrieb Chen Gang:
>> On 07/19/2014 02:02 AM, Chen Gang wrote:
>>>> 2014-07-18 18:51 GMT+08:00 Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>:
>>>>> Am 18.07.2014 12:44, schrieb Chen Gang:
>>>>>> On 07/18/2014 03:35 PM, Richard Weinberger wrote:
>>>>>>> Am 18.07.2014 02:36, schrieb Chen Gang:
>>>>>>>>
>>>>>>>> On 07/18/2014 02:09 AM, Richard Weinberger wrote:
>>>>>>>>> Am 17.07.2014 12:48, schrieb Arnd Bergmann:
>>>>>>>>>> AFAICT, NO_IOMEM only has a real purpose on UML these days. Could we take
>>>>>>>>>> a shortcut here and make COMPILE_TEST depend on !UML? Getting random stuff
>>>>>>>>>> to build on UML seems pointless to me and we special-case it in a number of
>>>>>>>>>> places already.
>>>>>>>>>
>>>>>>>>> If UML is the only arch without io memory the dependency on !UML seems
>>>>>>>>> reasonable to me. :-)
>>>>>>>>>
>>>>>>>>
>>>>>>>> For me, if only uml left, I suggest to implement dummy functions within
>>>>>>>> uml instead of let CONFIG_UML appear in generic include directory. And
>>>>>>>> then remove all HAS_IOMEM and NO_IOMEM from kernel.
>>>>>>>
>>>>>>> Erm, this is something completely different.
>>>>>>> I thought we're focusing on COMPILE_TEST?
>>>>>>>
>>>>>>
>>>>>> COMPILE_TEST is none-architecture specific, but UML is. So in generic
>>>>>> include folder, if we're focusing on choosing whether COMPILE_TEST or
>>>>>> UML, for me, I will choose COMPILE_TEST.
>>>>>>
>>>>>> If we're not only focusing on COMPILE_TEST, for me, if something only
>>>>>> depend on one architecture, I'd like to put them under "arch/*/" folder.
>>>>>>
>>>>>> Especially, after that, we can remove all HAS_IOMEM and NO_IOMEM, nobody
>>>>>> has to think of them again. :-)
>>>>>
>>>>> And then we end up with a solution that on UML a lot of completely useless
>>>>> drivers are build which fail in various interesting manners because you'll
>>>>> add stubs for all kinds of io memory related functions to arch/um/?
>>>>> We had this kind of discussion already. You'll need more than ioremap...
>>>>>
>>>>> I like Arnd's idea *much* more to make COMPILE_TEST depend on !UML.
>>>>>
>>>
>>> That will let UML itself against COMPILE_TEST (but all the other
>>> architectures not).
>>>
>>> And if let COMPILE_TEST depend on !UML, can we still remove all
>>> HAS_IOMEM and NO_IOMEM from kernel? (I guess so).
>>>
>>> If we can remove them, we can send related patch firstly -- that will
>>> let current discussion be in UML architecture wide instead of kernel
>>> wide.
>>>
>>
>> Next, I shall:
>>
>>  - Remove HAS_IOMEM and NO_IOMEM from kernel, firstly.
> 
> This needs to be last, otherwise lot's of stuff will break.
> 

OK, thanks, that sounds reasonable to me.

>>  - Try to make dummy IOMEM functions for score architecture.
>>
>>  - Continue discussing with UML for it.
> 
> If you find sane dummy functions for both UML and score I'm fine with it.
> 

For me, what you said is necessary, tile and s390 also need dummy IOMEM
when !PCI.

So for me, I shall implement them in "include/asm-generic", and let uml,
score, tile and s390 use dummy IOMEM when they need.

Welcome any other members ideas, suggestions and completions.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed

^ permalink raw reply

* Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'
From: Chen Gang @ 2014-07-20  9:56 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-iio, Benjamin Herrenschmidt, heiko.carstens, Tom Gundersen,
	Thierry Reding, Lennox Wu, Marek Vasut, Liqin Chen,
	Lars-Peter Clausen, Geert Uytterhoeven, msalter, Guenter Roeck,
	linux-pwm, devel, linux-watchdog, Arnd Bergmann, linux-input,
	cmetcalf, Greg Kroah-Hartman, Dmitry Torokhov,
	linux-kernel@vger.kernel.org, knaack.h, Martin Schwidefsky,
	Mischa.Jonker, jic23
In-Reply-To: <53CB9134.7080705@gmail.com>

On 07/20/2014 05:51 PM, Chen Gang wrote:
> On 07/20/2014 05:45 PM, Richard Weinberger wrote:
>>
>>
>> Am 20.07.2014 10:38, schrieb Chen Gang:
>>> On 07/19/2014 02:02 AM, Chen Gang wrote:
>>>>> 2014-07-18 18:51 GMT+08:00 Richard Weinberger <richard@nod.at>:
>>>>>> Am 18.07.2014 12:44, schrieb Chen Gang:
>>>>>>> On 07/18/2014 03:35 PM, Richard Weinberger wrote:
>>>>>>>> Am 18.07.2014 02:36, schrieb Chen Gang:
>>>>>>>>>
>>>>>>>>> On 07/18/2014 02:09 AM, Richard Weinberger wrote:
>>>>>>>>>> Am 17.07.2014 12:48, schrieb Arnd Bergmann:
>>>>>>>>>>> AFAICT, NO_IOMEM only has a real purpose on UML these days. Could we take
>>>>>>>>>>> a shortcut here and make COMPILE_TEST depend on !UML? Getting random stuff
>>>>>>>>>>> to build on UML seems pointless to me and we special-case it in a number of
>>>>>>>>>>> places already.
>>>>>>>>>>
>>>>>>>>>> If UML is the only arch without io memory the dependency on !UML seems
>>>>>>>>>> reasonable to me. :-)
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> For me, if only uml left, I suggest to implement dummy functions within
>>>>>>>>> uml instead of let CONFIG_UML appear in generic include directory. And
>>>>>>>>> then remove all HAS_IOMEM and NO_IOMEM from kernel.
>>>>>>>>
>>>>>>>> Erm, this is something completely different.
>>>>>>>> I thought we're focusing on COMPILE_TEST?
>>>>>>>>
>>>>>>>
>>>>>>> COMPILE_TEST is none-architecture specific, but UML is. So in generic
>>>>>>> include folder, if we're focusing on choosing whether COMPILE_TEST or
>>>>>>> UML, for me, I will choose COMPILE_TEST.
>>>>>>>
>>>>>>> If we're not only focusing on COMPILE_TEST, for me, if something only
>>>>>>> depend on one architecture, I'd like to put them under "arch/*/" folder.
>>>>>>>
>>>>>>> Especially, after that, we can remove all HAS_IOMEM and NO_IOMEM, nobody
>>>>>>> has to think of them again. :-)
>>>>>>
>>>>>> And then we end up with a solution that on UML a lot of completely useless
>>>>>> drivers are build which fail in various interesting manners because you'll
>>>>>> add stubs for all kinds of io memory related functions to arch/um/?
>>>>>> We had this kind of discussion already. You'll need more than ioremap...
>>>>>>
>>>>>> I like Arnd's idea *much* more to make COMPILE_TEST depend on !UML.
>>>>>>
>>>>
>>>> That will let UML itself against COMPILE_TEST (but all the other
>>>> architectures not).
>>>>
>>>> And if let COMPILE_TEST depend on !UML, can we still remove all
>>>> HAS_IOMEM and NO_IOMEM from kernel? (I guess so).
>>>>
>>>> If we can remove them, we can send related patch firstly -- that will
>>>> let current discussion be in UML architecture wide instead of kernel
>>>> wide.
>>>>
>>>
>>> Next, I shall:
>>>
>>>  - Remove HAS_IOMEM and NO_IOMEM from kernel, firstly.
>>
>> This needs to be last, otherwise lot's of stuff will break.
>>
> 
> OK, thanks, that sounds reasonable to me.
> 
>>>  - Try to make dummy IOMEM functions for score architecture.
>>>
>>>  - Continue discussing with UML for it.
>>
>> If you find sane dummy functions for both UML and score I'm fine with it.
>>
> 
> For me, what you said is necessary, tile and s390 also need dummy IOMEM
> when !PCI.
> 
> So for me, I shall implement them in "include/asm-generic", and let uml,
> score, tile and s390 use dummy IOMEM when they need.
> 
> Welcome any other members ideas, suggestions and completions.
> 
> 

And sorry, I can not finish this discussion and send patch for it within
this week, for it is really a long necessary discussion.

But, hope we can finish this discussion and send patch for it within
this month (but in current condition, I am not quite sure).

And after finish discussion, welcome any other members help sending
related patch for it (e.g. implement dummy IOMEM in "asm-generic",
remove all IOMEM in kernel wide).

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed

^ permalink raw reply

* [PATCH] staging: input: sunkbd.c: Fix coding style
From: Bivolaru Catalin @ 2014-07-20 12:01 UTC (permalink / raw)
  To: kernel-janitors, dmitry.torokhov, linux-input, linux-kernel
  Cc: paul.gortmaker

Fix coding style with regard to missing spaces after , and the column limit
that was violated after the first change.

Signed-off-by: Bivolaru Catalin <bivolaru.catalin@gmail.com>
---

The change was tested only by compilation.

diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
index dc6bb9d..25ba6b6 100644
--- a/drivers/input/keyboard/sunkbd.c
+++ b/drivers/input/keyboard/sunkbd.c
@@ -42,14 +42,15 @@ MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 static unsigned char sunkbd_keycode[128] = {
-	  0,128,114,129,115, 59, 60, 68, 61, 87, 62, 88, 63,100, 64,112,
-	 65, 66, 67, 56,103,119, 99, 70,105,130,131,108,106,  1,  2,  3,
-	  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 41, 14,110,113, 98, 55,
-	116,132, 83,133,102, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
-	 26, 27,111,127, 71, 72, 73, 74,134,135,107,  0, 29, 30, 31, 32,
-	 33, 34, 35, 36, 37, 38, 39, 40, 43, 28, 96, 75, 76, 77, 82,136,
-	104,137, 69, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,101,
-	 79, 80, 81,  0,  0,  0,138, 58,125, 57,126,109, 86, 78
+	  0, 128, 114, 129, 115,  59,  60,  68,  61,  87,  62,  88,  63, 100,
+	 64, 112,  65,  66,  67,  56, 103, 119,  99,  70, 105, 130, 131, 108,
+	106,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
+	 41,  14, 110, 113,  98,  55, 116, 132,  83, 133, 102,  15,  16,  17,
+	 18,  19,  20,  21,  22,  23,  24,  25,  26,  27, 111, 127,  71,  72,
+	 73,  74, 134, 135, 107,   0,  29,  30,  31,  32,  33,  34,  35,  36,
+	 37,  38,  39,  40,  43,  28,  96,  75,  76,  77,  82, 136, 104, 137,
+	 69,  42,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54, 101,
+	 79,  80,  81,   0,   0,   0, 138,  58, 125,  57, 126, 109,  86,  78
 };
 
 #define SUNKBD_CMD_RESET	0x1

^ permalink raw reply related

* Re: [PATCH 2/2] iio: exynos-adc: add experimental touchscreen support
From: Jonathan Cameron @ 2014-07-20 13:51 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arm-kernel
  Cc: Chanwoo Choi, ch.naveen, mark.rutland, devicetree, kgene.kim,
	pawel.moll, ijc+devicetree, linux-iio, t.figa, rdunlap, linux-doc,
	linux-kernel, linux-samsung-soc, kyungmin.park, robh+dt, galak,
	heiko.stuebner, Ben Dooks, linux-input, Dmitry Torokhov
In-Reply-To: <53CBC8D6.6020509@kernel.org>

On 20/07/14 14:49, Jonathan Cameron wrote:
> On 18/07/14 20:29, Arnd Bergmann wrote:
>> This adds support for the touchscreen on Samsung s3c64xx.
>> The driver is completely untested but shows roughly how
>> it could be done, following the example of the at91 driver.
>>
> Hi Arnd,
Cc'd linux-input and Dmitry.
>
>> Open questions include:
>>
>> - compared to the old plat-samsung/adc driver, there is
>>    no support for prioritizing ts over other clients, nor
>>    for oversampling. From my reading of the code, the
>>    priorities didn't actually have any effect at all, but
>>    the oversampling might be needed. Maybe the original
>>    authors have some insight.
>>
>> - I simply register the input device from the adc driver
>>    itself, as the at91 code does. The driver also supports
>>    sub-nodes, but I don't understand how they are meant
>>    to be used, so using those might be better.
> So, the alternative you are (I think) referring to is to use
> the buffered in kernel client interface.  That way a separate
> touch screen driver can use the output channels provided by IIO
> in much the same way you might use a regulator or similar.
> Note that whilst this is similar to the simple polled interface
> used for things like the iio_hwmon driver, the data flow is
> quite different (clearly the polled interfce would be
> inappropriate here).
>
> Whilst we've discussed it in the past for touch screen drivers
> like this, usually the hardware isn't generic enough to be
> of any real use if not being used as a touch screen.  As such
> it's often simpler to just have the support directly in the
> driver (as you've observed the at91 driver does this).
>
> Whilst the interface has been there a while, it's not really had
> all that much use.  The original target was the simpler case
> of 3D accelerometer where we have a generic iio to input
> bridge driver. Time constraints meant that I haven't yet actually
> formally submitted the input side of this. Whilst there are lots
> of other things that can use this interface, right now nothing
> actually does so.
>
>>
>> - The new exynos_read_s3c64xx_ts() function is intentionally
>>    very similar to the existing exynos_read_raw() functions.
>>    It should probably be changed, either by merging the two
>>    into one, or by simplifying the exynos_read_s3c64xx_ts()
>>    function. This depends a bit on the answers to the questions
>>    above.
> I'd be tempted to not bother keeping them that similar.  It's
> not a generic IIO channel so simplify it where possible.
>>
>> - We probably need to add support for platform_data as well,
>>    I've skipped this so far.
>>
>> - Is anybody able to debug this driver on real hardware?
>>    While it's possible that it actually works, it's more
>>    likely that I made a few subtle mistakes.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Looks pretty good to me.  A few symantic bits and pieces and
> one bug spotted.  Short and sweet.
>>
>> diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
>> index e1b74828f413..4329bf3c3326 100644
>> --- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
>> +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
>> @@ -41,6 +41,10 @@ Required properties:
>>                          and compatible ADC block)
>>   - vdd-supply        VDD input supply.
>>
>> +Optional properties:
>> +- has-touchscreen:    If present, indicates that a touchscreen is
>> +            connected an usable.
>> +
>>   Note: child nodes can be added for auto probing from device tree.
>>
>>   Example: adding device info in dtsi file
>> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
>> index 5f95638513d2..cf1d9f3e2492 100644
>> --- a/drivers/iio/adc/exynos_adc.c
>> +++ b/drivers/iio/adc/exynos_adc.c
>> @@ -34,6 +34,7 @@
>>   #include <linux/regulator/consumer.h>
>>   #include <linux/of_platform.h>
>>   #include <linux/err.h>
>> +#include <linux/input.h>
> Might want to make the input side optional at compile time...
> I supose the existing parts are unlikely to be used much in headless
> devices, but you never know.  Maybe we just leave this until someone
> shouts they want to be able to avoid compiling it in.
>>
>>   #include <linux/iio/iio.h>
>>   #include <linux/iio/machine.h>
>> @@ -103,6 +104,7 @@
>>
>>   /* Bit definitions common for ADC_V1 and ADC_V2 */
>>   #define ADC_CON_EN_START    (1u << 0)
>> +#define ADC_DATX_PRESSED    (1u << 15)
>>   #define ADC_DATX_MASK        0xFFF
>>
>>   #define EXYNOS_ADC_TIMEOUT    (msecs_to_jiffies(100))
>> @@ -110,16 +112,20 @@
>>   struct exynos_adc {
>>       struct exynos_adc_data    *data;
>>       struct device        *dev;
>> +    struct input_dev    *input;
>>       void __iomem        *regs;
>>       void __iomem        *enable_reg;
>>       struct clk        *clk;
>>       struct clk        *sclk;
>>       unsigned int        irq;
>> +    unsigned int        tsirq;
>>       struct regulator    *vdd;
>>
>>       struct completion    completion;
>>
>> +    bool            read_ts;
>>       u32            value;
>> +    u32            value2;
> As I state further down, I'd rather keep a little
> clear of the naming used in IIO for bits that aren't
> going through IIO (less confusing!). Maybe just
> have
>      u32 x, y;
>>       unsigned int            version;
>>   };
>>
>> @@ -390,12 +396,61 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
>>       return ret;
>>   }
>>
>> +static int exynos_read_s3c64xx_ts(struct iio_dev *indio_dev,
>> +                struct iio_chan_spec const *chan,
>> +                int *val,
>> +                int *val2,
>> +                long mask)
>> +{
>> +    struct exynos_adc *info = iio_priv(indio_dev);
>> +    unsigned long timeout;
>> +    int ret;
>> +
>> +    if (mask != IIO_CHAN_INFO_RAW)
>> +        return -EINVAL;
>> +
>> +    mutex_lock(&indio_dev->mlock);
>> +    info->read_ts = 1;
>> +
>> +    reinit_completion(&info->completion);
>> +
>> +    writel(ADC_S3C2410_TSC_PULL_UP_DISABLE | ADC_TSC_AUTOPST,
>> +           ADC_V1_TSC(info->regs));
>> +
>> +    /* Select the ts channel to be used and Trigger conversion */
>> +    info->data->start_conv(info, 0);
> 0 is a rather magic value.  A define perhaps?
>> +
>> +    timeout = wait_for_completion_timeout
>> +            (&info->completion, EXYNOS_ADC_TIMEOUT);
>> +    if (timeout == 0) {
>> +        dev_warn(&indio_dev->dev, "Conversion timed out! Resetting\n");
>> +        if (info->data->init_hw)
>> +            info->data->init_hw(info);
>> +        ret = -ETIMEDOUT;
>> +    } else {
>> +        *val = info->value;
>> +        *val2 = info->value2;
> This is definitely abuse as those two values are not intended for
> different values.  If you want to do this please use different naming
> and don't try to fiddle it into the IIO read raw framework.
> As you've suggested above, better to simplify this code and drop the
> bits cloned from the other handler.
>> +        ret = IIO_VAL_INT;
>> +    }
>> +
>> +    info->read_ts = 0;
>> +    mutex_unlock(&indio_dev->mlock);
>> +
>> +    return ret;
>> +}
>> +
>>   static irqreturn_t exynos_adc_isr(int irq, void *dev_id)
>>   {
>>       struct exynos_adc *info = (struct exynos_adc *)dev_id;
>>
>>       /* Read value */
>> -    info->value = readl(ADC_V1_DATX(info->regs)) & ADC_DATX_MASK;
>> +    if (info->read_ts) {
>> +        info->value = readl(ADC_V1_DATX(info->regs)) & ADC_DATX_MASK;
>> +        info->value2 = readl(ADC_V1_DATY(info->regs)) & ADC_DATX_MASK;
> ADC_DATY_MASK would be more obviously correct.
>
>> +        writel(ADC_TSC_WAIT4INT | ADC_S3C2443_TSC_UD_SEN, ADC_V1_TSC(info->regs));
> Perhaps the above is cryptic enough to warrant a comment?
>> +    } else {
>> +        info->value = readl(ADC_V1_DATX(info->regs)) & ADC_DATX_MASK;
>> +    }
>>
>>       /* clear irq */
>>       if (info->data->clear_irq)
>> @@ -406,6 +461,46 @@ static irqreturn_t exynos_adc_isr(int irq, void *dev_id)
>>       return IRQ_HANDLED;
>>   }
>>
>> +/*
>> + * Here we (ab)use a threaded interrupt handler to stay running
>> + * for as long as the touchscreen remains pressed, we report
>> + * a new event with the latest data and then sleep until the
>> + * next timer tick. This mirrors the behavior of the old
>> + * driver, with much less code.
>> + */
>> +static irqreturn_t exynos_ts_isr(int irq, void *dev_id)
>> +{
>> +    struct exynos_adc *info = dev_id;
>> +    struct iio_dev *dev = dev_get_drvdata(info->dev);
>> +    u32 x, y;
>> +    bool pressed;
>> +    int ret;
>> +
>> +    do {
>> +        ret =exynos_read_s3c64xx_ts(dev, NULL, &x, &y, IIO_CHAN_INFO_RAW);
> = exynos
>> +        if (ret == -ETIMEDOUT)
>> +            break;
>> +
>> +        pressed = x & y & ADC_DATX_PRESSED;
>> +        if (!pressed)
>> +            break;
>> +
>> +        input_report_abs(info->input, ABS_X, x & ADC_DATX_MASK);
>> +        input_report_abs(info->input, ABS_Y, y & ADC_DATX_MASK);
>> +        input_report_key(info->input, BTN_TOUCH, 1);
>> +        input_sync(info->input);
>> +
>> +        msleep(1);
>> +    } while (1);
>> +
>> +    input_report_key(info->input, BTN_TOUCH, 0);
>> +    input_sync(info->input);
>> +
>> +    writel(0, ADC_V1_CLRINTPNDNUP(info->regs));
>> +
>> +    return IRQ_HANDLED;
>> +}
>> +
>>   static int exynos_adc_reg_access(struct iio_dev *indio_dev,
>>                     unsigned reg, unsigned writeval,
>>                     unsigned *readval)
>> @@ -457,12 +552,57 @@ static int exynos_adc_remove_devices(struct device *dev, void *c)
>>       return 0;
>>   }
>>
>> +static int exynos_adc_ts_init(struct exynos_adc *info)
>> +{
>> +    int ret;
>> +
>> +    info->input = input_allocate_device();
>> +    if (!info->input)
>> +        return -ENOMEM;
>> +
>> +    info->input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
>> +    info->input->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
>> +
>> +    input_set_abs_params(info->input, ABS_X, 0, 0x3FF, 0, 0);
>> +    input_set_abs_params(info->input, ABS_Y, 0, 0x3FF, 0, 0);
>> +
>> +    /* data from s3c2410_ts driver */
>> +    info->input->name = "S3C24xx TouchScreen";
>> +    info->input->id.bustype = BUS_HOST;
>> +    info->input->id.vendor = 0xDEAD;
>> +    info->input->id.product = 0xBEEF;
>> +    info->input->id.version = 0x0200;
>> +
>> +    ret = input_register_device(info->input);
>> +    if (ret) {
>> +        input_free_device(info->input);
>> +        goto err;
>> +    }
>> +
>> +    if (info->tsirq > 0)
>> +        ret = request_threaded_irq(info->irq, NULL, exynos_ts_isr,
>> +                    0, "touchscreen", info);
> info->tsirq
> (that had me really confused for a moment ;)
> Also, perhaps a more specific name.  touchscreen_updown or similar as the
> main interrupt is also used during touchscreen operation.
>> +    if (ret < 0) {
>> +        dev_err(info->dev, "failed requesting touchsccreen irq, irq = %d\n",
>> +                            info->irq);
>> +        goto err_input;
>> +    }
>> +
>> +    return 0;
>> +
>> +err_input:
>> +    input_unregister_device(info->input);
>> +err:
>> +    return ret;
>> +}
>> +
>>   static int exynos_adc_probe(struct platform_device *pdev)
>>   {
>>       struct exynos_adc *info = NULL;
>>       struct device_node *np = pdev->dev.of_node;
>>       struct iio_dev *indio_dev = NULL;
>>       struct resource    *mem;
>> +    bool has_ts;
>>       int ret = -ENODEV;
>>       int irq;
>>
>> @@ -498,8 +638,14 @@ static int exynos_adc_probe(struct platform_device *pdev)
>>           dev_err(&pdev->dev, "no irq resource?\n");
>>           return irq;
>>       }
>> -
>>       info->irq = irq;
>> +
>> +    irq = platform_get_irq(pdev, 1);
>> +    if (irq == -EPROBE_DEFER)
>> +        return irq;
>> +
>> +    info->tsirq = irq;
>> +
>>       info->dev = &pdev->dev;
>>
>>       init_completion(&info->completion);
>> @@ -565,6 +711,12 @@ static int exynos_adc_probe(struct platform_device *pdev)
>>       if (info->data->init_hw)
>>           info->data->init_hw(info);
>>
>> +    has_ts = of_property_read_bool(pdev->dev.of_node, "has-touchscreen");
>> +    if (has_ts)
>> +        ret = exynos_adc_ts_init(info);
>> +    if (ret)
>> +        goto err_iio;
>> +
>>       ret = of_platform_populate(np, exynos_adc_match, NULL, &indio_dev->dev);
>>       if (ret < 0) {
>>           dev_err(&pdev->dev, "failed adding child nodes\n");
>> @@ -576,6 +728,11 @@ static int exynos_adc_probe(struct platform_device *pdev)
>>   err_of_populate:
>>       device_for_each_child(&indio_dev->dev, NULL,
>>                   exynos_adc_remove_devices);
>> +    if (has_ts) {
>> +        input_unregister_device(info->input);
>> +        free_irq(info->tsirq, info);
>> +    }
>> +err_iio:
>>       iio_device_unregister(indio_dev);
>>   err_irq:
>>       free_irq(info->irq, info);
>> @@ -595,9 +752,12 @@ static int exynos_adc_remove(struct platform_device *pdev)
>>       struct iio_dev *indio_dev = platform_get_drvdata(pdev);
>>       struct exynos_adc *info = iio_priv(indio_dev);
>>
>> +    input_free_device(info->input);
>>       device_for_each_child(&indio_dev->dev, NULL,
>>                   exynos_adc_remove_devices);
>>       iio_device_unregister(indio_dev);
>> +    if (info->tsirq > 0)
>> +        free_irq(info->tsirq, info);
>>       free_irq(info->irq, info);
>>       if (info->data->exit_hw)
>>           info->data->exit_hw(info);
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" 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: Add support for Wacom protocol 4 serial tablets
From: Hans de Goede @ 2014-07-20 14:23 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Julian Squires, linux-input
In-Reply-To: <20140719230807.GA19006@core.coreip.homeip.net>

Hi,

On 07/20/2014 01:08 AM, Dmitry Torokhov wrote:
> Hi Hans,
> 
> On Sat, Jul 19, 2014 at 06:38:40PM +0200, Hans de Goede wrote:
>> Recent version of xf86-input-wacom no longer support directly accessing
>> serial tablets. Instead xf86-input-wacom now expects all wacom tablets to
>> be driven by the kernel and to show up as evdev devices.
>>
>> This has caused old serial Wacom tablets to stop working for people who still
>> have such tablets. Julian Squires has written a serio input driver to fix this:
>> https://github.com/tokenrove/wacom-serial-iv
>>
>> This is a cleaned up version of this driver with improved Graphire support
>> (I own an old Graphire myself).
>>
>> Signed-off-by: Julian Squires <julian@cipht.net>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>  MAINTAINERS                          |   7 +
>>  drivers/input/tablet/Kconfig         |  12 +
>>  drivers/input/tablet/Makefile        |   1 +
>>  drivers/input/tablet/wacom_serial4.c | 600 +++++++++++++++++++++++++++++++++++
>>  include/uapi/linux/serio.h           |   1 +
>>  5 files changed, 621 insertions(+)
>>  create mode 100644 drivers/input/tablet/wacom_serial4.c
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 1629ac9..1128b57 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -9855,6 +9855,13 @@ M:	Pierre Ossman <pierre@ossman.eu>
>>  S:	Maintained
>>  F:	drivers/mmc/host/wbsd.*
>>  
>> +WACOM PROTOCOL 4 SERIAL TABLETS
>> +M:	Julian Squires <julian@cipht.net>
>> +M:	Hans de Goede <hdegoede@redhat.com>
>> +L:	linux-input@vger.kernel.org
>> +S:	Maintained
>> +F:	drivers/input/tablet/wacom_serial4.c
>> +
>>  WATCHDOG DEVICE DRIVERS
>>  M:	Wim Van Sebroeck <wim@iguana.be>
>>  L:	linux-watchdog@vger.kernel.org
>> diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig
>> index bed7cbf..d7c764a 100644
>> --- a/drivers/input/tablet/Kconfig
>> +++ b/drivers/input/tablet/Kconfig
>> @@ -89,4 +89,16 @@ config TABLET_USB_WACOM
>>  	  To compile this driver as a module, choose M here: the
>>  	  module will be called wacom.
>>  
>> +config TABLET_SERIAL_WACOM4
>> +	tristate "Wacom protocol 4 serial tablet support"
>> +	select SERIO
>> +	help
>> +	  Say Y here if you want to use Wacom protocol 4 serial tablets.
>> +	  E.g. serial versions of the Cintiq, Graphire or Penpartner.
>> +	  Make sure to say Y to "Mouse support" (CONFIG_INPUT_MOUSEDEV) and/or
>> +	  "Event interface support" (CONFIG_INPUT_EVDEV) as well.
> 
> Do we really need mousedev for wacom to work?

No I don't think so I just copy and pasted this from the other tablet
Kconfig options, I'll drop it in v2.

>> +
>> +	  To compile this driver as a module, choose M here: the
>> +	  module will be called wacom_serial4.
>> +
>>  endif
>> diff --git a/drivers/input/tablet/Makefile b/drivers/input/tablet/Makefile
>> index 3f6c252..4d9339f 100644
>> --- a/drivers/input/tablet/Makefile
>> +++ b/drivers/input/tablet/Makefile
>> @@ -11,3 +11,4 @@ obj-$(CONFIG_TABLET_USB_GTCO)	+= gtco.o
>>  obj-$(CONFIG_TABLET_USB_HANWANG) += hanwang.o
>>  obj-$(CONFIG_TABLET_USB_KBTAB)	+= kbtab.o
>>  obj-$(CONFIG_TABLET_USB_WACOM)	+= wacom.o
>> +obj-$(CONFIG_TABLET_SERIAL_WACOM4) += wacom_serial4.o
>> diff --git a/drivers/input/tablet/wacom_serial4.c b/drivers/input/tablet/wacom_serial4.c
>> new file mode 100644
>> index 0000000..587e47c
>> --- /dev/null
>> +++ b/drivers/input/tablet/wacom_serial4.c
>> @@ -0,0 +1,600 @@
>> +/*
>> + * Wacom protocol 4 serial tablet driver
>> + *
>> + * Copyright 2014      Hans de Goede <hdegoede@redhat.com>
>> + * Copyright 2011-2012 Julian Squires <julian@cipht.net>
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms of the GNU General Public License as published by the
>> + * Free Software Foundation; either version of 2 of the License, or (at your
>> + * option) any later version. See the file COPYING in the main directory of
>> + * this archive for more details.
>> + *
>> + * Many thanks to Bill Seremetis, without whom PenPartner support
>> + * would not have been possible. Thanks to Patrick Mahoney.
>> + *
>> + * This driver was developed with reference to much code written by others,
>> + * particularly:
>> + *  - elo, gunze drivers by Vojtech Pavlik <vojtech@ucw.cz>;
>> + *  - wacom_w8001 driver by Jaya Kumar <jayakumar.lkml@gmail.com>;
>> + *  - the USB wacom input driver, credited to many people
>> + *    (see drivers/input/tablet/wacom.h);
>> + *  - new and old versions of linuxwacom / xf86-input-wacom credited to
>> + *    Frederic Lepied, France. <Lepied@XFree86.org> and
>> + *    Ping Cheng, Wacom. <pingc@wacom.com>;
>> + *  - and xf86wacom.c (a presumably ancient version of the linuxwacom code),
>> + *    by Frederic Lepied and Raph Levien <raph@gtk.org>.
>> + *
>> + * To do:
>> + *  - support pad buttons; (requires access to a model with pad buttons)
>> + *  - support (protocol 4-style) tilt (requires access to a > 1.4 rom model)
>> + */
>> +
>> +/*
>> + * Wacom serial protocol 4 documentation taken from linuxwacom-0.9.9 code,
>> + * protocol 4 uses 7 or 9 byte of data in the following format:
>> + *
>> + *	Byte 1
>> + *	bit 7  Sync bit always 1
>> + *	bit 6  Pointing device detected
>> + *	bit 5  Cursor = 0 / Stylus = 1
>> + *	bit 4  Reserved
>> + *	bit 3  1 if a button on the pointing device has been pressed
>> + *	bit 2  P0 (optional)
>> + *	bit 1  X15
>> + *	bit 0  X14
>> + *
>> + *	Byte 2
>> + *	bit 7  Always 0
>> + *	bits 6-0 = X13 - X7
>> + *
>> + *	Byte 3
>> + *	bit 7  Always 0
>> + *	bits 6-0 = X6 - X0
>> + *
>> + *	Byte 4
>> + *	bit 7  Always 0
>> + *	bit 6  B3
>> + *	bit 5  B2
>> + *	bit 4  B1
>> + *	bit 3  B0
>> + *	bit 2  P1 (optional)
>> + *	bit 1  Y15
>> + *	bit 0  Y14
>> + *
>> + *	Byte 5
>> + *	bit 7  Always 0
>> + *	bits 6-0 = Y13 - Y7
>> + *
>> + *	Byte 6
>> + *	bit 7  Always 0
>> + *	bits 6-0 = Y6 - Y0
>> + *
>> + *	Byte 7
>> + *	bit 7 Always 0
>> + *	bit 6  Sign of pressure data; or wheel-rel for cursor tool
>> + *	bit 5  P7; or REL1 for cursor tool
>> + *	bit 4  P6; or REL0 for cursor tool
>> + *	bit 3  P5
>> + *	bit 2  P4
>> + *	bit 1  P3
>> + *	bit 0  P2
>> + *
>> + *	byte 8 and 9 are optional and present only
>> + *	in tilt mode.
>> + *
>> + *	Byte 8
>> + *	bit 7 Always 0
>> + *	bit 6 Sign of tilt X
>> + *	bit 5  Xt6
>> + *	bit 4  Xt5
>> + *	bit 3  Xt4
>> + *	bit 2  Xt3
>> + *	bit 1  Xt2
>> + *	bit 0  Xt1
>> + *
>> + *	Byte 9
>> + *	bit 7 Always 0
>> + *	bit 6 Sign of tilt Y
>> + *	bit 5  Yt6
>> + *	bit 4  Yt5
>> + *	bit 3  Yt4
>> + *	bit 2  Yt3
>> + *	bit 1  Yt2
>> + *	bit 0  Yt1
>> + *
>> + *	For more info see:
>> + *	http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Serial_Protocol_IV
> 
> It looks this link is stale.

Already? I added that myself recently, Ah well the comment itself contains 99% of the info
so lets just drop the link.

> 
>> + */
>> +
>> +#include <linux/completion.h>
>> +#include <linux/init.h>
>> +#include <linux/input.h>
>> +#include <linux/interrupt.h>
>> +#include <linux/kernel.h>
>> +#include <linux/module.h>
>> +#include <linux/serio.h>
>> +#include <linux/slab.h>
>> +#include <linux/string.h>
>> +#include "wacom_wac.h"
>> +
>> +MODULE_AUTHOR("Julian Squires <julian@cipht.net>, Hans de Goede <hdegoede@redhat.com>");
>> +MODULE_DESCRIPTION("Wacom protocol 4 serial tablet driver");
>> +MODULE_LICENSE("GPL");
>> +
>> +#define REQUEST_MODEL_AND_ROM_VERSION	"~#"
>> +#define REQUEST_MAX_COORDINATES		"~C\r"
>> +#define REQUEST_CONFIGURATION_STRING	"~R\r"
>> +#define REQUEST_RESET_TO_PROTOCOL_IV	"\r#"
>> +/* Note: sending "\r$\r" causes at least the Digitizer II to send
>> + * packets in ASCII instead of binary.  "\r#" seems to undo that. */
>> +
>> +#define COMMAND_START_SENDING_PACKETS		"ST\r"
>> +#define COMMAND_STOP_SENDING_PACKETS		"SP\r"
>> +#define COMMAND_MULTI_MODE_INPUT		"MU1\r"
>> +#define COMMAND_ORIGIN_IN_UPPER_LEFT		"OC1\r"
>> +#define COMMAND_ENABLE_ALL_MACRO_BUTTONS	"~M0\r"
>> +#define COMMAND_DISABLE_GROUP_1_MACRO_BUTTONS	"~M1\r"
>> +#define COMMAND_TRANSMIT_AT_MAX_RATE		"IT0\r"
>> +#define COMMAND_DISABLE_INCREMENTAL_MODE	"IN0\r"
>> +#define COMMAND_ENABLE_CONTINUOUS_MODE		"SR\r"
>> +#define COMMAND_ENABLE_PRESSURE_MODE		"PH1\r"
>> +#define COMMAND_Z_FILTER			"ZF1\r"
>> +
>> +/* Note that this is a protocol 4 packet without tilt information. */
>> +#define PACKET_LENGTH		7
>> +#define DATA_SIZE		32
>> +
>> +/* flags */
>> +#define F_COVERS_SCREEN		0x01
>> +#define F_HAS_STYLUS2		0x02
>> +#define F_HAS_SCROLLWHEEL	0x04
>> +
>> +enum { STYLUS = 1, ERASER, CURSOR };
>> +struct { int device_id; int input_id; } tools[] = {
>> +	{ 0, 0 },
>> +	{ STYLUS_DEVICE_ID, BTN_TOOL_PEN },
>> +	{ ERASER_DEVICE_ID, BTN_TOOL_RUBBER },
>> +	{ CURSOR_DEVICE_ID, BTN_TOOL_MOUSE },
>> +};
>> +
>> +struct wacom {
>> +	struct input_dev *dev;
>> +	struct completion cmd_done;
>> +	int expect;
>> +	int result;
> 
> I think these 2 should be u8.

Result gets set to 0, or things like -ENODEV. So it should
stay an int, your right about expect though.

> 
>> +	int extra_z_bits;
>> +	int eraser_mask;
>> +	int flags;
>> +	int res_x, res_y;
>> +	int max_x, max_y;
>> +	int tool;
>> +	int idx;
> 
> And these are unsigned ints.

Fixed.

>> +	unsigned char data[DATA_SIZE];
>> +	char phys[32];
>> +};
>> +
>> +enum {
>> +	MODEL_CINTIQ		= 0x504C, /* PL */
>> +	MODEL_CINTIQ2		= 0x4454, /* DT */
>> +	MODEL_DIGITIZER_II	= 0x5544, /* UD */
>> +	MODEL_GRAPHIRE		= 0x4554, /* ET */
>> +	MODEL_PENPARTNER	= 0x4354, /* CT */
>> +};
>> +
>> +static void handle_model_response(struct wacom *wacom)
>> +{
>> +	int major_v, minor_v, r = 0;
>> +	char *p;
>> +
>> +	p = strrchr(wacom->data, 'V');
>> +	if (p)
>> +		r = sscanf(p + 1, "%u.%u", &major_v, &minor_v);
>> +	if (r != 2)
>> +		major_v = minor_v = 0;
>> +
>> +	switch (wacom->data[2] << 8 | wacom->data[3]) {
>> +	case MODEL_CINTIQ:	/* UNTESTED */
>> +	case MODEL_CINTIQ2:
>> +		if ((wacom->data[2] << 8 | wacom->data[3]) == MODEL_CINTIQ) {
>> +			wacom->dev->name = "Wacom Cintiq";
>> +			wacom->dev->id.version = MODEL_CINTIQ;
>> +		} else {
>> +			wacom->dev->name = "Wacom Cintiq II";
>> +			wacom->dev->id.version = MODEL_CINTIQ2;
>> +		}
>> +		wacom->res_x = 508;
>> +		wacom->res_y = 508;
>> +		switch (wacom->data[5]<<8 | wacom->data[6]) {
>> +		case 0x3731: /* PL-710 */
>> +			wacom->res_x = 2540;
>> +			wacom->res_y = 2540;
>> +			/* fall through */
>> +		case 0x3535: /* PL-550 */
>> +		case 0x3830: /* PL-800 */
>> +			wacom->extra_z_bits = 2;
>> +		}
>> +		wacom->flags = F_COVERS_SCREEN;
>> +		break;
>> +	case MODEL_PENPARTNER:
>> +		wacom->dev->name = "Wacom Penpartner";
>> +		wacom->dev->id.version = MODEL_PENPARTNER;
>> +		wacom->res_x = 1000;
>> +		wacom->res_y = 1000;
>> +		break;
>> +	case MODEL_GRAPHIRE:
>> +		wacom->dev->name = "Wacom Graphire";
>> +		wacom->dev->id.version = MODEL_GRAPHIRE;
>> +		wacom->res_x = 1016;
>> +		wacom->res_y = 1016;
>> +		wacom->max_x = 5103;
>> +		wacom->max_y = 3711;
>> +		wacom->extra_z_bits = 2;
>> +		wacom->eraser_mask = 0x08;
>> +		wacom->flags = F_HAS_STYLUS2 | F_HAS_SCROLLWHEEL;
>> +		break;
>> +	case MODEL_DIGITIZER_II:
>> +		wacom->dev->name = "Wacom Digitizer II";
>> +		wacom->dev->id.version = MODEL_DIGITIZER_II;
>> +		if (major_v == 1 && minor_v <= 2)
>> +			wacom->extra_z_bits = 0; /* UNTESTED */
>> +		break;
>> +	default:
>> +		dev_err(&wacom->dev->dev, "Unsupported Wacom model %s\n",
>> +			wacom->data);
>> +		wacom->result = -ENODEV;
>> +		return;
>> +	}
>> +	dev_info(&wacom->dev->dev, "%s tablet, version %u.%u\n",
>> +		 wacom->dev->name, major_v, minor_v);
>> +}
>> +
>> +static void handle_configuration_response(struct wacom *wacom)
>> +{
>> +	int r, skip;
>> +
>> +	dev_dbg(&wacom->dev->dev, "Configuration string: %s\n", wacom->data);
>> +	r = sscanf(wacom->data, "~R%x,%u,%u,%u,%u", &skip, &skip, &skip,
>> +		   &wacom->res_x, &wacom->res_y);
>> +	if (r != 5)
>> +		dev_warn(&wacom->dev->dev, "could not get resolution\n");
>> +}
>> +
>> +static void handle_coordinates_response(struct wacom *wacom)
>> +{
>> +	int r;
>> +
>> +	dev_dbg(&wacom->dev->dev, "Coordinates string: %s\n", wacom->data);
>> +	r = sscanf(wacom->data, "~C%u,%u", &wacom->max_x, &wacom->max_y);
>> +	if (r != 2)
>> +		dev_warn(&wacom->dev->dev, "could not get max coordinates\n");
>> +}
>> +
>> +static void handle_response(struct wacom *wacom)
>> +{
>> +	if (wacom->data[0] != '~' || wacom->data[1] != wacom->expect) {
>> +		dev_err(&wacom->dev->dev,
>> +			"Wacom got an unexpected response: %s\n", wacom->data);
>> +		wacom->result = -EIO;
>> +		complete(&wacom->cmd_done);
>> +		return;
>> +	}
>> +
>> +	wacom->result = 0;
>> +
>> +	switch (wacom->data[1]) {
>> +	case '#':
>> +		handle_model_response(wacom);
>> +		break;
>> +	case 'R':
>> +		handle_configuration_response(wacom);
>> +		break;
>> +	case 'C':
>> +		handle_coordinates_response(wacom);
>> +		break;
>> +	}
>> +
>> +	complete(&wacom->cmd_done);
>> +}
>> +
>> +static void handle_packet(struct wacom *wacom)
>> +{
>> +	int in_proximity_p, stylus_p, button, x, y, z;
>> +	int tool;
>> +
>> +	in_proximity_p = wacom->data[0] & 0x40;
>> +	stylus_p = wacom->data[0] & 0x20;
>> +	button = (wacom->data[3] & 0x78) >> 3;
>> +	x = (wacom->data[0] & 3) << 14 | wacom->data[1]<<7 | wacom->data[2];
>> +	y = (wacom->data[3] & 3) << 14 | wacom->data[4]<<7 | wacom->data[5];
>> +
>> +	if (in_proximity_p && stylus_p) {
>> +		z = wacom->data[6] & 0x7f;
>> +		if (wacom->extra_z_bits >= 1)
>> +			z = z << 1 | (wacom->data[3] & 0x4) >> 2;
>> +		if (wacom->extra_z_bits > 1)
>> +			z = z << 1 | (wacom->data[0] & 0x4) >> 2;
>> +		z = z ^ (0x40 << wacom->extra_z_bits);
>> +	} else {
>> +		z = -1;
> 
> I do not believe it is nice to send -1 as pressure. What does it even
> mean to userspace? Does wacom_usb do this as well?

Yes, e.g. take a look at wacom_wac.c line 53 .

I'll send a v2 with all other remarks fixed, thanks for the review.

Regards,

Hans

^ permalink raw reply

* [PATCH v2] input: Add support for Wacom protocol 4 serial tablets
From: Hans de Goede @ 2014-07-20 14:46 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Julian Squires, linux-input, Hans de Goede

Recent version of xf86-input-wacom no longer support directly accessing
serial tablets. Instead xf86-input-wacom now expects all wacom tablets to
be driven by the kernel and to show up as evdev devices.

This has caused old serial Wacom tablets to stop working for people who still
have such tablets. Julian Squires has written a serio input driver to fix this:
https://github.com/tokenrove/wacom-serial-iv

This is a cleaned up version of this driver with improved Graphire support
(I own an old Graphire myself).

Signed-off-by: Julian Squires <julian@cipht.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

--
Changes in v2:
-Drop text about MOUSEDEV from Kconfig help
-Drop broken URL from comment documenting the protocol
-Change a number of data types in struct wacom to more appropriate types
---
 MAINTAINERS                          |   7 +
 drivers/input/tablet/Kconfig         |  10 +
 drivers/input/tablet/Makefile        |   1 +
 drivers/input/tablet/wacom_serial4.c | 598 +++++++++++++++++++++++++++++++++++
 include/uapi/linux/serio.h           |   1 +
 5 files changed, 617 insertions(+)
 create mode 100644 drivers/input/tablet/wacom_serial4.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 1629ac9..1128b57 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9855,6 +9855,13 @@ M:	Pierre Ossman <pierre@ossman.eu>
 S:	Maintained
 F:	drivers/mmc/host/wbsd.*
 
+WACOM PROTOCOL 4 SERIAL TABLETS
+M:	Julian Squires <julian@cipht.net>
+M:	Hans de Goede <hdegoede@redhat.com>
+L:	linux-input@vger.kernel.org
+S:	Maintained
+F:	drivers/input/tablet/wacom_serial4.c
+
 WATCHDOG DEVICE DRIVERS
 M:	Wim Van Sebroeck <wim@iguana.be>
 L:	linux-watchdog@vger.kernel.org
diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig
index bed7cbf..a5121b0 100644
--- a/drivers/input/tablet/Kconfig
+++ b/drivers/input/tablet/Kconfig
@@ -89,4 +89,14 @@ config TABLET_USB_WACOM
 	  To compile this driver as a module, choose M here: the
 	  module will be called wacom.
 
+config TABLET_SERIAL_WACOM4
+	tristate "Wacom protocol 4 serial tablet support"
+	select SERIO
+	help
+	  Say Y here if you want to use Wacom protocol 4 serial tablets.
+	  E.g. serial versions of the Cintiq, Graphire or Penpartner.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called wacom_serial4.
+
 endif
diff --git a/drivers/input/tablet/Makefile b/drivers/input/tablet/Makefile
index 3f6c252..4d9339f 100644
--- a/drivers/input/tablet/Makefile
+++ b/drivers/input/tablet/Makefile
@@ -11,3 +11,4 @@ obj-$(CONFIG_TABLET_USB_GTCO)	+= gtco.o
 obj-$(CONFIG_TABLET_USB_HANWANG) += hanwang.o
 obj-$(CONFIG_TABLET_USB_KBTAB)	+= kbtab.o
 obj-$(CONFIG_TABLET_USB_WACOM)	+= wacom.o
+obj-$(CONFIG_TABLET_SERIAL_WACOM4) += wacom_serial4.o
diff --git a/drivers/input/tablet/wacom_serial4.c b/drivers/input/tablet/wacom_serial4.c
new file mode 100644
index 0000000..e85242c
--- /dev/null
+++ b/drivers/input/tablet/wacom_serial4.c
@@ -0,0 +1,598 @@
+/*
+ * Wacom protocol 4 serial tablet driver
+ *
+ * Copyright 2014      Hans de Goede <hdegoede@redhat.com>
+ * Copyright 2011-2012 Julian Squires <julian@cipht.net>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version of 2 of the License, or (at your
+ * option) any later version. See the file COPYING in the main directory of
+ * this archive for more details.
+ *
+ * Many thanks to Bill Seremetis, without whom PenPartner support
+ * would not have been possible. Thanks to Patrick Mahoney.
+ *
+ * This driver was developed with reference to much code written by others,
+ * particularly:
+ *  - elo, gunze drivers by Vojtech Pavlik <vojtech@ucw.cz>;
+ *  - wacom_w8001 driver by Jaya Kumar <jayakumar.lkml@gmail.com>;
+ *  - the USB wacom input driver, credited to many people
+ *    (see drivers/input/tablet/wacom.h);
+ *  - new and old versions of linuxwacom / xf86-input-wacom credited to
+ *    Frederic Lepied, France. <Lepied@XFree86.org> and
+ *    Ping Cheng, Wacom. <pingc@wacom.com>;
+ *  - and xf86wacom.c (a presumably ancient version of the linuxwacom code),
+ *    by Frederic Lepied and Raph Levien <raph@gtk.org>.
+ *
+ * To do:
+ *  - support pad buttons; (requires access to a model with pad buttons)
+ *  - support (protocol 4-style) tilt (requires access to a > 1.4 rom model)
+ */
+
+/*
+ * Wacom serial protocol 4 documentation taken from linuxwacom-0.9.9 code,
+ * protocol 4 uses 7 or 9 byte of data in the following format:
+ *
+ *	Byte 1
+ *	bit 7  Sync bit always 1
+ *	bit 6  Pointing device detected
+ *	bit 5  Cursor = 0 / Stylus = 1
+ *	bit 4  Reserved
+ *	bit 3  1 if a button on the pointing device has been pressed
+ *	bit 2  P0 (optional)
+ *	bit 1  X15
+ *	bit 0  X14
+ *
+ *	Byte 2
+ *	bit 7  Always 0
+ *	bits 6-0 = X13 - X7
+ *
+ *	Byte 3
+ *	bit 7  Always 0
+ *	bits 6-0 = X6 - X0
+ *
+ *	Byte 4
+ *	bit 7  Always 0
+ *	bit 6  B3
+ *	bit 5  B2
+ *	bit 4  B1
+ *	bit 3  B0
+ *	bit 2  P1 (optional)
+ *	bit 1  Y15
+ *	bit 0  Y14
+ *
+ *	Byte 5
+ *	bit 7  Always 0
+ *	bits 6-0 = Y13 - Y7
+ *
+ *	Byte 6
+ *	bit 7  Always 0
+ *	bits 6-0 = Y6 - Y0
+ *
+ *	Byte 7
+ *	bit 7 Always 0
+ *	bit 6  Sign of pressure data; or wheel-rel for cursor tool
+ *	bit 5  P7; or REL1 for cursor tool
+ *	bit 4  P6; or REL0 for cursor tool
+ *	bit 3  P5
+ *	bit 2  P4
+ *	bit 1  P3
+ *	bit 0  P2
+ *
+ *	byte 8 and 9 are optional and present only
+ *	in tilt mode.
+ *
+ *	Byte 8
+ *	bit 7 Always 0
+ *	bit 6 Sign of tilt X
+ *	bit 5  Xt6
+ *	bit 4  Xt5
+ *	bit 3  Xt4
+ *	bit 2  Xt3
+ *	bit 1  Xt2
+ *	bit 0  Xt1
+ *
+ *	Byte 9
+ *	bit 7 Always 0
+ *	bit 6 Sign of tilt Y
+ *	bit 5  Yt6
+ *	bit 4  Yt5
+ *	bit 3  Yt4
+ *	bit 2  Yt3
+ *	bit 1  Yt2
+ *	bit 0  Yt1
+ */
+
+#include <linux/completion.h>
+#include <linux/init.h>
+#include <linux/input.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/serio.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include "wacom_wac.h"
+
+MODULE_AUTHOR("Julian Squires <julian@cipht.net>, Hans de Goede <hdegoede@redhat.com>");
+MODULE_DESCRIPTION("Wacom protocol 4 serial tablet driver");
+MODULE_LICENSE("GPL");
+
+#define REQUEST_MODEL_AND_ROM_VERSION	"~#"
+#define REQUEST_MAX_COORDINATES		"~C\r"
+#define REQUEST_CONFIGURATION_STRING	"~R\r"
+#define REQUEST_RESET_TO_PROTOCOL_IV	"\r#"
+/* Note: sending "\r$\r" causes at least the Digitizer II to send
+ * packets in ASCII instead of binary.  "\r#" seems to undo that. */
+
+#define COMMAND_START_SENDING_PACKETS		"ST\r"
+#define COMMAND_STOP_SENDING_PACKETS		"SP\r"
+#define COMMAND_MULTI_MODE_INPUT		"MU1\r"
+#define COMMAND_ORIGIN_IN_UPPER_LEFT		"OC1\r"
+#define COMMAND_ENABLE_ALL_MACRO_BUTTONS	"~M0\r"
+#define COMMAND_DISABLE_GROUP_1_MACRO_BUTTONS	"~M1\r"
+#define COMMAND_TRANSMIT_AT_MAX_RATE		"IT0\r"
+#define COMMAND_DISABLE_INCREMENTAL_MODE	"IN0\r"
+#define COMMAND_ENABLE_CONTINUOUS_MODE		"SR\r"
+#define COMMAND_ENABLE_PRESSURE_MODE		"PH1\r"
+#define COMMAND_Z_FILTER			"ZF1\r"
+
+/* Note that this is a protocol 4 packet without tilt information. */
+#define PACKET_LENGTH		7
+#define DATA_SIZE		32
+
+/* flags */
+#define F_COVERS_SCREEN		0x01
+#define F_HAS_STYLUS2		0x02
+#define F_HAS_SCROLLWHEEL	0x04
+
+enum { STYLUS = 1, ERASER, CURSOR };
+struct { int device_id; int input_id; } tools[] = {
+	{ 0, 0 },
+	{ STYLUS_DEVICE_ID, BTN_TOOL_PEN },
+	{ ERASER_DEVICE_ID, BTN_TOOL_RUBBER },
+	{ CURSOR_DEVICE_ID, BTN_TOOL_MOUSE },
+};
+
+struct wacom {
+	struct input_dev *dev;
+	struct completion cmd_done;
+	int result;
+	u8 expect;
+	u8 eraser_mask;
+	unsigned int extra_z_bits;
+	unsigned int flags;
+	unsigned int res_x, res_y;
+	unsigned int max_x, max_y;
+	unsigned int tool;
+	unsigned int idx;
+	unsigned char data[DATA_SIZE];
+	char phys[32];
+};
+
+enum {
+	MODEL_CINTIQ		= 0x504C, /* PL */
+	MODEL_CINTIQ2		= 0x4454, /* DT */
+	MODEL_DIGITIZER_II	= 0x5544, /* UD */
+	MODEL_GRAPHIRE		= 0x4554, /* ET */
+	MODEL_PENPARTNER	= 0x4354, /* CT */
+};
+
+static void handle_model_response(struct wacom *wacom)
+{
+	int major_v, minor_v, r = 0;
+	char *p;
+
+	p = strrchr(wacom->data, 'V');
+	if (p)
+		r = sscanf(p + 1, "%u.%u", &major_v, &minor_v);
+	if (r != 2)
+		major_v = minor_v = 0;
+
+	switch (wacom->data[2] << 8 | wacom->data[3]) {
+	case MODEL_CINTIQ:	/* UNTESTED */
+	case MODEL_CINTIQ2:
+		if ((wacom->data[2] << 8 | wacom->data[3]) == MODEL_CINTIQ) {
+			wacom->dev->name = "Wacom Cintiq";
+			wacom->dev->id.version = MODEL_CINTIQ;
+		} else {
+			wacom->dev->name = "Wacom Cintiq II";
+			wacom->dev->id.version = MODEL_CINTIQ2;
+		}
+		wacom->res_x = 508;
+		wacom->res_y = 508;
+		switch (wacom->data[5]<<8 | wacom->data[6]) {
+		case 0x3731: /* PL-710 */
+			wacom->res_x = 2540;
+			wacom->res_y = 2540;
+			/* fall through */
+		case 0x3535: /* PL-550 */
+		case 0x3830: /* PL-800 */
+			wacom->extra_z_bits = 2;
+		}
+		wacom->flags = F_COVERS_SCREEN;
+		break;
+	case MODEL_PENPARTNER:
+		wacom->dev->name = "Wacom Penpartner";
+		wacom->dev->id.version = MODEL_PENPARTNER;
+		wacom->res_x = 1000;
+		wacom->res_y = 1000;
+		break;
+	case MODEL_GRAPHIRE:
+		wacom->dev->name = "Wacom Graphire";
+		wacom->dev->id.version = MODEL_GRAPHIRE;
+		wacom->res_x = 1016;
+		wacom->res_y = 1016;
+		wacom->max_x = 5103;
+		wacom->max_y = 3711;
+		wacom->extra_z_bits = 2;
+		wacom->eraser_mask = 0x08;
+		wacom->flags = F_HAS_STYLUS2 | F_HAS_SCROLLWHEEL;
+		break;
+	case MODEL_DIGITIZER_II:
+		wacom->dev->name = "Wacom Digitizer II";
+		wacom->dev->id.version = MODEL_DIGITIZER_II;
+		if (major_v == 1 && minor_v <= 2)
+			wacom->extra_z_bits = 0; /* UNTESTED */
+		break;
+	default:
+		dev_err(&wacom->dev->dev, "Unsupported Wacom model %s\n",
+			wacom->data);
+		wacom->result = -ENODEV;
+		return;
+	}
+	dev_info(&wacom->dev->dev, "%s tablet, version %u.%u\n",
+		 wacom->dev->name, major_v, minor_v);
+}
+
+static void handle_configuration_response(struct wacom *wacom)
+{
+	int r, skip;
+
+	dev_dbg(&wacom->dev->dev, "Configuration string: %s\n", wacom->data);
+	r = sscanf(wacom->data, "~R%x,%u,%u,%u,%u", &skip, &skip, &skip,
+		   &wacom->res_x, &wacom->res_y);
+	if (r != 5)
+		dev_warn(&wacom->dev->dev, "could not get resolution\n");
+}
+
+static void handle_coordinates_response(struct wacom *wacom)
+{
+	int r;
+
+	dev_dbg(&wacom->dev->dev, "Coordinates string: %s\n", wacom->data);
+	r = sscanf(wacom->data, "~C%u,%u", &wacom->max_x, &wacom->max_y);
+	if (r != 2)
+		dev_warn(&wacom->dev->dev, "could not get max coordinates\n");
+}
+
+static void handle_response(struct wacom *wacom)
+{
+	if (wacom->data[0] != '~' || wacom->data[1] != wacom->expect) {
+		dev_err(&wacom->dev->dev,
+			"Wacom got an unexpected response: %s\n", wacom->data);
+		wacom->result = -EIO;
+		complete(&wacom->cmd_done);
+		return;
+	}
+
+	wacom->result = 0;
+
+	switch (wacom->data[1]) {
+	case '#':
+		handle_model_response(wacom);
+		break;
+	case 'R':
+		handle_configuration_response(wacom);
+		break;
+	case 'C':
+		handle_coordinates_response(wacom);
+		break;
+	}
+
+	complete(&wacom->cmd_done);
+}
+
+static void handle_packet(struct wacom *wacom)
+{
+	u8 in_proximity_p, stylus_p, button;
+	unsigned int tool;
+	int x, y, z;
+
+	in_proximity_p = wacom->data[0] & 0x40;
+	stylus_p = wacom->data[0] & 0x20;
+	button = (wacom->data[3] & 0x78) >> 3;
+	x = (wacom->data[0] & 3) << 14 | wacom->data[1]<<7 | wacom->data[2];
+	y = (wacom->data[3] & 3) << 14 | wacom->data[4]<<7 | wacom->data[5];
+
+	if (in_proximity_p && stylus_p) {
+		z = wacom->data[6] & 0x7f;
+		if (wacom->extra_z_bits >= 1)
+			z = z << 1 | (wacom->data[3] & 0x4) >> 2;
+		if (wacom->extra_z_bits > 1)
+			z = z << 1 | (wacom->data[0] & 0x4) >> 2;
+		z = z ^ (0x40 << wacom->extra_z_bits);
+	} else {
+		z = -1;
+	}
+
+	if (stylus_p)
+		tool = (button & wacom->eraser_mask) ? ERASER : STYLUS;
+	else
+		tool = CURSOR;
+
+	if (tool != wacom->tool && wacom->tool != 0) {
+		input_report_key(wacom->dev, tools[wacom->tool].input_id, 0);
+		input_sync(wacom->dev);
+	}
+	wacom->tool = tool;
+
+	input_report_key(wacom->dev, tools[tool].input_id, in_proximity_p);
+	input_report_abs(wacom->dev, ABS_MISC,
+			 in_proximity_p ? tools[tool].device_id : 0);
+	input_report_abs(wacom->dev, ABS_X, x);
+	input_report_abs(wacom->dev, ABS_Y, y);
+	input_report_abs(wacom->dev, ABS_PRESSURE, z);
+	if (stylus_p) {
+		input_report_key(wacom->dev, BTN_TOUCH, button & 1);
+		input_report_key(wacom->dev, BTN_STYLUS, button & 2);
+		input_report_key(wacom->dev, BTN_STYLUS2, button & 4);
+	} else {
+		input_report_key(wacom->dev, BTN_LEFT, button & 1);
+		input_report_key(wacom->dev, BTN_RIGHT, button & 2);
+		input_report_key(wacom->dev, BTN_MIDDLE, button & 4);
+		/* handle relative wheel for non-stylus device */
+		z = (wacom->data[6] & 0x30) >> 4;
+		if (wacom->data[6] & 0x40)
+			z = -z;
+		input_report_rel(wacom->dev, REL_WHEEL, z);
+	}
+	input_sync(wacom->dev);
+}
+
+static void wacom_clear_data_buf(struct wacom *wacom)
+{
+	memset(wacom->data, 0, DATA_SIZE);
+	wacom->idx = 0;
+}
+
+static irqreturn_t wacom_interrupt(struct serio *serio, unsigned char data,
+				   unsigned int flags)
+{
+	struct wacom *wacom = serio_get_drvdata(serio);
+
+	if (data & 0x80)
+		wacom->idx = 0;
+
+	/*
+	 * We're either expecting a carriage return-terminated ASCII
+	 * response string, or a seven-byte packet with the MSB set on
+	 * the first byte.
+	 *
+	 * Note however that some tablets (the PenPartner, for
+	 * example) don't send a carriage return at the end of a
+	 * command.  We handle these by waiting for timeout.
+	 */
+	if (data == '\r' && !(wacom->data[0] & 0x80)) {
+		handle_response(wacom);
+		wacom_clear_data_buf(wacom);
+		return IRQ_HANDLED;
+	}
+
+	/* Leave place for 0 termination */
+	if (wacom->idx > (DATA_SIZE - 2)) {
+		dev_dbg(&wacom->dev->dev,
+			"throwing away %d bytes of garbage\n", wacom->idx);
+		wacom_clear_data_buf(wacom);
+	}
+	wacom->data[wacom->idx++] = data;
+
+	if (wacom->idx == PACKET_LENGTH && (wacom->data[0] & 0x80)) {
+		handle_packet(wacom);
+		wacom_clear_data_buf(wacom);
+	}
+	return IRQ_HANDLED;
+}
+
+static void wacom_disconnect(struct serio *serio)
+{
+	struct wacom *wacom = serio_get_drvdata(serio);
+
+	serio_close(serio);
+	serio_set_drvdata(serio, NULL);
+	input_unregister_device(wacom->dev);
+	kfree(wacom);
+}
+
+static int wacom_send(struct serio *serio, const char *command)
+{
+	int err = 0;
+
+	for (; !err && *command; command++)
+		err = serio_write(serio, *command);
+
+	return err;
+}
+
+static int send_setup_string(struct wacom *wacom, struct serio *serio)
+{
+	const char *s;
+
+	switch (wacom->dev->id.version) {
+	case MODEL_CINTIQ:	/* UNTESTED */
+		s = COMMAND_ORIGIN_IN_UPPER_LEFT
+			COMMAND_TRANSMIT_AT_MAX_RATE
+			COMMAND_ENABLE_CONTINUOUS_MODE
+			COMMAND_START_SENDING_PACKETS;
+		break;
+	case MODEL_PENPARTNER:
+		s = COMMAND_ENABLE_PRESSURE_MODE
+			COMMAND_START_SENDING_PACKETS;
+		break;
+	default:
+		s = COMMAND_MULTI_MODE_INPUT
+			COMMAND_ORIGIN_IN_UPPER_LEFT
+			COMMAND_ENABLE_ALL_MACRO_BUTTONS
+			COMMAND_DISABLE_GROUP_1_MACRO_BUTTONS
+			COMMAND_TRANSMIT_AT_MAX_RATE
+			COMMAND_DISABLE_INCREMENTAL_MODE
+			COMMAND_ENABLE_CONTINUOUS_MODE
+			COMMAND_Z_FILTER
+			COMMAND_START_SENDING_PACKETS;
+		break;
+	}
+	return wacom_send(serio, s);
+}
+
+static int wacom_send_and_wait(struct wacom *wacom, struct serio *serio,
+	const char *cmd, const char *desc)
+{
+	int err;
+	unsigned long u;
+
+	wacom->expect = cmd[1];
+	init_completion(&wacom->cmd_done);
+	err = wacom_send(serio, cmd);
+	if (err)
+		return err;
+	u = wait_for_completion_timeout(&wacom->cmd_done, HZ);
+	if (u == 0) {
+		/* Timeout, process what we've received. */
+		handle_response(wacom);
+	}
+	wacom->expect = 0;
+	return wacom->result;
+}
+
+static int wacom_setup(struct wacom *wacom, struct serio *serio)
+{
+	int err;
+
+	/* Note that setting the link speed is the job of inputattach.
+	 * We assume that reset negotiation has already happened,
+	 * here. */
+	err = wacom_send_and_wait(wacom, serio, REQUEST_MODEL_AND_ROM_VERSION,
+				  "model and version");
+	if (err)
+		return err;
+
+	if (!(wacom->res_x && wacom->res_y)) {
+		err = wacom_send_and_wait(wacom, serio,
+					  REQUEST_CONFIGURATION_STRING,
+					  "configuration string");
+		if (err)
+			return err;
+	}
+
+	if (!(wacom->max_x && wacom->max_y)) {
+		err = wacom_send_and_wait(wacom, serio,
+					  REQUEST_MAX_COORDINATES,
+					  "coordinates string");
+		if (err)
+			return err;
+	}
+
+	return send_setup_string(wacom, serio);
+}
+
+static int wacom_connect(struct serio *serio, struct serio_driver *drv)
+{
+	struct wacom *wacom;
+	struct input_dev *input_dev;
+	int err = -ENOMEM;
+
+	wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
+	input_dev = input_allocate_device();
+	if (!wacom || !input_dev)
+		goto free_device;
+
+	wacom->dev = input_dev;
+	wacom->extra_z_bits = 1;
+	wacom->eraser_mask = 0x04;
+	wacom->tool = wacom->idx = 0;
+	snprintf(wacom->phys, sizeof(wacom->phys), "%s/input0", serio->phys);
+	input_dev->phys = wacom->phys;
+	input_dev->id.bustype = BUS_RS232;
+	input_dev->id.vendor  = SERIO_WACOM_IV;
+	input_dev->id.product = serio->id.extra;
+	input_dev->dev.parent = &serio->dev;
+
+	input_dev->evbit[0] =
+		BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) | BIT_MASK(EV_REL);
+	set_bit(ABS_MISC, input_dev->absbit);
+	set_bit(BTN_TOOL_PEN, input_dev->keybit);
+	set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
+	set_bit(BTN_TOOL_MOUSE, input_dev->keybit);
+	set_bit(BTN_TOUCH, input_dev->keybit);
+	set_bit(BTN_STYLUS, input_dev->keybit);
+	set_bit(BTN_LEFT, input_dev->keybit);
+	set_bit(BTN_RIGHT, input_dev->keybit);
+	set_bit(BTN_MIDDLE, input_dev->keybit);
+
+	serio_set_drvdata(serio, wacom);
+
+	err = serio_open(serio, drv);
+	if (err)
+		goto free_device;
+
+	err = wacom_setup(wacom, serio);
+	if (err)
+		goto close_serio;
+
+	set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
+	if (!(wacom->flags & F_COVERS_SCREEN))
+		set_bit(INPUT_PROP_POINTER, input_dev->propbit);
+
+	if (wacom->flags & F_HAS_STYLUS2)
+		set_bit(BTN_STYLUS2, input_dev->keybit);
+
+	if (wacom->flags & F_HAS_SCROLLWHEEL)
+		set_bit(REL_WHEEL, input_dev->relbit);
+
+	input_abs_set_res(wacom->dev, ABS_X, wacom->res_x);
+	input_abs_set_res(wacom->dev, ABS_Y, wacom->res_y);
+	input_set_abs_params(wacom->dev, ABS_X, 0, wacom->max_x, 0, 0);
+	input_set_abs_params(wacom->dev, ABS_Y, 0, wacom->max_y, 0, 0);
+	input_set_abs_params(wacom->dev, ABS_PRESSURE, -1,
+			     (1 << (7 + wacom->extra_z_bits)) - 1, 0, 0);
+
+	err = input_register_device(wacom->dev);
+	if (err)
+		goto close_serio;
+
+	return 0;
+
+close_serio:
+	serio_close(serio);
+free_device:
+	serio_set_drvdata(serio, NULL);
+	input_free_device(input_dev);
+	kfree(wacom);
+	return err;
+}
+
+static struct serio_device_id wacom_serio_ids[] = {
+	{
+		.type	= SERIO_RS232,
+		.proto	= SERIO_WACOM_IV,
+		.id	= SERIO_ANY,
+		.extra	= SERIO_ANY,
+	},
+	{ 0 }
+};
+
+MODULE_DEVICE_TABLE(serio, wacom_serio_ids);
+
+static struct serio_driver wacom_drv = {
+	.driver		= {
+		.name	= "wacom_serial4",
+	},
+	.description	= "Wacom protocol 4 serial tablet driver",
+	.id_table	= wacom_serio_ids,
+	.interrupt	= wacom_interrupt,
+	.connect	= wacom_connect,
+	.disconnect	= wacom_disconnect,
+};
+
+module_serio_driver(wacom_drv);
diff --git a/include/uapi/linux/serio.h b/include/uapi/linux/serio.h
index 9f53fa7..becdd78 100644
--- a/include/uapi/linux/serio.h
+++ b/include/uapi/linux/serio.h
@@ -76,5 +76,6 @@
 #define SERIO_HAMPSHIRE	0x3b
 #define SERIO_PS2MULT	0x3c
 #define SERIO_TSC40	0x3d
+#define SERIO_WACOM_IV	0x3e
 
 #endif /* _UAPI_SERIO_H */
-- 
2.0.1


^ permalink raw reply related

* Re: [PATCH] staging: input: sunkbd.c: Fix coding style
From: Joe Perches @ 2014-07-20 15:52 UTC (permalink / raw)
  To: Bivolaru Catalin
  Cc: kernel-janitors, dmitry.torokhov, linux-input, linux-kernel,
	paul.gortmaker
In-Reply-To: <20140720120103.GA5294@kalio-PC>

On Sun, 2014-07-20 at 15:01 +0300, Bivolaru Catalin wrote:
> Fix coding style with regard to missing spaces after , and the column limit
> that was violated after the first change.

Some checkpatch errors should be ignored.

These are some of them.

This change doesn't make it easier to read
or to find any array entry.

It's currently in groups of 16 (0x10).

This change would make it very difficult
to find any particular entry.

It might make some sense to change the last
line to add a trailing "  0,  0" entry as
the compiler does to make it a bit clearer
the table has 128 entries.

> diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
[]
> @@ -42,14 +42,15 @@ MODULE_DESCRIPTION(DRIVER_DESC);
>  MODULE_LICENSE("GPL");
>  
>  static unsigned char sunkbd_keycode[128] = {
> -	  0,128,114,129,115, 59, 60, 68, 61, 87, 62, 88, 63,100, 64,112,
> -	 65, 66, 67, 56,103,119, 99, 70,105,130,131,108,106,  1,  2,  3,
> -	  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 41, 14,110,113, 98, 55,
> -	116,132, 83,133,102, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
> -	 26, 27,111,127, 71, 72, 73, 74,134,135,107,  0, 29, 30, 31, 32,
> -	 33, 34, 35, 36, 37, 38, 39, 40, 43, 28, 96, 75, 76, 77, 82,136,
> -	104,137, 69, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,101,
> -	 79, 80, 81,  0,  0,  0,138, 58,125, 57,126,109, 86, 78
> +	  0, 128, 114, 129, 115,  59,  60,  68,  61,  87,  62,  88,  63, 100,
> +	 64, 112,  65,  66,  67,  56, 103, 119,  99,  70, 105, 130, 131, 108,
> +	106,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
> +	 41,  14, 110, 113,  98,  55, 116, 132,  83, 133, 102,  15,  16,  17,
> +	 18,  19,  20,  21,  22,  23,  24,  25,  26,  27, 111, 127,  71,  72,
> +	 73,  74, 134, 135, 107,   0,  29,  30,  31,  32,  33,  34,  35,  36,
> +	 37,  38,  39,  40,  43,  28,  96,  75,  76,  77,  82, 136, 104, 137,
> +	 69,  42,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54, 101,
> +	 79,  80,  81,   0,   0,   0, 138,  58, 125,  57, 126, 109,  86,  78
>  };



^ permalink raw reply

* Re: [PATCH] Input: fix defuzzing logic
From: Henrik Rydberg @ 2014-07-20 18:19 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input
  Cc: Benson Leung, David Herrmann, Andrew de los Reyes, linux-kernel
In-Reply-To: <20140719234843.GA28580@core.coreip.homeip.net>

Hi Dmitry,

> We attempt to remove noise from coordinates reported by devices in
> input_handle_abs_event(), unfortunately, unless we were dropping the
> event altogether, we were ignoring the adjusted value and were passing
> on the original value instead.
> 
> Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
> Reviewed-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/input/input.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Oh my, that was a bad one.

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

Thanks,
Henrik

^ permalink raw reply

* [RFC PATCH] Input: evdev - drop redundant list-locking
From: David Herrmann @ 2014-07-20 18:48 UTC (permalink / raw)
  To: linux-input; +Cc: Dmitry Torokhov, Henrik Rydberg, David Herrmann

evdev->client_list is rcu-protected. There is no need to have a
separate spinlock just for the list. Either one is good enough, so lets
drop the spinlock.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
Hi

I stumbled across this one when doing some evdev reviews. Maybe I'm missing
something obvious and I should stop coding on Sundays. But the RCU-protection
should be enough here, right?

We _could_ do a synchronize_rcu() during evdev_attach_client() to guarantee that
new events are really delivered once it returns. But that seems rather pedantic
to me.

I'm also not sure why we use RCU here, anyway. I mean, there's no high
contention so a spinlock should be fine and would get rid of the very expensive
synchronize_rcu during close(). But then again, I don't really care enough to
write benchmarks for that..

Thanks
David

 drivers/input/evdev.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 7a25a7a..1f38bd1 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -34,7 +34,6 @@ struct evdev {
 	wait_queue_head_t wait;
 	struct evdev_client __rcu *grab;
 	struct list_head client_list;
-	spinlock_t client_lock; /* protects client_list */
 	struct mutex mutex;
 	struct device dev;
 	struct cdev cdev;
@@ -433,17 +432,13 @@ static int evdev_ungrab(struct evdev *evdev, struct evdev_client *client)
 static void evdev_attach_client(struct evdev *evdev,
 				struct evdev_client *client)
 {
-	spin_lock(&evdev->client_lock);
 	list_add_tail_rcu(&client->node, &evdev->client_list);
-	spin_unlock(&evdev->client_lock);
 }
 
 static void evdev_detach_client(struct evdev *evdev,
 				struct evdev_client *client)
 {
-	spin_lock(&evdev->client_lock);
 	list_del_rcu(&client->node);
-	spin_unlock(&evdev->client_lock);
 	synchronize_rcu();
 }
 
@@ -485,10 +480,10 @@ static void evdev_hangup(struct evdev *evdev)
 {
 	struct evdev_client *client;
 
-	spin_lock(&evdev->client_lock);
-	list_for_each_entry(client, &evdev->client_list, node)
+	rcu_read_lock();
+	list_for_each_entry_rcu(client, &evdev->client_list, node)
 		kill_fasync(&client->fasync, SIGIO, POLL_HUP);
-	spin_unlock(&evdev->client_lock);
+	rcu_read_unlock();
 
 	wake_up_interruptible(&evdev->wait);
 }
@@ -1438,7 +1433,6 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev,
 	}
 
 	INIT_LIST_HEAD(&evdev->client_list);
-	spin_lock_init(&evdev->client_lock);
 	mutex_init(&evdev->mutex);
 	init_waitqueue_head(&evdev->wait);
 	evdev->exist = true;
-- 
2.0.2


^ permalink raw reply related

* Re: [RFC PATCH] Input: evdev - drop redundant list-locking
From: Dmitry Torokhov @ 2014-07-20 18:54 UTC (permalink / raw)
  To: David Herrmann; +Cc: linux-input, Henrik Rydberg
In-Reply-To: <1405882092-7005-1-git-send-email-dh.herrmann@gmail.com>

On Sun, Jul 20, 2014 at 08:48:12PM +0200, David Herrmann wrote:
> evdev->client_list is rcu-protected. There is no need to have a
> separate spinlock just for the list. Either one is good enough, so lets
> drop the spinlock.
> 
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> ---
> Hi
> 
> I stumbled across this one when doing some evdev reviews. Maybe I'm missing
> something obvious and I should stop coding on Sundays. But the RCU-protection
> should be enough here, right?

RCU protection is for traversing list only, writes (as is adding and removing
elements from client_list) still have to be mutually exclusive.

Thanks.

-- 
Dmitry

^ 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