GitHub/LineageOS/android_kernel_motorola_exynos9610.git
10 years agoMerge branches 'for-3.15/multitouch', 'for-3.15/sony' and 'for-3.15/uhid' into for...
Jiri Kosina [Tue, 1 Apr 2014 17:06:50 +0000 (19:06 +0200)]
Merge branches 'for-3.15/multitouch', 'for-3.15/sony' and 'for-3.15/uhid' into for-linus

10 years agoMerge branch 'for-3.15/microsoft' into for-linus
Jiri Kosina [Tue, 1 Apr 2014 17:06:41 +0000 (19:06 +0200)]
Merge branch 'for-3.15/microsoft' into for-linus

Conflicts:
drivers/hid/hid-core.c

10 years agoMerge branch 'for-3.15/hid-sensor-hub' into for-linus
Jiri Kosina [Tue, 1 Apr 2014 17:05:30 +0000 (19:05 +0200)]
Merge branch 'for-3.15/hid-sensor-hub' into for-linus

10 years agoMerge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-linus
Jiri Kosina [Tue, 1 Apr 2014 17:05:09 +0000 (19:05 +0200)]
Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-linus

Conflicts:
drivers/hid/hid-ids.h
drivers/hid/hid-sony.c
drivers/hid/i2c-hid/i2c-hid.c

10 years agoMerge branch 'for-3.15/i2c-hid' into for-linus
Jiri Kosina [Tue, 1 Apr 2014 16:56:31 +0000 (18:56 +0200)]
Merge branch 'for-3.15/i2c-hid' into for-linus

10 years agoMerge branch 'for-3.15/ll-driver-new-callbacks' into for-linus
Jiri Kosina [Tue, 1 Apr 2014 16:56:24 +0000 (18:56 +0200)]
Merge branch 'for-3.15/ll-driver-new-callbacks' into for-linus

10 years agoMerge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/sony
Jiri Kosina [Tue, 1 Apr 2014 16:45:27 +0000 (18:45 +0200)]
Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/sony

10 years agoHID: sony: Set the quriks flag for Bluetooth controllers
Frank Praznik [Sat, 15 Mar 2014 13:41:16 +0000 (09:41 -0400)]
HID: sony: Set the quriks flag for Bluetooth controllers

The Sixaxis and DualShock 4 want HID output reports sent on the control
endpoint when connected via Bluetooth.  Set the
HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP flag for these devices so hidraw write()
works properly.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Fix Sixaxis cable state detection
Frank Praznik [Sat, 15 Mar 2014 13:41:15 +0000 (09:41 -0400)]
HID: sony: Fix Sixaxis cable state detection

Byte 31 of the Sixaxis report can change depending on whether or not the
controller is rumbling.  Using bit 3 is the only reliable way to detect the
state of the cable regardless of rumble activity.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: uhid: Add UHID_CREATE2 + UHID_INPUT2
Petri Gynther [Mon, 24 Mar 2014 20:50:01 +0000 (13:50 -0700)]
HID: uhid: Add UHID_CREATE2 + UHID_INPUT2

UHID_CREATE2:
HID report descriptor data (rd_data) is an array in struct uhid_create2_req,
instead of a pointer. Enables use from languages that don't support pointers,
e.g. Python.

UHID_INPUT2:
Data array is the last field of struct uhid_input2_req. Enables userspace to
write only the required bytes to kernel (ev.type + ev.u.input2.size + the part
of the data array that matters), instead of the entire struct uhid_input2_req.

Note:
UHID_CREATE2 increases the total size of struct uhid_event slightly, thus
increasing the size of messages that are queued for userspace. However, this
won't affect the userspace processing of these events.

[Jiri Kosina <jkosina@suse.cz>: adjust to hid_get_raw_report() and
hid_output_raw_report() API changes]

Signed-off-by: Petri Gynther <pgynther@google.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hyperv: fix _raw_request() prototype
Jiri Kosina [Sat, 29 Mar 2014 01:40:42 +0000 (18:40 -0700)]
HID: hyperv: fix _raw_request() prototype

The 3rd argument is pointer to the buffer, not a single __u8.
This has no bad sideeffect, as the stub is not using any of its
argument, but better have it correct.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hyperv: Implement a stub raw_request() entry point
K. Y. Srinivasan [Sat, 29 Mar 2014 00:41:27 +0000 (17:41 -0700)]
HID: hyperv: Implement a stub raw_request() entry point

commit 3c86726cfe38 ("HID: make .raw_request mandatory") made .raw_request
mandatory and broke the Hyper-V mouse driver. This patch fixes the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-sensor-hub: fix sleeping function called from invalid context
Srinivas Pandruvada [Mon, 24 Mar 2014 23:25:04 +0000 (16:25 -0700)]
HID: hid-sensor-hub: fix sleeping function called from invalid context

Fix issue with the sleeping calling hid_hw_request under spinlock.
When i2c is used as HID transport, this is calling kmalloc, which
can sleep. So remove call to this function while under spinlock.
 [ 1067.021961] Call Trace:
 [ 1067.021970]  [<ffffffff8192f5f2>] dump_stack+0x4d/0x6f
 [ 1067.021976]  [<ffffffff811109f2>] __might_sleep+0xd2/0xf0
 [ 1067.021981]  [<ffffffff811ea15b>] __kmalloc+0xeb/0x200
 [ 1067.021989]  [<ffffffff816e0cb3>] ? hid_alloc_report_buf+0x23/0x30
 [ 1067.021993]  [<ffffffff816e0cb3>] hid_alloc_report_buf+0x23/0x30
 [ 1067.021997]  [<ffffffff816f4cb7>] i2c_hid_request+0x57/0x110
 [ 1067.022006]  [<ffffffffa02bc61c>] sensor_hub_input_attr_get_raw_value+0xbc/0x100 [hid_sensor_hub]

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: multitouch: add support for Win 8.1 multitouch touchpads
Andrew Duggan [Wed, 19 Mar 2014 20:39:03 +0000 (13:39 -0700)]
HID: multitouch: add support for Win 8.1 multitouch touchpads

Multitouch touchpads built for Win 8.1 need to be sent an input mode feature report
in order to start reporting multitouch events. This is the same process sent
to Win 7 multitouch touchscreens except the value of the feature report is 3 for
touchpads.

Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-lg4ff: Support new version of G27
Simon Wood [Thu, 13 Mar 2014 18:42:03 +0000 (12:42 -0600)]
HID: hid-lg4ff: Support new version of G27

It has been reported that there is a new hardware version of the G27
in the 'wild'. This patch add's this new revision so that it can be
sent the command to switch to native mode.

Reported-by: "Ivan Baldo" <ibaldo@adinet.com.uy>
Tested-by: "evilcow" <evilcow93@yahoo.com>
Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: remove hid_output_raw_report transport implementations
Benjamin Tissoires [Sun, 9 Mar 2014 03:52:43 +0000 (22:52 -0500)]
HID: remove hid_output_raw_report transport implementations

Nobody calls hid_output_raw_report anymore, and nobody should.
We can now remove the various implementation in the different
transport drivers and the declarations.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: do not rely on hid_output_raw_report
Benjamin Tissoires [Sun, 9 Mar 2014 03:52:42 +0000 (22:52 -0500)]
HID: sony: do not rely on hid_output_raw_report

hid_out_raw_report is going to be obsoleted as it is not part of the
unified HID low level transport documentation
(Documentation/hid/hid-transport.txt)

To do so, we need to introduce two new quirks:
* HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP: this quirks prevents the
  transport driver to use the interrupt channel to send output report
  (and thus force to use HID_REQ_SET_REPORT command)
* HID_QUIRK_SKIP_OUTPUT_REPORT_ID: this one forces usbhid to not
  include the report ID in the buffer it sends to the device through
  HID_REQ_SET_REPORT in case of an output report

This also fixes a regression introduced in commit 3a75b24949a8
(HID: hidraw: replace hid_output_raw_report() calls by appropriates ones).
The hidraw API was not able to communicate with the PS3 SixAxis
controllers in USB mode.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoMerge branch 'for-3.15/sony' into for-3.15/hid-core-ll-transport-cleanup
Jiri Kosina [Fri, 14 Mar 2014 14:30:16 +0000 (15:30 +0100)]
Merge branch 'for-3.15/sony' into for-3.15/hid-core-ll-transport-cleanup

10 years agoHID: cp2112: remove the last hid_output_raw_report() call
Benjamin Tissoires [Sun, 9 Mar 2014 03:52:41 +0000 (22:52 -0500)]
HID: cp2112: remove the last hid_output_raw_report() call

tests have shown that output reports use hid_hw_output_report().

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: cp2112: remove various hid_out_raw_report calls
Benjamin Tissoires [Sun, 9 Mar 2014 03:52:40 +0000 (22:52 -0500)]
HID: cp2112: remove various hid_out_raw_report calls

hid_out_raw_report is going to be obsoleted as it is not part of the
unified HID low level transport documentation
(Documentation/hid/hid-transport.txt)

  hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT);
is strictly equivalent to:
  hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);

Then replace buf[0] by the appropriate define.

So use the new api.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoMerge branch 'for-3.15/hid-cp2112' into for-3.15/hid-core-ll-transport-cleanup
Jiri Kosina [Fri, 14 Mar 2014 14:27:36 +0000 (15:27 +0100)]
Merge branch 'for-3.15/hid-cp2112' into for-3.15/hid-core-ll-transport-cleanup

10 years agoHID: multitouch: add support of other generic collections in hid-mt
Benjamin Tissoires [Fri, 28 Feb 2014 16:41:25 +0000 (11:41 -0500)]
HID: multitouch: add support of other generic collections in hid-mt

The ANTON Touch Pad is a device which can switch from a multitouch
touchpad to a mouse. It thus presents several generic collections which
are currently ignored by hid-multitouch. Enable them by not ignoring
them in mt_input_mapping.
Adding also a suffix for them depending on their application.

Reported-by: Edel Maks <edelmaks@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: multitouch: remove pen special handling
Benjamin Tissoires [Fri, 28 Feb 2014 16:41:24 +0000 (11:41 -0500)]
HID: multitouch: remove pen special handling

Pens have a special handling in hid-mt as hybrid pen/touch devices
are quite common now. However, some fancy devices presents also
useful collections like mouse or keyboard.
The special case for the pen may not be a special case, and treat it as
a generic case.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: multitouch: remove registered devices with default behavior
Benjamin Tissoires [Fri, 28 Feb 2014 16:41:23 +0000 (11:41 -0500)]
HID: multitouch: remove registered devices with default behavior

The default multitouch protocol class in use since the kernel v3.9 is
working quite well. Since its inclusion, the only devices we had to tweak
were those who really need quirks (GeneralTouch, FocalTech and Wistron,
the 3 of them are Win 7 certified ones).
The flow of new unhandled devices has stopped, which is great and I think
it's time to reduce the list of registered device.

This commit removes only the registration in the kernel of devices that
use the class MT_CLS_DEFAULT, or that can use it. By that, I mean that I
checked all the recordings I have, and the produced input device and
events are the same before and after applying the patch.

This gives two benefits:
- remove a bunch of lines of codes
- prevent bad handling of existing registered devices which are using a
different protocol while using the same VID/PID (I got the case of a
Quanta 3008 recently).

I also removed the associated classes (MT_CLS*). I kept their #define in
case people use the new_id sysfs node with a non standard class (their
should be really few people now, but we never now). This is why there
are /* reserved .... */.

Last, I add a comment on top of mt_devices[] definition to remember people
(and myself) not to include devices for the beauty of it.

To people still trying to add devices with the default class:
"""
Guys, try out your device under a kernel greater or equal to v3.9. If it
works, you are all set. Adding your VID/PID to the kernel only brings us
overload and you won't get anything from it _because_ even a backport of
this shiny patch will _not_ make the device work under 3.0, 3.2, 3.4 or
even 3.8.
So if it works, it works.
If it does not work, then yes, submit a patch or call for help.
In any cases, if you want me to do regression tests, I'd be happy to
get some traces of your device. But I won't patch the kernel if it works.
"""

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hidraw: fix warning destroying hidraw device files after parent
Fernando Luis Vázquez Cao [Wed, 26 Feb 2014 07:51:24 +0000 (16:51 +0900)]
HID: hidraw: fix warning destroying hidraw device files after parent

I noticed that after hot unplugging a Logitech unifying receiver
(drivers/hid/hid-logitech-dj.c) the kernel would occasionally spew a
stack trace similar to this:

usb 1-1.1.2: USB disconnect, device number 7
WARNING: CPU: 0 PID: 2865 at fs/sysfs/group.c:216 device_del+0x40/0x1b0()
sysfs group ffffffff8187fa20 not found for kobject 'hidraw0'
[...]
CPU: 0 PID: 2865 Comm: upowerd Tainted: G        W 3.14.0-rc4 #7
Hardware name: LENOVO 7783PN4/        , BIOS 9HKT43AUS 07/11/2011
 0000000000000009 ffffffff814cd684 ffff880427ccfdf8 ffffffff810616e7
 ffff88041ec61800 ffff880427ccfe48 ffff88041e444d80 ffff880426fab8e8
 ffff880429359960 ffffffff8106174c ffffffff81714b98 0000000000000028
Call Trace:
 [<ffffffff814cd684>] ? dump_stack+0x41/0x51
 [<ffffffff810616e7>] ? warn_slowpath_common+0x77/0x90
 [<ffffffff8106174c>] ? warn_slowpath_fmt+0x4c/0x50
 [<ffffffff81374fd0>] ? device_del+0x40/0x1b0
 [<ffffffff8137516f>] ? device_unregister+0x2f/0x50
 [<ffffffff813751fa>] ? device_destroy+0x3a/0x40
 [<ffffffffa03ca245>] ? drop_ref+0x55/0x120 [hid]
 [<ffffffffa03ca3e6>] ? hidraw_release+0x96/0xb0 [hid]
 [<ffffffff811929da>] ? __fput+0xca/0x210
 [<ffffffff8107fe17>] ? task_work_run+0x97/0xd0
 [<ffffffff810139a9>] ? do_notify_resume+0x69/0xa0
 [<ffffffff814dbd22>] ? int_signal+0x12/0x17
---[ end trace 63f4a46f6566d737 ]---

During device removal hid_disconnect() is called via hid_hw_stop() to
stop the device and free all its resources, including the sysfs
files. The problem is that if a user space process, such as upowerd,
holds a reference to a hidraw file the corresponding sysfs files will
be kept around (drop_ref() does not call device_destroy() if the open
counter is not 0) and it will be usb_disconnect() who, by calling
device_del() for the USB device, will indirectly remove the sysfs
files of the hidraw device (sysfs_remove_dir() is recursive these
days). Because of this, by the time user space releases the last
reference to the hidraw file and drop_ref() tries to destroy the
device the sysfs files are already gone and the kernel will print
the warning above.

Fix this by calling device_destroy() at USB disconnect time.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Cc: stable@vger.kernel.org # 3.13
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hidp: Add a comment that some devices depend on the current behavior of uniq
Frank Praznik [Thu, 20 Feb 2014 16:36:04 +0000 (11:36 -0500)]
HID: hidp: Add a comment that some devices depend on the current behavior of uniq

Add a comment noting that some devices depend on the destination address being
stored in uniq.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Prevent duplicate controller connections.
Frank Praznik [Thu, 20 Feb 2014 16:36:03 +0000 (11:36 -0500)]
HID: sony: Prevent duplicate controller connections.

If a Sixaxis or Dualshock 4 controller is connected via USB while already
connected via Bluetooth it will cause duplicate devices to be added to the
input device list.

To prevent this a global list of controllers and their MAC addresses is
maintained and new controllers are checked against this list.  If a duplicate
is found, the probe function will exit with -EEXIST.

On USB the MAC is retrieved via a feature report.  On Bluetooth neither
controller reports the MAC address in a feature report so the MAC is parsed from
the uniq string.  As uniq cannot be guaranteed to be a MAC address in every case
(uHID or the behavior of HIDP changing) a parsing failure will not prevent the
connection.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Perform a boundry check on the sixaxis battery level index.
Frank Praznik [Thu, 20 Feb 2014 16:36:02 +0000 (11:36 -0500)]
HID: sony: Perform a boundry check on the sixaxis battery level index.

Make sure that an out-of-bounds read doesn't occur in the Sixaxis battery level
lookup table in the event that the controller sends an invalid battery status
value in the report.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Fix work queue issues
Frank Praznik [Thu, 20 Feb 2014 16:36:01 +0000 (11:36 -0500)]
HID: sony: Fix work queue issues

Only initialize force feedback for devices that actually support it (Sixaxis and
Dualshock 4) to prevent calls to schedule_work() with an uninitialized work
queue.

Move the cancel_work_sync() call out of sony_destroy_ff() since the state worker
is used for the LEDs even when force-feedback is disabled.

Remove the sony_destroy_ff() function since it is no longer used.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Fix multi-line comment styling
Frank Praznik [Thu, 20 Feb 2014 16:36:00 +0000 (11:36 -0500)]
HID: sony: Fix multi-line comment styling

Convert multi-line comments to comply with the kernel coding style.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hidraw: replace hid_output_raw_report() calls by appropriates ones
Benjamin Tissoires [Thu, 20 Feb 2014 20:24:50 +0000 (15:24 -0500)]
HID: hidraw: replace hid_output_raw_report() calls by appropriates ones

Remove hid_output_raw_report() call as it is not a ll_driver callbacj,
and switch to the hid_hw_* implementation. USB-HID used to fallback
into SET_REPORT when there were no output interrupt endpoint,
so emulating this if hid_hw_output_report() returns -ENOSYS.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: make .raw_request mandatory
Benjamin Tissoires [Thu, 20 Feb 2014 20:24:49 +0000 (15:24 -0500)]
HID: make .raw_request mandatory

SET_REPORT and GET_REPORT are mandatory in the HID specification.
Make the corresponding API in hid-core mandatory too, which removes the
need to test against it in some various places.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: input: hid-input remove hid_output_raw_report call
Benjamin Tissoires [Thu, 20 Feb 2014 20:24:48 +0000 (15:24 -0500)]
HID: input: hid-input remove hid_output_raw_report call

hid_output_raw_report() is not a ll_driver callback and should not be used.
To keep the same code path than before, we are forced to play with the
different hid_hw_* calls: if the usb or i2c device does not support
direct output reports, then we will rely on the SET_REPORT HID call.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Fix work queue issues.
Frank Praznik [Wed, 19 Feb 2014 18:09:22 +0000 (13:09 -0500)]
HID: sony: Fix work queue issues.

Don't initialize force-feedback for devices that don't support it to avoid calls
to schedule_work() with an uninitialized work_struct.

Move the cancel_work_sync() call out of sony_destroy_ff() since the state worker
is used for the LEDs even when force-feedback is disabled.

Remove sony_destroy_ff() to avoid a compiler warning since it is no longer used.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Enable LED controls and rumble for the Sixaxis on Bluetooth.
Frank Praznik [Tue, 18 Feb 2014 22:22:01 +0000 (17:22 -0500)]
HID: sony: Enable LED controls and rumble for the Sixaxis on Bluetooth.

Add a SIXAXIS_CONTROLLER macro to simplify conditionals where the
connection type is irrelevant.

Enable the LED and force feedback controls for Sixaxis controllers connected via
Bluetooth.

Send Sixaxis Bluetooth output reports on the control channel.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: cp2112: fix incorrect error propagation in cp2112_xfer()
Jiri Kosina [Tue, 18 Feb 2014 08:43:53 +0000 (09:43 +0100)]
HID: cp2112: fix incorrect error propagation in cp2112_xfer()

Both cp2112_read_req() and cp2112_write_req() are returning negative
value in cases of error, but cp2112_xfer() is storing the return
value into unsigned size_t-typed 'count'.

Fix this by making 'count' signed type.

Reported-by: fengguang.wu@intel.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: cp2112: can't be used without gpio support
Jiri Kosina [Tue, 18 Feb 2014 08:40:17 +0000 (09:40 +0100)]
HID: cp2112: can't be used without gpio support

Add Kconfig driver dependency on GPIOLIB.

Reported-by: fengguang.wu@intel.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: cp2112: convert to use hid_hw_raw_request()
Jiri Kosina [Mon, 17 Feb 2014 23:39:39 +0000 (00:39 +0100)]
HID: cp2112: convert to use hid_hw_raw_request()

Commit cafebc0 ("HID: remove hid_get_raw_report in struct hid_device")
obsoletes the use of hdev->hid_get_raw_report(), as calling
hid_hw_raw_request() is functionally equivalent.

Convert cp2112 to use this notation.

Reported-by: fengguang.wu@intel.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoMerge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/hid-cp2112
Jiri Kosina [Mon, 17 Feb 2014 23:37:07 +0000 (00:37 +0100)]
Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/hid-cp2112

10 years agoHID: cp2112: use proper specifier for size_t
Jiri Kosina [Mon, 17 Feb 2014 22:44:54 +0000 (23:44 +0100)]
HID: cp2112: use proper specifier for size_t

%zd is a proper format string specifier for size_t

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: cp2112: make sysfs attributes static
Jiri Kosina [Mon, 17 Feb 2014 22:40:20 +0000 (23:40 +0100)]
HID: cp2112: make sysfs attributes static

No need to pollute namespace with dev_attr_*.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: add hid-cp2112 driver
David Barksdale [Tue, 4 Feb 2014 18:42:48 +0000 (12:42 -0600)]
HID: add hid-cp2112 driver

This patch adds support for the Silicon Labs CP2112 "Single-Chip HID USB to
SMBus Master Bridge."

This is a HID device driver which registers as an i2c adapter and gpiochip to
expose these functions of the CP2112. The customizable USB descriptor fields
are exposed as sysfs attributes.  The SMBus byte-read, byte-data-read/write,
and word-data-read transfer modes have been tested by talking to an i2c
sensor.  The GPIO functions and USB descriptor field programming have also
been tested.

Signed-off-by: David Barksdale <dbarksdale@uplogix.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Correct Sixaxis battery reporting
Frank Praznik [Sat, 15 Feb 2014 18:35:42 +0000 (13:35 -0500)]
HID: sony: Correct Sixaxis battery reporting

The battery_charging and cable_state flags were backwards on the Sixaxis.
The low bit of report byte 30 is 0 when charging and 1 when not.
Bit 5 of byte 31 is 0 when a USB cable is connected and 1 when not.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hyperv: make sure input buffer is big enough
David Herrmann [Thu, 19 Dec 2013 11:32:24 +0000 (12:32 +0100)]
HID: hyperv: make sure input buffer is big enough

We need at least HID_MAX_BUFFER_SIZE (4096) bytes as input buffer. HID
core depends on this as it requires every input report to be at least as
big as advertised.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: Bluetooth: hidp: make sure input buffers are big enough
David Herrmann [Thu, 19 Dec 2013 11:09:32 +0000 (12:09 +0100)]
HID: Bluetooth: hidp: make sure input buffers are big enough

HID core expects the input buffers to be at least of size 4096
(HID_MAX_BUFFER_SIZE). Other sizes will result in buffer-overflows if an
input-report is smaller than advertised. We could, like i2c, compute the
biggest report-size instead of using HID_MAX_BUFFER_SIZE, but this will
blow up if report-descriptors are changed after ->start() has been called.
So lets be safe and just use the biggest buffer we have.

Note that this adds an additional copy to the HIDP input path. If there is
a way to make sure the skb-buf is big enough, we should use that instead.

The best way would be to make hid-core honor the @size argument, though,
that sounds easier than it is. So lets just fix the buffer-overflows for
now and afterwards look for a faster way for all transport drivers.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-sensor-hub: Processing for duplicate physical ids
Srinivas Pandruvada [Fri, 31 Jan 2014 20:04:10 +0000 (12:04 -0800)]
HID: hid-sensor-hub: Processing for duplicate physical ids

In HID sensor hub, HID physical ids are used to represent different sensors.
For example physical id of 0x73 in usage page = 0x20, represents an
accelerometer. The HID sensor hub driver uses this physical ids to create
platform devices using MFD. There is 1:1 correspondence between an phy id and a
client driver.

But in some cases these physical ids are reused. There is a phy id 0xe1, which
specifies a custom sensor, which can exist multiple times to represent various
custom sensors. In this case there can be multiple instances of client MFD
drivers, processing specific custom sensor. In this case when client driver
looks for report id or a field index, it should still get the report id
specific to its own type. This is also true for reports, they should be
directed towards correct instance.  This change introduce a way to parse and
tie physical devices to their correct instance.

Summary of changes:
- To get physical ids, use collections. If a collection of type=physical
  exist then use usage id as in the name of platform device name
- As part of the platform data, we assign a hdsev instance, which has
  start and end of collection indexes. Using these indexes attributes
  can be tied to correct MFD client instances
- When a report is received, call callback with correct hsdev instance.
  In this way using its private data stored as part of its registry, it
  can distinguish different sensors even when they have same physical and
  logical ids.

  This patch is co-authored with Archana Patni <archna.patni@intel.com>.

Reported-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoiio: hid-sensor-hub: Remove hard coded indexes
Srinivas Pandruvada [Fri, 24 Jan 2014 02:50:22 +0000 (18:50 -0800)]
iio: hid-sensor-hub: Remove hard coded indexes

Remove the hard coded indexes, instead search for usage id and
use the index to set the power and report state.
This will fix issue, where the report descriptor doesn't contain
the full list of possible selector for power and report state.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-sensor-hub: Add selector api
Srinivas Pandruvada [Fri, 24 Jan 2014 02:50:21 +0000 (18:50 -0800)]
HID: hid-sensor-hub: Add selector api

In some report descriptors, they leave holes in the selectors. In
this case if we use hardcoded selector values, this will result
in invalid values. For example, if there is selectors defined for
Power State from OFF to D0 to D3. We can't use indexes of these states
if some states are not implemented or not present in the report decriptors.
In this case, we need to get the indexes from report descriptors.

One API is added to get the index of a selector. This API will
search for usage id in the field usage list and return the index.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-sensor-hub: quirk for STM Sensor hub
Archana Patni [Mon, 3 Feb 2014 07:14:16 +0000 (12:44 +0530)]
HID: hid-sensor-hub: quirk for STM Sensor hub

Added STM sensor hub vendor id in HID_SENSOR_HUB_ENUM_QUIRK to
fix report descriptors. These devices uses old FW which uses
logical 0 as minimum. In these, HID reports are not using proper
collection classes. So we need to fix report descriptors,for
such devices. This will not have any impact, if the FW uses
logical 1 as minimum.

We look for usage id for "power and report state", and modify
logical minimum value to 1.

This is a follow-up patch to commit id 875e36f8.

Signed-off-by: Archana Patni <archana.patni@linux.intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: core: check parameters when sending/receiving data from the device
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:59 +0000 (12:58 -0500)]
HID: core: check parameters when sending/receiving data from the device

It is better to check them soon enough before triggering any kernel panic.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: wiimote: replace hid_output_raw_report with hid_hw_output_report for output...
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:55 +0000 (12:58 -0500)]
HID: wiimote: replace hid_output_raw_report with hid_hw_output_report for output requests

For BT transport layer,
  ret = hid_output_raw_report(A, B, C, HID_OUTPUT_REPORT);
is equivalent to
  ret = hid_hw_output_report(A, B, C);

So use the new API where available

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: replace hid_output_raw_report with hid_hw_raw_request for feature requests
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:54 +0000 (12:58 -0500)]
HID: replace hid_output_raw_report with hid_hw_raw_request for feature requests

  ret = hid_output_raw_report(A, B, C, HID_FEATURE_REPORT);
is equivalent to
  ret = hid_hw_raw_request(A, B[0], B, C, HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
whatever the transport layer is.

So use the new API where available

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: logitech-dj: remove hid_output_raw_report call
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:53 +0000 (12:58 -0500)]
HID: logitech-dj: remove hid_output_raw_report call

hid-input do not use anymore hid_output_raw_report() to set the LEDs.
Use the correct implementation now and make them working again.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: usbhid: change return error of usbhid_output_report
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:51 +0000 (12:58 -0500)]
HID: usbhid: change return error of usbhid_output_report

If there is no urbout when sending a output report, ENOSYS (Function
not implemented) is a better error than EIO (I/O error).

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: i2c-hid: use generic .request() implementation
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:50 +0000 (12:58 -0500)]
HID: i2c-hid: use generic .request() implementation

Having our own .request() implementation does not give anything,
so use the generic binding.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: i2c-hid: implement ll_driver transport-layer callbacks
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:49 +0000 (12:58 -0500)]
HID: i2c-hid: implement ll_driver transport-layer callbacks

Add output_report and raw_request to i2c-hid.
The current implementation of i2c_hid_output_raw_report decides
by itself if it should use a direct send of the output report
or use the data register (SET_REPORT). Split that by reimplement
the logic in __i2c_hid_output_raw_report() which will be dropped
soon.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: core: implement generic .request()
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:48 +0000 (12:58 -0500)]
HID: core: implement generic .request()

.request() can be emulated through .raw_request()
we can implement this emulation in hid-core, and make .request
not mandatory for transport layer drivers.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: uHID: implement .raw_request
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:47 +0000 (12:58 -0500)]
HID: uHID: implement .raw_request

uHID is missing a SET_REPORT protocol implementation, but as
.hid_get_raw_report() as been removed from struct hid_device,
there were no means to access GET_REPORT in uhid.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: uhid: reintroduce uhid_hid_get_raw()
Jiri Kosina [Mon, 17 Feb 2014 13:49:34 +0000 (14:49 +0100)]
HID: uhid: reintroduce uhid_hid_get_raw()

This reverts commit 4a76d370f0c0508b5d6580d15eae3d40b47d837c. Removing
it was a mistake, as we need a means to access GET_REPORT.

Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: uHID: remove duplicated code
Benjamin Tissoires [Mon, 10 Feb 2014 17:58:46 +0000 (12:58 -0500)]
HID: uHID: remove duplicated code

uhid_hid_output_report() can be implemented through a simple call
to uhid_hid_output_raw().

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: uhid: remove uhid_hid_get_raw()
Jiri Kosina [Mon, 17 Feb 2014 13:15:48 +0000 (14:15 +0100)]
HID: uhid: remove uhid_hid_get_raw()

This function is now unused since cafebc058bf8 ("HID: remove
hid_get_raw_report in struct hid_device").

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Add conditionals to enable all features in Bluetooth mode
Frank Praznik [Thu, 6 Feb 2014 01:03:49 +0000 (20:03 -0500)]
HID: sony: Add conditionals to enable all features in Bluetooth mode

Add the conditionals to enable rumble, battery reporting, LED and touchpad
support for the Dualshock 4 in Bluetooth mode.

Add dualshock4_set_operational_bt to initialize the controller to the proper
operational state.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Set initial battery level to 100% to avoid false low battery warnings
Frank Praznik [Thu, 6 Feb 2014 01:03:48 +0000 (20:03 -0500)]
HID: sony: Set initial battery level to 100% to avoid false low battery warnings

Set the initial battery level to 100% to avoid false low battery warnings if
the battery state is polled before a report with the actual battery level is
received.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Add Dualshock 4 Bluetooth battery and touchpad parsing
Frank Praznik [Thu, 6 Feb 2014 01:03:47 +0000 (20:03 -0500)]
HID: sony: Add Dualshock 4 Bluetooth battery and touchpad parsing

Add Dualshock 4 battery and touchpad parsing for Bluetooth reports.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Add Dualshock 4 Bluetooth output report formatting
Frank Praznik [Thu, 6 Feb 2014 01:03:46 +0000 (20:03 -0500)]
HID: sony: Add Dualshock 4 Bluetooth output report formatting

Add formating for the Dualshock 4 output report data in Bluetooth mode.

In Bluetooth mode the Dualshock 4 wants output reports sent on the control
channel.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Add modified Dualshock 4 Bluetooth HID descriptor
Frank Praznik [Thu, 6 Feb 2014 01:03:45 +0000 (20:03 -0500)]
HID: sony: Add modified Dualshock 4 Bluetooth HID descriptor

By default, the Dualshock 4 sends controller data via report 1. Once a valid
output report 0x11 is received or a feature report of type 0x02 is requested the
controller changes from sending data in report 1 to sending data in report 17,
which is unmapped in the default descriptor. The mappings have to be moved to
report 17 to let the HID driver properly process the incoming reports.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: Use low-level transport driver functions
Frank Praznik [Thu, 6 Feb 2014 01:03:44 +0000 (20:03 -0500)]
HID: sony: Use low-level transport driver functions

Switch to the low-level transport driver functions.

sony_set_output_report is removed since it is no longer used.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoMerge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/sony
Jiri Kosina [Mon, 17 Feb 2014 13:07:35 +0000 (14:07 +0100)]
Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-3.15/sony

10 years agoHID: Add HID transport driver documentation
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:24 +0000 (16:33 -0500)]
HID: Add HID transport driver documentation

Add David Herrmann's documentation for the new low-level HID transport driver
functions.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: introduce helper to access hid_output_raw_report()
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:23 +0000 (16:33 -0500)]
HID: introduce helper to access hid_output_raw_report()

Add a helper to access hdev->hid_output_raw_report().

To convert the drivers, use the following snippets:

for i in drivers/hid/*.c
do
  sed -i.bak "s/[^ \t]*->hid_output_raw_report(/hid_output_raw_report(/g" $i
done

Then manually fix for checkpatch.pl

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: remove hid_get_raw_report in struct hid_device
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:22 +0000 (16:33 -0500)]
HID: remove hid_get_raw_report in struct hid_device

dev->hid_get_raw_report(X) and hid_hw_raw_request(X, HID_REQ_GET_REPORT)
are strictly equivalent. Switch the hid subsystem to the hid_hw notation
and remove the field .hid_get_raw_report in struct hid_device.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: usbhid: remove duplicated code
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:21 +0000 (16:33 -0500)]
HID: usbhid: remove duplicated code

Well, no use to keep twice the same code.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: HIDp: remove duplicated coded
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:20 +0000 (16:33 -0500)]
HID: HIDp: remove duplicated coded

- Move hidp_output_report() above
- Removed duplicated code in hidp_output_raw_report()

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: remove hidinput_input_event handler
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:19 +0000 (16:33 -0500)]
HID: remove hidinput_input_event handler

All the different transport drivers use now the generic event handling
in hid-input. We can remove the handler definitively now.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: HIDp: remove hidp_hidinput_event
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:18 +0000 (16:33 -0500)]
HID: HIDp: remove hidp_hidinput_event

hidp uses its own ->hidinput_input_event() instead of the generic binding
in hid-input.
Moving the handling of LEDs towards hidp_hidinput_event() allows two things:
- remove hidinput_input_event definitively from struct hid_device
- hidraw user space programs can also set the LEDs

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: logitech-dj: remove hidinput_input_event
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:17 +0000 (16:33 -0500)]
HID: logitech-dj: remove hidinput_input_event

hid-logitech-dj uses its own ->hidinput_input_event() instead of
the generic binding in hid-input.
Moving the handling of LEDs towards logi_dj_output_hidraw_report()
allows two things:
- remove hidinput_input_event in struct hid_device
- hidraw user space programs can also set the LEDs

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: add inliners for ll_driver transport-layer callbacks
Benjamin Tissoires [Wed, 5 Feb 2014 21:33:16 +0000 (16:33 -0500)]
HID: add inliners for ll_driver transport-layer callbacks

Those callbacks are not mandatory, so it's better to add inliners
to use them safely.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: apple: add Apple wireless keyboard 2011 JIS model support
Huei-Horng Yo [Thu, 6 Feb 2014 09:40:34 +0000 (17:40 +0800)]
HID: apple: add Apple wireless keyboard 2011 JIS model support

Add Apple wireless keyboard 2011 JIS model (05ac:0257).

Signed-off-by: Huei-Horng Yo <hiroshi@ghostsinthelab.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-sony: report actual brightness value when reading LED
Simon Wood [Wed, 5 Feb 2014 19:34:18 +0000 (12:34 -0700)]
HID: hid-sony: report actual brightness value when reading LED

The Dualshock4 controller contains a RGB LED, which is enabled via
the '/sys/class/leds' interface. At present the driver only returns
whether each of the RGB LEDs is lit (ie not off), but no indication
of it's brightness.

This patch fixes the reading of the current brightnes so that it
returns the value (rather than just off=0, on=LED_FULL).

Tested on the DS4 and SixAxis (for compatibility).

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: Kconfig updates for the Sony module
Frank Praznik [Sat, 1 Feb 2014 15:39:58 +0000 (10:39 -0500)]
HID: Kconfig updates for the Sony module

Update the HID_SONY config with 'select POWER_SUPPLY' to fix build issues
relating to undefined references to the  power_supply_* functions in
certain build configurations.

Update the description text to reflect that Playstation 4 controllers are now
supported.

[jkosina@suse.cz: drop the POWER_SUPPLY hunk, as I've already fixed that]
Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: fix build wrt. power_supply
Jiri Kosina [Mon, 3 Feb 2014 10:17:25 +0000 (11:17 +0100)]
HID: sony: fix build wrt. power_supply

Sony driver now makes use of power supply support. Make kernel
config aware of it.

Reported-by: fengguang.wu@intel.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-microsoft: Add support for 2 reserved usage ids used on ms office kb
Hans de Goede [Wed, 29 Jan 2014 16:57:44 +0000 (17:57 +0100)]
HID: hid-microsoft: Add support for 2 reserved usage ids used on ms office kb

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-microsoft: Add support for scrollwheel and special keypad keys
Hans de Goede [Wed, 29 Jan 2014 16:57:43 +0000 (17:57 +0100)]
HID: hid-microsoft: Add support for scrollwheel and special keypad keys

The Microsoft Office keyboard has a scrollwheel as well as some special keys
above the keypad which are handled through the custom MS usage page, this
commit adds support for these.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: hid-microsoft: Do the check for the ms usage page per device
Hans de Goede [Wed, 29 Jan 2014 16:57:42 +0000 (17:57 +0100)]
HID: hid-microsoft: Do the check for the ms usage page per device

For some devices we may also want to do custom mappings for other pages.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: Add some missing HUT mappings
Hans de Goede [Wed, 29 Jan 2014 16:57:41 +0000 (17:57 +0100)]
HID: Add some missing HUT mappings

Add mapping for "AL Next Task/Application", "AL Previous Task/Application"
and "AL File Browser" buttons, as found on the Microsoft Office keyboard.

Note that there already is a mapping for "AL Local Machine Browser" to
KEY_FILE. Unless we ever encounter a device with both that should not be
a problem.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: fix buffer allocations
Benjamin Tissoires [Sun, 2 Feb 2014 04:23:10 +0000 (23:23 -0500)]
HID: fix buffer allocations

When using hid_output_report(), the buffer should be allocated by hid_alloc_report_buf(),
not a custom malloc.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: i2c-hid: add runtime PM support
Mika Westerberg [Wed, 29 Jan 2014 09:24:36 +0000 (11:24 +0200)]
HID: i2c-hid: add runtime PM support

This patch adds runtime PM support for the HID over I2C driver. When the
i2c-hid device is first opened we power it on and on the last close we
power it off. This is actually what the driver is already doing but in
addition it allows subsystems, like ACPI power domain to power off the
device during runtime PM suspend, which should save even more power.

The implementation is not the most power efficient because it needs some
interaction from the userspace (e.g close the device node whenever we are
no more interested in getting events), nevertheless it allows us to save
some power and works with devices that are not wake capable.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: Add the transport-driver functions to the HIDP driver.
Frank Praznik [Wed, 22 Jan 2014 18:49:44 +0000 (13:49 -0500)]
HID: Add the transport-driver functions to the HIDP driver.

Add raw_request, set_raw_report and output_report transport-driver functions to
the HIDP driver.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: Add the transport-driver function to the uhid driver
Frank Praznik [Wed, 22 Jan 2014 18:49:43 +0000 (13:49 -0500)]
HID: Add the transport-driver function to the uhid driver

Add the uhid_output_report transport-driver function to the uhid driver.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: Add transport-driver functions to the USB HID interface.
Frank Praznik [Wed, 22 Jan 2014 18:49:42 +0000 (13:49 -0500)]
HID: Add transport-driver functions to the USB HID interface.

Add raw_request, set_raw_report and output_report transport-driver functions to
the USB HID driver.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: Add transport-driver callbacks to the hid_ll_driver struct
Frank Praznik [Wed, 22 Jan 2014 18:49:41 +0000 (13:49 -0500)]
HID: Add transport-driver callbacks to the hid_ll_driver struct

Add raw_request and output_report callbacks to the hid_ll_driver struct.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: multitouch: add FocalTech FTxxxx support
Benjamin Tissoires [Thu, 23 Jan 2014 21:33:14 +0000 (16:33 -0500)]
HID: multitouch: add FocalTech FTxxxx support

This is a Win7 device which does not work correctly with the default
settings (not the previous default BT).
However, the quirk ALWAYS_TRUE makes it working like a charm.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: add output events for the multi-touch pad on the Dualshock 4
Frank Praznik [Mon, 27 Jan 2014 15:17:37 +0000 (10:17 -0500)]
HID: sony: add output events for the multi-touch pad on the Dualshock 4

Add output events for the multi-touch pad on the Dualshock 4.

The touchpad has a resolution of 1920x940 and is capable of 2 simultaneous
touches. A 'Type B' stateful slot protocol is implemented as defined in
Documentation/input/multi-touch-protocol.txt

Applications can use the touchpad data by processing the ABS_MT_SLOT,
ABS_MT_TRACKING_ID, ABS_MT_POSITION_X and ABS_MT_POSITION_Y events.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: sony: add battery status reporting for the Sixaxis and Dualshock 4
Frank Praznik [Mon, 27 Jan 2014 15:17:36 +0000 (10:17 -0500)]
HID: sony: add battery status reporting for the Sixaxis and Dualshock 4

Add battery status reporting for the Sixaxis and Dualshock 4 controllers.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: microsoft: Add ID's for Surface Type/Touch Cover 2
Reyad Attiyat [Tue, 28 Jan 2014 15:17:57 +0000 (16:17 +0100)]
HID: microsoft: Add ID's for Surface Type/Touch Cover 2

The Microsoft Surface Type/Touch cover 2 devices have the flag HID_DG_CONTACTID
in their reports.This causes the device to bind to the hid-multitouch driver,
which doesn't handle generic keyboard/mouse input events.  The patch adds
the hardware id's of the device to hid-microsoft and to the HID special
driver array, which makes the device get handled by hid-generic/hid-input
properly.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=64811

Singed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Reviewed-by: Benjamin Tissoires<benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoHID: usbhid: quirk for CY-TM75 75 inch Touch Overlay
Yufeng Shen [Mon, 27 Jan 2014 23:02:46 +0000 (18:02 -0500)]
HID: usbhid: quirk for CY-TM75 75 inch Touch Overlay

There is timeout error during initialization:
kernel: [   11.733104] hid-multitouch 0003:1870:0110.0001: usb_submit_urb(ctrl) failed: -1
kernel: [   11.734093] hid-multitouch 0003:1870:0110.0001: timeout initializing reports

Adding quirk HID_QUIRK_NO_INIT_REPORTS can solve the problem.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Thu, 23 Jan 2014 04:58:23 +0000 (20:58 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

Pull HID updates from Jiri Kosina:

 - quite some work on hid-sony driver in order to have DualShock 4
   device properly supported, from Frank Praznik

 - fixed support for suspending I2C conntected devices, from Mika
   Westerberg

 - regression fix for 0xff05 usage on Microsoft Ergonomy, from Jiri
   Kosina

 - support for Synaptics HD touchscreen, from AceLan Kao

 - workaround for USB 3.0 problem for logitech-dj connected devices,
   from Benjamin Tisssoires

 - support for Logitech Dual Action pads, from Vitaly Katraew

 - quite a few other assorted fixes and device ID additions

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (33 commits)
  HID: sony: Use colors for the Dualshock 4 LED names
  HID: sony: Add annotated HID descriptor for the Dualshock 4
  HID: sony: Cache the output report for the Dualshock 4
  HID: sony: Map gyroscopes and accelerometers to axes
  HID: sony: Fix spacing in the device definitions.
  HID: sony: Use standard output reports instead of raw reports to send data to the Dualshock 4.
  HID: sony: Use separate identifiers for USB and Bluetooth connected Dualshock 4 controllers.
  HID: hid-holtek-mouse: add new a070 mouse
  HID: hid-sensor-hub: Fix buggy report descriptors
  HID: logitech-dj: Fix USB 3.0 issue
  HID: sony: Rename worker function
  HID: sony: Add LED controls for the Dualshock 4
  HID: sony: Add force-feedback support for the Dualshock 4
  HID: hidraw: make comment more accurate and nicer
  HID: sony: fix error return code
  HID: input: fix input sysfs path for hid devices
  HID: debug: add labels for some new buttons
  HID: remove SIS entries from hid_have_special_driver[]
  HID: microsoft: no fallthrough in MS ergonomy 0xff05 usage
  HID: add support for SiS multitouch panel in the touch monitor LG 23ET83V
  ...

10 years agoMerge tag 'dm-3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
Linus Torvalds [Thu, 23 Jan 2014 04:17:48 +0000 (20:17 -0800)]
Merge tag 'dm-3.14-changes' of git://git./linux/kernel/git/device-mapper/linux-dm

Pull device-mapper changes from Mike Snitzer:
 "A lot of attention was paid to improving the thin-provisioning
  target's handling of metadata operation failures and running out of
  space.  A new 'error_if_no_space' feature was added to allow users to
  error IOs rather than queue them when either the data or metadata
  space is exhausted.

  Additional fixes/features include:
   - a few fixes to properly support thin metadata device resizing
   - a solution for reliably waiting for a DM device's embedded kobject
     to be released before destroying the device
   - old dm-snapshot is updated to use the dm-bufio interface to take
     advantage of readahead capabilities that improve snapshot
     activation
   - new dm-cache target tunables to control how quickly data is
     promoted to the cache (fast) device
   - improved write efficiency of cluster mirror target by combining
     userspace flush and mark requests"

* tag 'dm-3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (35 commits)
  dm log userspace: allow mark requests to piggyback on flush requests
  dm space map metadata: fix bug in resizing of thin metadata
  dm cache: add policy name to status output
  dm thin: fix pool feature parsing
  dm sysfs: fix a module unload race
  dm snapshot: use dm-bufio prefetch
  dm snapshot: use dm-bufio
  dm snapshot: prepare for switch to using dm-bufio
  dm snapshot: use GFP_KERNEL when initializing exceptions
  dm cache: add block sizes and total cache blocks to status output
  dm btree: add dm_btree_find_lowest_key
  dm space map metadata: fix extending the space map
  dm space map common: make sure new space is used during extend
  dm: wait until embedded kobject is released before destroying a device
  dm: remove pointless kobject comparison in dm_get_from_kobject
  dm snapshot: call destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()
  dm cache policy mq: introduce three promotion threshold tunables
  dm cache policy mq: use list_del_init instead of list_del + INIT_LIST_HEAD
  dm thin: fix set_pool_mode exposed pool operation races
  dm thin: eliminate the no_free_space flag
  ...

10 years agoMerge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb...
Linus Torvalds [Thu, 23 Jan 2014 01:32:26 +0000 (17:32 -0800)]
Merge tag 'scsi-for-linus' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "This patch set is a lot of driver updates for qla4xxx, bfa, hpsa,
  qla2xxx.  It also removes the aic7xxx_old driver (which has been
  deprecated for nearly a decade) and adds support for deadlines in
  error handling"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (75 commits)
  [SCSI] hpsa: allow SCSI mid layer to handle unit attention
  [SCSI] hpsa: do not require board "not ready" status after hard reset
  [SCSI] hpsa: enable unit attention reporting
  [SCSI] hpsa: rename scsi prefetch field
  [SCSI] hpsa: use workqueue instead of kernel thread for lockup detection
  [SCSI] ipr: increase dump size in ipr driver
  [SCSI] mac_scsi: Fix crash on out of memory
  [SCSI] st: fix enlarge_buffer
  [SCSI] qla1280: Annotate timer on stack so object debug does not complain
  [SCSI] qla4xxx: Update driver version to 5.04.00-k3
  [SCSI] qla4xxx: Recreate chap data list during get chap operation
  [SCSI] qla4xxx: Add support for ISCSI_PARAM_LOCAL_IPADDR sysfs attr
  [SCSI] libiscsi: Add local_ipaddr parameter in iscsi_conn struct
  [SCSI] scsi_transport_iscsi: Export ISCSI_PARAM_LOCAL_IPADDR attr for iscsi_connection
  [SCSI] qla4xxx: Add host statistics support
  [SCSI] scsi_transport_iscsi: Add host statistics support
  [SCSI] qla4xxx: Added support for Diagnostics MBOX command
  [SCSI] bfa: Driver version upgrade to 3.2.23.0
  [SCSI] bfa: change FC_ELS_TOV to 20sec
  [SCSI] bfa: Observed auto D-port mode instead of manual
  ...

10 years agoMerge tag 'pci-v3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Thu, 23 Jan 2014 00:39:28 +0000 (16:39 -0800)]
Merge tag 'pci-v3.14-changes' of git://git./linux/kernel/git/helgaas/pci

Pull PCI updates from Bjorn Helgaas:
 "PCI changes for the v3.14 merge window:

  Resource management
    - Change pci_bus_region addresses to dma_addr_t (Bjorn Helgaas)
    - Support 64-bit AGP BARs (Bjorn Helgaas, Yinghai Lu)
    - Add pci_bus_address() to get bus address of a BAR (Bjorn Helgaas)
    - Use pci_resource_start() for CPU address of AGP BARs (Bjorn Helgaas)
    - Enforce bus address limits in resource allocation (Yinghai Lu)
    - Allocate 64-bit BARs above 4G when possible (Yinghai Lu)
    - Convert pcibios_resource_to_bus() to take pci_bus, not pci_dev (Yinghai Lu)

  PCI device hotplug
    - Major rescan/remove locking update (Rafael J. Wysocki)
    - Make ioapic builtin only (not modular) (Yinghai Lu)
    - Fix release/free issues (Yinghai Lu)
    - Clean up pciehp (Bjorn Helgaas)
    - Announce pciehp slot info during enumeration (Bjorn Helgaas)

  MSI
    - Add pci_msi_vec_count(), pci_msix_vec_count() (Alexander Gordeev)
    - Add pci_enable_msi_range(), pci_enable_msix_range() (Alexander Gordeev)
    - Deprecate "tri-state" interfaces: fail/success/fail+info (Alexander Gordeev)
    - Export MSI mode using attributes, not kobjects (Greg Kroah-Hartman)
    - Drop "irq" param from *_restore_msi_irqs() (DuanZhenzhong)

  SR-IOV
    - Clear NumVFs when disabling SR-IOV in sriov_init() (ethan.zhao)

  Virtualization
    - Add support for save/restore of extended capabilities (Alex Williamson)
    - Add Virtual Channel to save/restore support (Alex Williamson)
    - Never treat a VF as a multifunction device (Alex Williamson)
    - Add pci_try_reset_function(), et al (Alex Williamson)

  AER
    - Ignore non-PCIe error sources (Betty Dall)
    - Support ACPI HEST error sources for domains other than 0 (Betty Dall)
    - Consolidate HEST error source parsers (Bjorn Helgaas)
    - Add a TLP header print helper (Borislav Petkov)

  Freescale i.MX6
    - Remove unnecessary code (Fabio Estevam)
    - Make reset-gpio optional (Marek Vasut)
    - Report "link up" only after link training completes (Marek Vasut)
    - Start link in Gen1 before negotiating for Gen2 mode (Marek Vasut)
    - Fix PCIe startup code (Richard Zhu)

  Marvell MVEBU
    - Remove duplicate of_clk_get_by_name() call (Andrew Lunn)
    - Drop writes to bridge Secondary Status register (Jason Gunthorpe)
    - Obey bridge PCI_COMMAND_MEM and PCI_COMMAND_IO bits (Jason Gunthorpe)
    - Support a bridge with no IO port window (Jason Gunthorpe)
    - Use max_t() instead of max(resource_size_t,) (Jingoo Han)
    - Remove redundant of_match_ptr (Sachin Kamat)
    - Call pci_ioremap_io() at startup instead of dynamically (Thomas Petazzoni)

  NVIDIA Tegra
    - Disable Gen2 for Tegra20 and Tegra30 (Eric Brower)

  Renesas R-Car
    - Add runtime PM support (Valentine Barshak)
    - Fix rcar_pci_probe() return value check (Wei Yongjun)

  Synopsys DesignWare
    - Fix crash in dw_msi_teardown_irq() (Bjørn Erik Nilsen)
    - Remove redundant call to pci_write_config_word() (Bjørn Erik Nilsen)
    - Fix missing MSI IRQs (Harro Haan)
    - Add dw_pcie prefix before cfg_read/write (Pratyush Anand)
    - Fix I/O transfers by using CPU (not realio) address (Pratyush Anand)
    - Whitespace cleanup (Jingoo Han)

  EISA
    - Call put_device() if device_register() fails (Levente Kurusa)
    - Revert EISA initialization breakage ((Bjorn Helgaas)

  Miscellaneous
    - Remove unused code, including PCIe 3.0 interfaces (Stephen Hemminger)
    - Prevent bus conflicts while checking for bridge apertures (Bjorn Helgaas)
    - Stop clearing bridge Secondary Status when setting up I/O aperture (Bjorn Helgaas)
    - Use dev_is_pci() to identify PCI devices (Yijing Wang)
    - Deprecate DEFINE_PCI_DEVICE_TABLE (Joe Perches)
    - Update documentation 00-INDEX (Erik Ekman)"

* tag 'pci-v3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (119 commits)
  Revert "EISA: Initialize device before its resources"
  Revert "EISA: Log device resources in dmesg"
  vfio-pci: Use pci "try" reset interface
  PCI: Check parent kobject in pci_destroy_dev()
  xen/pcifront: Use global PCI rescan-remove locking
  powerpc/eeh: Use global PCI rescan-remove locking
  PCI: Fix pci_check_and_unmask_intx() comment typos
  PCI: Add pci_try_reset_function(), pci_try_reset_slot(), pci_try_reset_bus()
  MPT / PCI: Use pci_stop_and_remove_bus_device_locked()
  platform / x86: Use global PCI rescan-remove locking
  PCI: hotplug: Use global PCI rescan-remove locking
  pcmcia: Use global PCI rescan-remove locking
  ACPI / hotplug / PCI: Use global PCI rescan-remove locking
  ACPI / PCI: Use global PCI rescan-remove locking in PCI root hotplug
  PCI: Add global pci_lock_rescan_remove()
  PCI: Cleanup pci.h whitespace
  PCI: Reorder so actual code comes before stubs
  PCI/AER: Support ACPI HEST AER error sources for PCI domains other than 0
  ACPICA: Add helper macros to extract bus/segment numbers from HEST table.
  PCI: Make local functions static
  ...