All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derya <derya.kiran@yahoo.de>
To: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com,
	jkosina@suse.cz
Subject: [PATCH 0/2 ] Surface Pro 2 HID sensor, wacom, keyboard/multitouch composite device
Date: Fri, 07 Mar 2014 16:53:32 +0100	[thread overview]
Message-ID: <5319EB7C.5070209@yahoo.de> (raw)

The MS Surface Pro 2 has a very annoying USB composite device on port 2.3.
It has 3 interfaces:
- Interface 0 is the sensor-hub
- Interface 1 is the wacom digitizer² (it's one without finger input, 
there is an atmel digitizer on port 2.4 for finger input)
- Interface 2 is the keyboard, if a keyboard cover is attached.

This USB composite device changes it product id depending if and which 
keyboard cover is attached.
Each of this hid devices contains several collections, this complicated 
everything.
I have uploaded a lsusb output to: http://pastebin.com/Jun5sa2t

I have to say, that I'm neither a developer nor a programmer, this means 
this things are beyond my ken, please excuse if my remarks aren't accurate.

The Touch and Type Covers (2) didn't work out of the box. Someone one 
the ubuntuforums made a patch which adds them to the microsoft special 
driver, but this leads to loading that driver for all the 3 interfaces 
and prevents loading of hid-sensor-hub for interface 0, if a keyboard 
cover is attached. Sadly this patch is submitted to the upstream kernel 
source.
Without that patch the keyboard covers are loading hid-multitouch 
instead of hid-generic. This misbehaviour is a result of the fancy hid 
collections, that the keyboards have. With hid-multitouch neither the 
keyboard nor the touchpad of the cover works². I added an if clause to 
hid_scan_input_usage to prevent loading of hid-multitouch for the 
keyboards. With hid-generic keyboard and touchpad are working (they come 
up as one input)

We also need the HID_QUIRK_NOGET for this usb composite device, without 
it hid-sensor-hub fails with a submit urb failure evertime a keyboard 
cover is (de)attached and it takes some seconds until the keyboard and 
wacom digitizer responds.

The second patch adds HID_SENSOR_HUB_ENUM_QUIRK for the Surface Pro 2's 
sensor-hub. There is still a bug with the sensors and the Surface Pro 2, 
but I didn't dig into it yet (hid-sensor-magn-3d fails to setup attributes)

Regards,

Derya



1 I'm also working to get the wacom driver working. At the moment the 
stylus works with hid-generic(if my patch is applied, without it use 
hid-microsoft). I got it working with wacom driver without disturbing 
the other interfaces, but the wacom interface contains also some fancy 
collection. The wacom driver doesn't care of them, this leads to losing 
the on device volume and left meta keys. With hid-generic they work, but 
the input events get distorted after the use of the eraser. But, this is 
another story...

2 @Benjamin Tissoires
I have tried your patches for fancy collection in hid-multitouch. It 
seems to be the right way to solve the problem with the keyboard (better 
than my approach to exclude this devices in hid_scan_input_usage), but 
it has the some drawbacks at the moment. It splits the input into 5 
pieces. 2 seperate keyboard inputs that leads into losing the caps lock 
led. The touchpad is mapped as a mouse. There is also a consumer device, 
which gives me no input and an unkown device, but no multitouch device. 
There is a HID_DG_INPUTMODE out of range error in dmesg. Please, contact 
me, if you need some logs.



--
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

             reply	other threads:[~2014-03-07 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 15:53 Derya [this message]
2014-03-07 15:56 ` [PATCH 1/2 ] Surface Pro 2 HID sensor, wacom, keyboard/multitouch composite device Derya
2014-03-07 17:00   ` Benjamin Tissoires
2014-03-07 15:58 ` [PATCH 2/2 " Derya
2014-03-07 17:01   ` Benjamin Tissoires
2014-03-07 17:57     ` Derya
2014-03-07 16:51 ` [PATCH 0/2 " Benjamin Tissoires
2014-03-07 17:50   ` Derya
2014-03-07 17:56     ` Benjamin Tissoires
2014-03-07 18:20 ` Tolga Cakir

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=5319EB7C.5070209@yahoo.de \
    --to=derya.kiran@yahoo.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.