]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/log
mirror_ubuntu-artful-kernel.git
8 years agoMerge branches 'for-4.5/upstream-fixes', 'for-4.6/cmedia', 'for-4.6/i2c-hid', 'for...
Jiri Kosina [Thu, 17 Mar 2016 12:51:54 +0000 (13:51 +0100)]
Merge branches 'for-4.5/upstream-fixes', 'for-4.6/cmedia', 'for-4.6/i2c-hid', 'for-4.6/logitech', 'for-4.6/multitouch', 'for-4.6/penmount', 'for-4.6/sony', 'for-4.6/thingm', 'for-4.6/upstream' and 'for-4.6/wacom' into for-linus

8 years agoHID: microsoft: Add ID for MS Wireless Comfort Keyboard
Slava Bacherikov [Fri, 11 Mar 2016 16:57:24 +0000 (18:57 +0200)]
HID: microsoft: Add ID for MS Wireless Comfort Keyboard

Microsoft Wireless Comfort Keyboard has vendor specific My Favorites
1-5 keys. Linux already supports this buttons on other MS keyboards by
MS_ERGONOMY quirk. So apply MS_ERGONOMY quirk to USB PID 0x00e3
(Microsoft Wireless Optical Desktop Receiver 3.0A). After this
My Favorites 1..5 keys will be reported as KEY_F14..KEY_F15 events.

Signed-off-by: Slava Bacherikov <slava@bacher09.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agohid: thingm: reorder calls in thingm_probe
Heiner Kallweit [Thu, 10 Mar 2016 19:52:21 +0000 (20:52 +0100)]
hid: thingm: reorder calls in thingm_probe

When reviewing another thingm patch Benjamin Tissoires pointed out
the following: "The problem here is that hid_hw_start() is called
before thingm_version() which allows user space to briefly introduce
races between thingm_version() and any hidraw requests.
The mutex will not help here as it is initialized after hid_hw_start()
and only used for protecting the concurrent access of the rgb."

Avoid this possible issue by calling hid_hw_start() later in the
probe function.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: i2c-hid: fix OOB write in i2c_hid_set_or_send_report()
Dmitry Torokhov [Mon, 14 Mar 2016 22:21:04 +0000 (15:21 -0700)]
HID: i2c-hid: fix OOB write in i2c_hid_set_or_send_report()

Even though hid_hw_* checks that passed in data_len is less than
HID_MAX_BUFFER_SIZE it is not enough, as i2c-hid does not necessarily
allocate buffers of HID_MAX_BUFFER_SIZE but rather checks all device
reports and select largest size. In-kernel users normally just send as much
data as report needs, so there is no problem, but hidraw users can do
whatever they please:

BUG: KASAN: slab-out-of-bounds in memcpy+0x34/0x54 at addr ffffffc07135ea80
Write of size 4101 by task syz-executor/8747
CPU: 2 PID: 8747 Comm: syz-executor Tainted: G    BU         3.18.0 #37
Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT)
Call trace:
[<ffffffc00020ebcc>] dump_backtrace+0x0/0x258 arch/arm64/kernel/traps.c:83
[<ffffffc00020ee40>] show_stack+0x1c/0x2c arch/arm64/kernel/traps.c:172
[<     inline     >] __dump_stack lib/dump_stack.c:15
[<ffffffc001958114>] dump_stack+0x90/0x140 lib/dump_stack.c:50
[<     inline     >] print_error_description mm/kasan/report.c:97
[<     inline     >] kasan_report_error mm/kasan/report.c:278
[<ffffffc0004597dc>] kasan_report+0x268/0x530 mm/kasan/report.c:305
[<ffffffc0004592e8>] __asan_storeN+0x20/0x150 mm/kasan/kasan.c:718
[<ffffffc0004594e0>] memcpy+0x30/0x54 mm/kasan/kasan.c:299
[<ffffffc001306354>] __i2c_hid_command+0x2b0/0x7b4 drivers/hid/i2c-hid/i2c-hid.c:178
[<     inline     >] i2c_hid_set_or_send_report drivers/hid/i2c-hid/i2c-hid.c:321
[<ffffffc0013079a0>] i2c_hid_output_raw_report.isra.2+0x3d4/0x4b8 drivers/hid/i2c-hid/i2c-hid.c:589
[<ffffffc001307ad8>] i2c_hid_output_report+0x54/0x68 drivers/hid/i2c-hid/i2c-hid.c:602
[<     inline     >] hid_hw_output_report include/linux/hid.h:1039
[<ffffffc0012cc7a0>] hidraw_send_report+0x400/0x414 drivers/hid/hidraw.c:154
[<ffffffc0012cc7f4>] hidraw_write+0x40/0x64 drivers/hid/hidraw.c:177
[<ffffffc0004681dc>] vfs_write+0x1d4/0x3cc fs/read_write.c:534
[<     inline     >] SYSC_pwrite64 fs/read_write.c:627
[<ffffffc000468984>] SyS_pwrite64+0xec/0x144 fs/read_write.c:614
Object at ffffffc07135ea80, in cache kmalloc-512
Object allocated with size 268 bytes.

Let's check data length against the buffer size before attempting to copy
data over.

Cc: stable@vger.kernel.org
Reported-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: multitouch: Release all touch slots on reset_resume
Benson Leung [Fri, 11 Mar 2016 22:19:49 +0000 (14:19 -0800)]
HID: multitouch: Release all touch slots on reset_resume

When resetting a device (especially after power loss) it is unlikely
that the firmware will keep the contact tracking data for the previous
touches and will be able to reconcile it with the new contacts, so
let's release all slots on reset resume as start anew.

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: usbhid: enable NO_INIT_REPORTS quirk for Semico USB Keykoard2
Daniel Bristot de Oliveira [Thu, 10 Mar 2016 17:17:58 +0000 (14:17 -0300)]
HID: usbhid: enable NO_INIT_REPORTS quirk for Semico USB Keykoard2

The device which identifies itself as a "USB Keykoard" (no typo)
with VID:PID 1a2c:0027 does not seem to be handling the reports
initialization very well.

This results in a "usb_submit_urb(ctrl) failed: -1" message from the
kernel when connected, and a delay before its initialization. It can
also cause the hang the system.

This patch adds the  quirk for this device, which causes the delay
to disappear. It is named as "USB Keykoard2" because the "USB Keykoard"
already exists.

Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: penmount: report only one button for PenMount 6000 USB touchscreen controller
Andrew Shadura [Thu, 29 Oct 2015 15:09:49 +0000 (16:09 +0100)]
HID: penmount: report only one button for PenMount 6000 USB touchscreen controller

PenMount 6000 USB resistive touchscreen controller reports it has three
buttons, while in reality it doesn't have any and doesn't support active
styli, and only generates touch events.

In penmount_input_mapping(), map only the first button (with code 0),
ignore the rest.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Tested-by: Christian Gmeiner <c.gmeiner@bachmann.info
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: i2c-hid: Fix suspend/resume when already runtime suspended
Doug Anderson [Tue, 8 Mar 2016 23:03:23 +0000 (15:03 -0800)]
HID: i2c-hid: Fix suspend/resume when already runtime suspended

On ACPI-based systems ACPI power domain code runtime resumes device before
calling suspend method, which ensures that i2c-hid suspend code starts with
device not in low-power state and with interrupts enabled.

On other systems, especially if device is not a part of any power domain,
we may end up calling driver's system-level suspend routine while the
device is runtime-suspended (with controller in presumably low power state
and interrupts disabled). This will result in interrupts being essentially
disabled twice, and we will only re-enable them after both system resume
and runtime resume methods complete. Unfortunately i2c_hid_resume() calls
i2c_hid_hwreset() and that only works properly if interrupts are enabled.

Also if device is runtime-suspended driver's suspend code may fail if it
tries to issue I/O requests.

Let's fix it by runtime-resuming the device if we need to run HID driver's
suspend code and also disabling interrupts only if device is not already
runtime-suspended. Also on resume we mark the device as running at full
power (since that is what resetting will do to it).

Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: i2c-hid: Add hid-over-i2c name to i2c id table
Benson Leung [Tue, 8 Mar 2016 19:25:39 +0000 (11:25 -0800)]
HID: i2c-hid: Add hid-over-i2c name to i2c id table

When using the device tree binding OF compatible = "hid-over-i2c" the
i2c id table also needs to have that name in order to auto load this
driver, since i2c core reports module alias as i2c:<string> where
<string> is compatible string of OF binding stripped of manufacturer's
prefix.

Tested-by: Andrew Duggan <aduggan@synaptics.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: multitouch: force retrieving of Win8 signature blob
Benjamin Tissoires [Mon, 7 Mar 2016 10:02:38 +0000 (11:02 +0100)]
HID: multitouch: force retrieving of Win8 signature blob

The Synaptics 0x11e5 over I2C found in the Asus T100-CHI requires to
fetch the signature blob to actually start sending events.

With this patch, we should be close enough to the Windows driver which
checks the content of the blob at plugin to validate or not the
touchscreen.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=113481
Fixes: 6d4f5440 ("HID: multitouch: Fetch feature reports on demand for Win8 devices")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: Support for CMedia CM6533 HID audio jack controls
Ben Chen [Fri, 22 Jan 2016 03:59:43 +0000 (11:59 +0800)]
HID: Support for CMedia CM6533 HID audio jack controls

The C-Media CM6533 is a USB audio chip featuring it's jack detection
capability.The device originates an interrupt transfer via HID interface each
time when a jack event occurs.  The purpose of this patch is to handle hid raw
events to keep the operating system informed of user interactions.

Signed-off-by: Ben Chen <ben_chen@bizlinktech.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: thingm: improve locking
Heiner Kallweit [Tue, 1 Mar 2016 19:49:54 +0000 (20:49 +0100)]
HID: thingm: improve locking

Reading from the device consists of two operations: sending the read
command and the actual read from the device. If the device is accessed
in between we might read wrong data. Therefore protect the full sequence
of both operations with a mutex.
Also change the semantics of thingm_recv to include both operations.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: thingm: switch to managed version of led_classdev_register
Heiner Kallweit [Mon, 29 Feb 2016 20:38:26 +0000 (21:38 +0100)]
HID: thingm: switch to managed version of led_classdev_register

Simplify the code by switching to the managed version of
led_classdev_register.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: thingm: remove workqueue
Heiner Kallweit [Mon, 29 Feb 2016 20:34:50 +0000 (21:34 +0100)]
HID: thingm: remove workqueue

Defining workqueues in LED drivers isn't needed any longer as the LED core
was extended with a generic workqueue recently.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: corsair: fix mapping of non-keyboard usages
Clément Vuchener [Tue, 16 Feb 2016 17:38:24 +0000 (18:38 +0100)]
HID: corsair: fix mapping of non-keyboard usages

This fixes a bug where the Volume Up key was ignored because it uses the same usage code as G18. Special Corsair usage codes are in the keyboard page, other pages should be left to the generic driver.

Signed-off-by: Clément Vuchener <clement.vuchener@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: close the wireless receiver on remove()
Benjamin Tissoires [Fri, 12 Feb 2016 16:27:45 +0000 (17:27 +0100)]
HID: wacom: close the wireless receiver on remove()

rmmod/insmod the wacom.ko module does not work for the receiver because
it was not previously closed. Now, we can hack with the wireless receiver
without having to unplug/replug it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: cleanup input devices
Benjamin Tissoires [Fri, 12 Feb 2016 16:27:44 +0000 (17:27 +0100)]
HID: wacom: cleanup input devices

Just some cleaning up when the input devices are unregistered.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: reuse wacom_parse_and_register() in wireless_work
Benjamin Tissoires [Fri, 12 Feb 2016 16:27:43 +0000 (17:27 +0100)]
HID: wacom: reuse wacom_parse_and_register() in wireless_work

Removes duplicated code.
The only difference is that we now need to stop and start the attached hid
device, but this is a small cost.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: move down wireless_work()
Benjamin Tissoires [Fri, 12 Feb 2016 16:27:42 +0000 (17:27 +0100)]
HID: wacom: move down wireless_work()

If wireless_work() wants to reuse parse_and_register(), we need to have
it declared after this function.

No functional changes.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: break out parsing of device and registering of input
Benjamin Tissoires [Fri, 12 Feb 2016 16:27:41 +0000 (17:27 +0100)]
HID: wacom: break out parsing of device and registering of input

Simplifies the .probe() and will allow to reuse this path in the future.
Few things are reshuffled in .probe():
- init wacom struct earlier
- then retrieve the report descriptor
- then parse it and allocate/register inputs.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: break out wacom_intuos_get_tool_type
Benjamin Tissoires [Fri, 12 Feb 2016 16:27:40 +0000 (17:27 +0100)]
HID: wacom: break out wacom_intuos_get_tool_type

Allow to reuse the code in a later series and simplifies
the reading of wacom_intuos_inout().

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: fix hid_ignore_special_drivers module parameter
Benjamin Tissoires [Fri, 12 Feb 2016 16:10:37 +0000 (17:10 +0100)]
HID: fix hid_ignore_special_drivers module parameter

hid_ignore_special_drivers works fine until hid_scan_report autodetects and
reassign devices (for hid-multitouch, hid-microsoft and hid-rmi).

Simplify the handling of the parameter: if it is there, use hid-generic, no
matter what, and if not, scan the device or rely on the hid_have_special_driver
table.

This was detected while trying to disable hid-multitouch on a Surface Pro cover
which prevented to use the keyboard.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
CC: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: logitech: fix Dual Action gamepad support
Grazvydas Ignotas [Sat, 13 Feb 2016 20:41:51 +0000 (22:41 +0200)]
HID: logitech: fix Dual Action gamepad support

The patch that added Logitech Dual Action gamepad support forgot to
update the special driver list for the device. This caused the logitech
driver not to probe unless kernel module load order was favorable.
Update the special driver list to fix it. Thanks to Simon Wood for the
idea.

Cc: Vitaly Katraew <zawullon@gmail.com>
Fixes: 56d0c8b7c8fb ("HID: add support for Logitech Dual Action gamepads")
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: underscores are unnecessary for u8, u16, s32
Pavel Machek [Tue, 9 Feb 2016 12:55:08 +0000 (13:55 +0100)]
HID: sony: underscores are unnecessary for u8, u16, s32

Double-underscore prefixed types are unnecessary in pure kernel code,
replace them with the non prefixed equivalents.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Acked-by: Frank Praznik <frank.praznik@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: fix some warnings from scripts/checkpatch.pl
Antonio Ospite [Tue, 9 Feb 2016 12:55:07 +0000 (13:55 +0100)]
HID: sony: fix some warnings from scripts/checkpatch.pl

  WARNING: Block comments use a trailing */ on a separate line
  #822: FILE: drivers/hid/hid-sony.c:822:
  +    * number but it's not needed for correct operation */

  WARNING: Block comments use a trailing */ on a separate line
  #828: FILE: drivers/hid/hid-sony.c:828:
  +    * buttons multiple keypresses are allowed */

  WARNING: Block comments use a trailing */ on a separate line
  #854: FILE: drivers/hid/hid-sony.c:854:
  +    * 0xff and 11th is for press indication */

  WARNING: Missing a blank line after declarations
  #1930: FILE: drivers/hid/hid-sony.c:1930:
  + struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
  + sc->send_output_report(sc);

  WARNING: Block comments use a trailing */ on a separate line
  #2510: FILE: drivers/hid/hid-sony.c:2510:
  +  * Logitech joystick from the device descriptor. */

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Acked-by: Frank Praznik <frank.praznik@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: fix errors from scripts/checkpatch.pl
Antonio Ospite [Tue, 9 Feb 2016 12:55:06 +0000 (13:55 +0100)]
HID: sony: fix errors from scripts/checkpatch.pl

  ./scripts/checkpatch.pl \
    --types "SPACING,TRAILING_WHITESPACE,POINTER_LOCATION,CODE_INDENT" \
    -f drivers/hid/hid-sony.c

  ERROR: trailing whitespace
  #933: FILE: drivers/hid/hid-sony.c:933:
  +^I * $

  ERROR: space prohibited after that open square bracket '['
  #947: FILE: drivers/hid/hid-sony.c:947:
  + [ 1] = BTN_TRIGGER_HAPPY1,

  ERROR: space prohibited after that open square bracket '['
  #948: FILE: drivers/hid/hid-sony.c:948:
  + [ 2] = BTN_TRIGGER_HAPPY2,

  ERROR: space prohibited after that open square bracket '['
  #949: FILE: drivers/hid/hid-sony.c:949:
  + [ 3] = BTN_TRIGGER_HAPPY3,

  ERROR: space prohibited after that open square bracket '['
  #950: FILE: drivers/hid/hid-sony.c:950:
  + [ 4] = BTN_TRIGGER_HAPPY4,

  ERROR: space prohibited after that open square bracket '['
  #951: FILE: drivers/hid/hid-sony.c:951:
  + [ 5] = BTN_TRIGGER_HAPPY5,

  ERROR: space prohibited after that open square bracket '['
  #952: FILE: drivers/hid/hid-sony.c:952:
  + [ 6] = BTN_TRIGGER_HAPPY6,

  ERROR: space prohibited after that open square bracket '['
  #953: FILE: drivers/hid/hid-sony.c:953:
  + [ 7] = BTN_TRIGGER_HAPPY7,

  ERROR: space prohibited after that open square bracket '['
  #954: FILE: drivers/hid/hid-sony.c:954:
  + [ 8] = BTN_TRIGGER_HAPPY8,

  ERROR: space prohibited after that open square bracket '['
  #955: FILE: drivers/hid/hid-sony.c:955:
  + [ 9] = BTN_TRIGGER_HAPPY9,

  ERROR: "(foo*)" should be "(foo *)"
  #1032: FILE: drivers/hid/hid-sony.c:1032:
  + void(*send_output_report)(struct sony_sc*);

  WARNING: missing space after return type
  #1032: FILE: drivers/hid/hid-sony.c:1032:
  + void(*send_output_report)(struct sony_sc*);

  ERROR: "(foo*)" should be "(foo *)"
  #2261: FILE: drivers/hid/hid-sony.c:2261:
  + void(*send_output_report)(struct sony_sc*))

  WARNING: missing space after return type
  #2261: FILE: drivers/hid/hid-sony.c:2261:
  + void(*send_output_report)(struct sony_sc*))

  ERROR: code indent should use tabs where possible
  #2449: FILE: drivers/hid/hid-sony.c:2449:
  +         */$

  total: 13 errors, 2 warnings, 2570 lines checked

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Acked-by: Frank Praznik <frank.praznik@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: lg: fix a typo in descriptors comments s/Joystik/Joystick/
Antonio Ospite [Tue, 9 Feb 2016 12:55:04 +0000 (13:55 +0100)]
HID: lg: fix a typo in descriptors comments s/Joystik/Joystick/

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: multitouch: warn on sysfs group creation failure
Nicholas Krause [Thu, 4 Feb 2016 15:52:40 +0000 (10:52 -0500)]
HID: multitouch: warn on sysfs group creation failure

This adds a warning message stating that the sysfs group was not able to be
created for the passed hid_device structure pointer with dev_warn.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Reviewed-by: Benjamin Tissoires <benajmin.tissoires@redhat.com>
[jkosina@suse.cz: massaged changelog a bit]
[jkosina@suse.cz: reformatted source]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: fix a typo in descriptors comments s/Joystik/Joystick/
Antonio Ospite [Thu, 28 Jan 2016 17:23:43 +0000 (18:23 +0100)]
HID: sony: fix a typo in descriptors comments s/Joystik/Joystick/

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: dragonrise: fix a typo in descriptors comments s/Joystik/Joystick/
Antonio Ospite [Thu, 28 Jan 2016 17:23:41 +0000 (18:23 +0100)]
HID: dragonrise: fix a typo in descriptors comments s/Joystik/Joystick/

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: quirks: Add no_init_reports for AKAI midi controller
Stafford Horne [Fri, 29 Jan 2016 13:38:07 +0000 (22:38 +0900)]
HID: quirks: Add no_init_reports for AKAI midi controller

The midi controller times-out while initializing reports, this
causes boot to take an extra 10 seconds. The device descriptor
advertises that it has an internal HID device but seems to not
actually do anything useful.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: logitech-hidpp: limit visibility of init/deinit functions
Jiri Kosina [Thu, 28 Jan 2016 13:28:39 +0000 (14:28 +0100)]
HID: logitech-hidpp: limit visibility of init/deinit functions

hidpp_ff_init() and hidpp_ff_deinit() are not used outside of
hid-logitech-hidpp.c, so let's make them static.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: logitech-hidpp: Force feedback support for the Logitech G920
Edwin Velds [Sun, 10 Jan 2016 23:25:15 +0000 (00:25 +0100)]
HID: logitech-hidpp: Force feedback support for the Logitech G920

This patch implements force feedback support for the Logitech
G920 Driving Force Racing Wheel. It is a generic implementation
of feature 0x8123 of the Logitech HID++ protocol and should be
usable for any future devices that implement this feature.

This patch should be applied after the basic G920 support patch
by Simon Wood:
http://www.spinics.net/lists/linux-input/msg42174.html

The driving supports everything that is supported by the G920
firmware:
    FF_CONSTANT
    FF_PERIODIC
    FF_SINE
    FF_SQUARE
    FF_SAW_UP
    FF_SAW_DOWN
    FF_TRIANGLE
    FF_SPRING
    FF_DAMPER
    FF_AUTOCENTER
    FF_GAIN
and for version 2 firmware also:
    FF_FRICTION
    FF_INERTIA
    FF_RAMP

Both envelopes and replay values are supported as well, but some
problems may occur when using firmware release 1. There is also a
small residual clockwise damper in the wheel when using the first
firmware release. All problems are fixed in the soon te be released
firmware version 2.

The default spring is disabled by permanently placing a spring
force in the wheel. This spring is also used as the autocenter
spring.

Note: The wheel _DOES_NOT_ auto switch to Logitech/HID mode (it is stuck
in XBox since the xpad changes where not included). Michal has an
alternative approach documented here (and the changes should be submitted
upstream to usb_modeswitch project):

===
Create a file named "046d:c261" in "/etc/usb_modeswitch.d" with the
following content:

DefaultVendor=046d
DefaultProduct=c261
MessageEndpoint=01
ResponseEndpoint=01
TargetClass=0x03
MessageContent="0f00010142"

Then run "usb_modeswitch -c /etc/modeswitch.d/046d:c291" as root and
watch the magic happen:)
===

[jkosina@suse.cz: added information about mode switching from Simon]
[jkosina@suse.cz: fixed a few stylistic issues pointed out by Simon]
[jkosina@suse.cz: fix merge conflict due to to_hid_device() changes]
Signed-off-by: Edwin Velds <e.velds@gmail.com>
Tested-by: Elias Vanderstuyft <elias.vds@gmail.com>
Tested-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: rmi: Check that the device is a RMI device in suspend and resume callbacks
Andrew Duggan [Tue, 26 Jan 2016 23:40:36 +0000 (15:40 -0800)]
HID: rmi: Check that the device is a RMI device in suspend and resume callbacks

Commit 092563604217 ("HID: rmi: Disable scanning if the device is not a wake
source") introduced a regression for devices which use hid-rmi to handle
composite USB devices. The suspend or resume callbacks are not checking
that the device is a RMI device before calling rmi_read or rmi_write.
This results in dereferencing uninitialized variables on non RMI devices. This
patch checks that the RMI_DEVICE flag is set before sending RMI commands to the
device.

Reported-by: Rodrigo Gomes <rodrigo.toste.gomes@gmail.com>
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: usbhid: Fix incorrect product id of old 4nes4snes
Raphael Assenat [Sat, 23 Jan 2016 20:35:39 +0000 (15:35 -0500)]
HID: usbhid: Fix incorrect product id of old 4nes4snes

The correct product ID for the old version of the raphnet 4nes4snes
device was 0x0a9d, not 0x0a8d.

Signed-off-by: Raphael Assenat <raph@raphnet.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: add HID_QUIRK_NOGET to Quanta 3003 too
Benjamin Tissoires [Mon, 4 Jan 2016 09:08:54 +0000 (10:08 +0100)]
HID: add HID_QUIRK_NOGET to Quanta 3003 too

dmesg shows a lot of:
[ 1374.890348] hid-multitouch 0003:0408:3003.0007: usb_submit_urb(ctrl) failed: -1
[ 1384.916388] hid-multitouch 0003:0408:3003.0007: usb_submit_urb(ctrl) failed: -1
[ 1384.916432] hid-multitouch 0003:0408:3003.0007: timeout initializing reports

Add the quirk and make the touchscreen happy.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Jim lovell <jimlovell777@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: core: prevent out-of-bound readings
Benjamin Tissoires [Tue, 19 Jan 2016 11:34:58 +0000 (12:34 +0100)]
HID: core: prevent out-of-bound readings

Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.

The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: fix out of bound access in extract() and implement()
Dmitry Torokhov [Tue, 19 Jan 2016 06:40:37 +0000 (22:40 -0800)]
HID: fix out of bound access in extract() and implement()

extract() and implement() access buffer containing reports in 64-bit
chunks, but there is no guarantee that buffers are padded to 64 bit
boundary. In fact, KASAN has caught such OOB access with i2c-hid and
Synaptics touch controller.

Instead of trying to hunt all parties that allocate buffers and make
sure they are padded, let's switch extract() and implement() to byte
access. It is a bit slower, bit we are not dealing with super fast
devices here.

Also let's fix link to the HID spec while we are at it.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: Fixup output reports for the nyko core controller
Scott Moreau [Wed, 13 Jan 2016 14:40:43 +0000 (07:40 -0700)]
HID: sony: Fixup output reports for the nyko core controller

The nyko core controller uses the same output report format as the
sixaxis controllers, but it expects the report id at offset 1.

This does not interfere with the official controllers as this byte
is considered a padding byte by the current code.

Signed-off-by: Scott Moreau <oreaus@gmail.com>
Acked-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: Add nyko core controller support
Scott Moreau [Wed, 13 Jan 2016 14:40:42 +0000 (07:40 -0700)]
HID: sony: Add nyko core controller support

This adds rumble and LED support for nyko core controllers
using the sino lite chip vendor:1345 product:3008, for PS3.

Setting operational mode and output reports are the same as
sixaxis but the input report has a different format since the
PS3 accepts HID usb devices. For it to work, an exception is
needed to skip overriding the report descriptor and use the
original one.

Signed-off-by: Scott Moreau <oreaus@gmail.com>
Acked-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: do not bail out when the sixaxis refuses the output report
Benjamin Tissoires [Fri, 8 Jan 2016 16:58:49 +0000 (17:58 +0100)]
HID: sony: do not bail out when the sixaxis refuses the output report

When setting the operational mode, some third party (Speedlink Strike-FX)
gamepads refuse the output report. Failing here means we refuse to
initialize the gamepad while this should be harmless.

The weird part is that the initial commit that added this: a7de9b8
("HID: sony: Enable Gasia third-party PS3 controllers") mentions this
very same controller as one requiring this output report.
Anyway, it's broken for one user at least, so let's change it.
We will report an error, but at least the controller should work.

And no, these devices present themselves as legacy Sony controllers
(VID:PID of 054C:0268, as in the official ones) so there are no ways
of discriminating them from the official ones.

https://bugzilla.redhat.com/show_bug.cgi?id=1255325

Reported-and-tested-by: Max Fedotov <thesourcehim@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom - Add quirks for INTUOSHT2 in range events
Ping Cheng [Sat, 9 Jan 2016 01:16:25 +0000 (17:16 -0800)]
HID: wacom - Add quirks for INTUOSHT2 in range events

INTUOSHT2 in range event is not used to indicate in proximity state.
INTUOSHT2 only has one stylus.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom - Cleanup touch arbitration logic
Ping Cheng [Sat, 9 Jan 2016 01:16:06 +0000 (17:16 -0800)]
HID: wacom - Cleanup touch arbitration logic

stylus_in_proximity was introduced to support touch arbitration
before in range was supported. With in range event, the logic
changed. stylus_in_proximity should be set for both in prox and
in range events.

To finish a clean touch arbitration logic, we should send touch
up (if it was down) before posting any general pen events.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom - make sure wacom_intuos_inout only process in/out events
Ping Cheng [Sat, 9 Jan 2016 01:15:48 +0000 (17:15 -0800)]
HID: wacom - make sure wacom_intuos_inout only process in/out events

Move general events related data validation to wacom_intuos_general.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom - request tool info only when we get general events
Ping Cheng [Sat, 9 Jan 2016 01:14:54 +0000 (17:14 -0800)]
HID: wacom - request tool info only when we get general events

Move wacom_intuos_schedule_prox_event inside wacom_intuos_general
so we don't call it when general event data isn't ready.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Fri, 15 Jan 2016 00:20:42 +0000 (16:20 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID updates from Jiri Kosina:

 - appoint Benjamin Tissoires as co-maintainer / designated reviewer

 - sysfs report_descriptor visibility fix for unclaimed devices, from
   Andy Lutomirski

 - suspend/resume fixes for Sony driver from Frank Praznik

 - IRQ deadlock fix from Ioan-Adrian Ratiu

 - hid-i2c fixes affecting (at least) Yoga 900 from Mika Westerberg and
   Srinivas Pandruvada

 - a lot of new device support (especially, but not limited to, Wacom)
   and assorted small misc fixes

 - almost complete G920 support; the only bit that is missing is
   switching the device to HID mode automatically; Simon Wood and Michal
   Maly are working on it.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (46 commits)
  Revert "INPUT: xpad: switch Logitech G920 Wheel into HID mode"
  HID: sensor-hub: Add quirk for Lenovo Yoga 900 with ITE Chips
  HID: Add new PID for Microchip Pick16F1454
  HID: wacom: Use correct report to query pen ID from INTUOSHT2 devices
  HID: i2c-hid: Prevent sending reports from racing with device reset
  HID: use kobj_to_dev()
  HID: wiimote: use dev_to_wii()
  HID: add a new helper to_hid_driver()
  HID: use to_hid_device()
  HID: move to_hid_device() to hid.h
  HID: usbhid: use to_usb_device
  HID: corsair: Convert to use module_hid_driver
  HID: input: ignore the battery in OKLICK Laser BTmouse
  HID: wacom: Fix pad button range for CINTIQ_COMPANION_2
  HID: wacom: Fix touchring value reporting
  HID: wacom: Report 'strip2' values in ABS_RY
  HID: wacom: Limit touchstrip data to 13 bits
  HID: wacom: bitwise vs logical ORs
  HID: wacom: Apply lowres quirk to BAMBOO_TOUCH devices
  HID: enable hid device to suspend/resume asynchronously
  ...

8 years agoMerge tag 'nfs-for-4.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Fri, 15 Jan 2016 00:08:23 +0000 (16:08 -0800)]
Merge tag 'nfs-for-4.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client updates from Trond Myklebust:
 "Highlights include:

  Stable fixes:
   - Fix a regression in the SunRPC socket polling code
   - Fix the attribute cache revalidation code
   - Fix race in __update_open_stateid()
   - Fix an lo->plh_block_lgets imbalance in layoutreturn
   - Fix an Oopsable typo in ff_mirror_match_fh()

  Features:
   - pNFS layout recall performance improvements.
   - pNFS/flexfiles: Support server-supplied layoutstats sampling period

  Bugfixes + cleanups:
   - NFSv4: Don't perform cached access checks before we've OPENed the
     file
   - Fix starvation issues with background flushes
   - Reclaim writes should be flushed as unstable writes if there are
     already entries in the commit lists
   - Various bugfixes from Chuck to fix NFS/RDMA send queue ordering
     problems
   - Ensure that we propagate fatal layoutget errors back to the
     application
   - Fixes for sundry flexfiles layoutstats bugs
   - Fix files/flexfiles to not cache invalidated layouts in the DS
     commit buckets"

* tag 'nfs-for-4.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (68 commits)
  NFS: Fix a compile warning about unused variable in nfs_generic_pg_pgios()
  NFSv4: Fix a compile warning about no prototype for nfs4_ioctl()
  NFS: Use wait_on_atomic_t() for unlock after readahead
  SUNRPC: Fixup socket wait for memory
  NFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments
  NFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures
  NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid()
  NFSv4.1/pNFS: Fix a race in initiate_file_draining()
  NFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout
  NFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode
  NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids
  NFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn()
  NFS: Relax requirements in nfs_flush_incompatible
  NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid
  NFS: Allow multiple commit requests in flight per file
  NFS/pNFS: Fix up pNFS write reschedule layering violations and bugs
  SUNRPC: Fix a missing break in rpc_anyaddr()
  pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh()
  NFS: Fix attribute cache revalidation
  NFS: Ensure we revalidate attributes before using execute_ok()
  ...

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Fri, 15 Jan 2016 00:03:57 +0000 (16:03 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fix from Al Viro:
 "Don't put symlink bodies in pagecache into highmem"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  Make sure that highmem pages are not added to symlink page cache

8 years agoMake sure that highmem pages are not added to symlink page cache
Al Viro [Thu, 14 Jan 2016 22:52:59 +0000 (17:52 -0500)]
Make sure that highmem pages are not added to symlink page cache

inode_nohighmem() is sufficient to make sure that page_get_link()
won't try to allocate a highmem page.  Moreover, it is sufficient
to make sure that page_symlink/__page_symlink won't do the same
thing.  However, any filesystem that manually preseeds the symlink's
page cache upon symlink(2) needs to make sure that the page it
inserts there won't be a highmem one.

Fortunately, only nfs and shmem have run afoul of that...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 14 Jan 2016 19:57:22 +0000 (11:57 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc changes:
   - fix lguest bug
   - fix /proc/meminfo output on certain configs
   - fix pvclock bug
   - fix reboot on certain iMacs by adding new reboot quirk
   - fix bootup crash
   - fix FPU boot line option parsing
   - add more x86 self-tests
   - small cleanups, documentation improvements, etc"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/cpu/amd: Remove an unneeded condition in srat_detect_node()
  x86/vdso/pvclock: Protect STABLE check with the seqcount
  x86/mm: Improve switch_mm() barrier comments
  selftests/x86: Test __kernel_sigreturn and __kernel_rt_sigreturn
  x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]
  lguest: Map switcher text R/O
  x86/boot: Hide local labels in verify_cpu()
  x86/fpu: Disable AVX when eagerfpu is off
  x86/fpu: Disable MPX when eagerfpu is off
  x86/fpu: Disable XGETBV1 when no XSAVE
  x86/fpu: Fix early FPU command-line parsing
  x86/mm: Use PAGE_ALIGNED instead of IS_ALIGNED
  selftests/x86: Disable the ldt_gdt_64 test for now
  x86/mm/pat: Make split_page_count() check for empty levels to fix /proc/meminfo output
  x86/boot: Double BOOT_HEAP_SIZE to 64KB
  x86/mm: Add barriers and document switch_mm()-vs-flush synchronization

8 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 14 Jan 2016 19:45:56 +0000 (11:45 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Ingo Molnar:
 "Three clocksource driver fixes"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource/drivers/vt8500: Increase the minimum delta
  clocksource/drivers/fsl_ftm_timer: Fix CLKSRC_MMIO dependency
  clocksource/drivers: Fix dependencies for !HAS_IOMEM archs

8 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 14 Jan 2016 19:39:09 +0000 (11:39 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Tooling fixes, the biggest patch is one that decouples the kernel's
  list.h from tooling list.h"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
  perf tools: Fallback to srcdir/Documentation/tips.txt
  perf ui/tui: Print helpline message as is
  perf tools: Set and pass DOCDIR to builtin-report.c
  perf tools: Add file_only config option to strlist
  perf tools: Add more usage tips
  perf record: Add --buildid-all option
  tools subcmd: Add missing NORETURN define for parse-options.h
  tools: Fix formatting of the "make -C tools" help message
  tools: Make list.h self-sufficient
  perf tools: Fix mmap2 event allocation in synthesize code
  perf stat: Fix recort_usage typo
  perf test: Reset err after using it hold errcode in hist testcases
  perf test: Fix false TEST_OK result for 'perf test hist'
  tools build: Add BPF feature check to test-all
  perf bpf: Fix build breakage due to libbpf
  tools: Move Makefile.arch from perf/config to tools/scripts
  perf tools: Fix PowerPC native building
  perf tools: Fix phony build target for build-test
  perf tools: Add -lutil in python lib list for broken python-config
  perf tools: Add missing sources to perf's MANIFEST
  ...

8 years agoMerge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Linus Torvalds [Thu, 14 Jan 2016 19:25:37 +0000 (11:25 -0800)]
Merge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "Quite some driver updates:
   - piix4 can now handle multiplexed adapters
   - brcmstb, xlr, eg20t, designware drivers support more SoCs
   - emev2 gained i2c slave support
   - img-scb and rcar got bigger refactoring to remove issues
   - lots of common driver updates

  i2c core changes:
   - new quirk flag when an adapter does not support clock stretching,
     so clients can be configured to avoid that if possible
   - added a helper function to retrieve timing parameters from firmware
     (with rcar being the first user)
   - "multi-master" DT binding added so drivers can adapt to this
     setting (like disabling PM to keep arbitration working)
   - RuntimePM for the logical adapter device is now always enabled by
     the core to ensure propagation from childs to the parent (the HW
     device)
   - new macro builtin_i2c_driver to reduce boilerplate"

* 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (70 commits)
  i2c: create builtin_i2c_driver to avoid registration boilerplate
  i2c: imx: fix i2c resource leak with dma transfer
  dt-bindings: i2c: eeprom: add another EEPROM device
  dt-bindings: move I2C eeprom descriptions to the proper file
  i2c: designware: Do not require clock when SSCN and FFCN are provided
  DT: i2c: trivial-devices: Add Epson RX8010 and MPL3115
  i2c: s3c2410: remove superfluous runtime PM calls
  i2c: always enable RuntimePM for the adapter device
  i2c: designware: retry transfer on transient failure
  i2c: ibm_iic: rename i2c_timings struct due to clash with generic version
  i2c: designware: Add support for AMD Seattle I2C
  i2c: imx: Remove unneeded comments
  i2c: st: use to_platform_device()
  i2c: designware: use to_pci_dev()
  i2c: brcmstb: Adding support for CM and DSL SoCs
  i2c: mediatek: fix i2c multi transfer issue in high speed mode
  i2c: imx: improve code readability
  i2c: imx: Improve message log when DMA is not used
  i2c: imx: add runtime pm support to improve the performance
  i2c: imx: init bus recovery info before adding i2c adapter
  ...

8 years agoMerge tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
Linus Torvalds [Thu, 14 Jan 2016 19:13:28 +0000 (11:13 -0800)]
Merge tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull DeviceTree updates from Rob Herring:

 - Rework and export the changeset API to make it available to users
   other than DT overlays

 - ARM secure devices binding

 - OCTEON USB binding

 - Clean-up of various SRAM binding docs

 - Various other binding doc updates

* tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (21 commits)
  drivers/of: Export OF changeset functions
  Fix documentation for adp1653 DT
  ARM: psci: Fix indentation in DT bindings
  of/platform: export of_default_bus_match_table
  of/unittest: Show broken behaviour in the platform bus
  of: fix declaration of of_io_request_and_map
  of/address: replace printk(KERN_ERR ...) with pr_err(...)
  of/irq: optimize device node matching loop in of_irq_init()
  dt-bindings: tda998x: Document the required 'port' node.
  net/macb: bindings doc: Merge cdns-emac to macb
  dt-bindings: Misc fix for the ATH79 DDR controllers
  dt-bindings: Misc fix for the ATH79 MISC interrupt controllers
  Documentation: dt: Add bindings for Secure-only devices
  dt-bindings: ARM: add arm,cortex-a72 compatible string
  ASoC: Atmel: ClassD: add GCK's parent clock in DT binding
  DT: add Olimex to vendor prefixes
  Documentation: fsl-quadspi: Add fsl,ls1021-qspi compatible string
  Documentation/devicetree: document OCTEON USB bindings
  usb: misc: usb3503: Describe better how to bind clock to the hub
  dt-bindings: Consolidate SRAM bindings from all vendors
  ...

8 years agoMerge tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Linus Torvalds [Thu, 14 Jan 2016 18:53:15 +0000 (10:53 -0800)]
Merge tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Device Support:
   - Add support for s2mps15; sec-core
   - Add support for Lewisburg; lpc_ich
   - Add support for cs47l24 and wm1831; arizona

  New Functionality:
   - Allow user to select syscon register width; syscon

  Fix-ups:
   - Lots of Checkpatch fixes
   - Rename -pmic/-regulator; s2mps11
   - Build driver components into a single module; wm8994-*
   - Better handing of IRQ during suspend/resume; as3722
   - Constify things; da903x
   - Remove unused code; ab8500-core
   - Improve error handing; qcom_rpm
   - Simplify code: wm831x-otp, sta2x11-mfd
   - Improve locking; cros_ec_spi
   - Fix incorrect DT binding filename reference; arizona, palmas,
     snps-dwapb-gpio, wm8994

  Bug Fixes:
   - Fix broken SYSFS 'show ID' call; wm831x-otp
   - Protect reads from non-existent registers; qcom-spmi-pmic
   - Repair build warnings; as3722
   - Fix IRQ request ordering; arizona-irq
   - Ensure return value is boolean; ucb1x00-core, tps65010, tc6393xb,
     htc-egpio, dm355evm_msp, asic3"

* tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (58 commits)
  mfd: davinci_voicecodec: Remove pointless 'out of memory' error message
  mfd: da9052-irq: Fix trivial 'space before comma' error
  mfd: da9052-i2c: Fix tabbing/whitespace issue
  mfd: da903x: Fix white space and split string issues
  mfd: cs5535-mfd: Add missing line spacing and make local array static
  mfd: cros_ec_spi: Repair comparison ordering issue
  mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue.
  mfd: asic3: Fix a plethora of Checkpatch errors and warnings
  mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings
  mfd: arizona-i2c: Add blank line formatting after declaration
  mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead
  mfd: adp5520: Some trivial 'no space before tab' fixes
  mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues
  mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error
  mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting
  mfd: ab8500-core: Fix many warnings reported by Checkpatch
  mfd: ab2100-otp: Remove pointless 'out of memory' error message
  mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch
  mfd: aat2870-core: Remove unnecessary 'out of memory' message
  mfd: 88pm860x-core: Fix commenting and declaration spacing
  ...

8 years agoMerge tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power...
Linus Torvalds [Thu, 14 Jan 2016 18:45:11 +0000 (10:45 -0800)]
Merge tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
 "I have mostly fixes in the power-supply tree for the 4.5 kernel.  I
  should mention, that the top-most commit has not been in next, but
  it's a fix changing only a single register offset.

  Summary:

   - uncouple CONFIG_POWER_RESET from CONFIG_POWER_SUPPLY

   - misc fixes"

* tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  power: bq27xxx_battery: Fix bq27541 AveragePower register address
  power: test_power: correctly handle empty writes
  power: generic-adc-battery: use to_delayed_work
  power: isp1704_charger: Fix isp1704_write() definition
  power: bq27xxx: fix register numbers of bq27500
  power: bq27xxx: fix reading for bq27000 and bq27010
  power: Fix unmet dependency on POWER_SUPPLY by POWER_RESET by uncoupling them
  power: bq27xxx_battery: Reorganize I2C into a module
  power: bq27xxx: don't fill system log by missing battery
  power: max8903_charger: set IRQF_ONESHOT if no primary handler is specified
  power/reset: at91-reset: add missing of_node_put
  power: ds2782_battery: constify ds278x_battery_ops structure
  power: bq2415x_charger: Delete unnecessary checks before the function call "of_node_put"

8 years agoMerge tag 'hsi-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
Linus Torvalds [Thu, 14 Jan 2016 18:40:16 +0000 (10:40 -0800)]
Merge tag 'hsi-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi

Pull HSI updates from Sebastian Reichel:
 "Misc fixes"

* tag 'hsi-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  HSI: omap_ssi_port: fix handling of_get_named_gpio result
  HSI: omap_ssi: fix handling ida_simple_get result
  HSI: Remove struct hsi_client private fields from kernel-doc

8 years agoMerge tag 'backlight-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 14 Jan 2016 18:34:33 +0000 (10:34 -0800)]
Merge tag 'backlight-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
  Fix-ups:
   - Take heed of GPIO default-on requests; gpio_backlight
   - Enable DT probing; tps65217_bl

  Bug Fixes:
   - Free resources in error path; pwm_bl
   - Fix uninitialised variable warning; adp8860_bl, adp8870_bl
   - Protect unconditional DT look-ups from non-DT platforms; pwm_bl
   - Fix backlight flicker; pwm_bl

* tag 'backlight-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  backlight: pwm_bl: Free PWM requested by legacy API on error path
  backlight: adp8860: Fix another uninitialized variable use
  backlight: gpio-backlight: Use default-on on GPIO request
  backlight: pwm_bl: Fix broken PWM backlight for non-dt platforms
  backlight: tps65217_bl: Add MODULE_DEVICE_TABLE
  backlight: pwm_bl: Avoid backlight flicker when probed from DT
  backlight: adp88x0: Fix uninitialized variable use

8 years agoMerge branches 'for-4.4/upstream-fixes', 'for-4.5/async-suspend', 'for-4.5/container...
Jiri Kosina [Thu, 14 Jan 2016 15:11:06 +0000 (16:11 +0100)]
Merge branches 'for-4.4/upstream-fixes', 'for-4.5/async-suspend', 'for-4.5/container-of-cleanups', 'for-4.5/core', 'for-4.5/i2c-hid', 'for-4.5/logitech', 'for-4.5/multitouch', 'for-4.5/sony', 'for-4.5/upstream' and 'for-4.5/wacom' into for-linus

8 years agox86/cpu/amd: Remove an unneeded condition in srat_detect_node()
Dan Carpenter [Wed, 13 Jan 2016 12:39:40 +0000 (15:39 +0300)]
x86/cpu/amd: Remove an unneeded condition in srat_detect_node()

Originally we calculated ht_nodeid as "ht_nodeid = apicid -
boot_cpu_id;" so presumably it could be negative.

But after commit:

  01aaea1afbcd ('x86: introduce initial apicid')

we use c->initial_apicid which is an unsigned short and thus always >= 0.

It causes a static checker warning to test for impossible
conditions so let's remove it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Hector Marco-Gisbert <hecmargi@upv.es>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Link: http://lkml.kernel.org/r/20160113123940.GE19993@mwanda
Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agomfd: davinci_voicecodec: Remove pointless 'out of memory' error message
Lee Jones [Wed, 28 Oct 2015 16:54:29 +0000 (16:54 +0000)]
mfd: davinci_voicecodec: Remove pointless 'out of memory' error message

WARNING: Possible unnecessary 'out of memory' message
+       if (!davinci_vc) {
+               dev_dbg(&pdev->dev,

total: 0 errors, 1 warnings, 154 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: da9052-irq: Fix trivial 'space before comma' error
Lee Jones [Wed, 28 Oct 2015 16:53:04 +0000 (16:53 +0000)]
mfd: da9052-irq: Fix trivial 'space before comma' error

ERROR: space prohibited before that ',' (ctx:WxW)
+       da9052_free_irq(da9052, DA9052_IRQ_ADC_EOM , da9052);

total: 1 errors, 0 warnings, 290 lines checked

Cc: Support Opensource <support.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: da9052-i2c: Fix tabbing/whitespace issue
Lee Jones [Wed, 28 Oct 2015 16:51:11 +0000 (16:51 +0000)]
mfd: da9052-i2c: Fix tabbing/whitespace issue

WARNING: suspect code indent for conditional statements (8, 24)
+       if (!i2c_safe_reg(reg))
+                       return regmap_read(da9052->regmap,

total: 0 errors, 1 warnings, 226 lines checked

Cc: Support Opensource <support.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: da903x: Fix white space and split string issues
Lee Jones [Wed, 28 Oct 2015 16:47:00 +0000 (16:47 +0000)]
mfd: da903x: Fix white space and split string issues

While we're at it, let's also match the MODULE_LICENSE with the header.

WARNING: please, no space before tabs
+ * ^IMike Rapoport <mike@compulab.co.il>$

WARNING: please, no space before tabs
+ * ^IEric Miao <eric.miao@marvell.com>$

WARNING: quoted string split across lines
+MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"
+             "Mike Rapoport <mike@compulab.co.il>");

total: 0 errors, 3 warnings, 574 lines checked

Cc: Support Opensource <support.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: cs5535-mfd: Add missing line spacing and make local array static
Lee Jones [Wed, 28 Oct 2015 16:44:58 +0000 (16:44 +0000)]
mfd: cs5535-mfd: Add missing line spacing and make local array static

WARNING: Missing a blank line after declarations
+       struct resource *res;
+       res = platform_get_resource(pdev, IORESOURCE_IO, 0);

WARNING: char * array declaration might be better as static const
+       const char *acpi_clones[] = { "olpc-xo1-pm-acpi", "olpc-xo1-sci-acpi" };

total: 0 errors, 2 warnings, 192 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: cros_ec_spi: Repair comparison ordering issue
Lee Jones [Wed, 28 Oct 2015 16:42:45 +0000 (16:42 +0000)]
mfd: cros_ec_spi: Repair comparison ordering issue

WARNING: Comparisons should place the constant on the right side of the test
+       BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);

WARNING: Comparisons should place the constant on the right side of the test
+       BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);

total: 0 errors, 2 warnings, 731 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue.
Lee Jones [Wed, 28 Oct 2015 16:02:48 +0000 (16:02 +0000)]
mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue.

ERROR: code indent should use tabs where possible
+ ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$

WARNING: please, no space before tabs
+ ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$

WARNING: please, no spaces at the start of a line
+ ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$

total: 1 errors, 2 warnings, 366 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: asic3: Fix a plethora of Checkpatch errors and warnings
Lee Jones [Wed, 28 Oct 2015 14:11:23 +0000 (14:11 +0000)]
mfd: asic3: Fix a plethora of Checkpatch errors and warnings

ERROR: Macros with complex values should be enclosed in parentheses
+#define INIT_CDEX(_name, _rate)        \
+       [ASIC3_CLOCK_##_name] = {               \
+               .cdex = CLOCK_CDEX_##_name,     \
+               .rate = _rate,                  \
+       }

WARNING: line over 80 characters
+                                                           ASIC3_GPIO_INT_STATUS);

WARNING: void function return statements are not generally useful
+       return;
+}

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+       msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+       msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+       msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+       msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+       msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+       msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+               msleep(1);
WARNING: line over 80 characters
+               asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) +

WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then p
r_err(...  to printk(KERN_ERR ...
+               printk(KERN_ERR "kzalloc failed\n");

WARNING: Possible unnecessary 'out of memory' message
+       if (asic == NULL) {
+               printk(KERN_ERR "kzalloc failed\n");

WARNING: Missing a blank line after declarations
+       int retval = 0;
+       retval = platform_driver_probe(&asic3_device_driver, asic3_probe);

total: 1 errors, 13 warnings, 1081 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings
Lee Jones [Wed, 28 Oct 2015 13:57:44 +0000 (13:57 +0000)]
mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings

WARNING: Possible unnecessary 'out of memory' message
+               if (!pdata) {
+                       dev_err(&client->dev, "Failed to allocate pdata\n");

WARNING: Possible unnecessary 'out of memory' message
+       if (!as3711) {
+               dev_err(&client->dev, "Memory allocation failed\n");

WARNING: line over 80 characters
+               dev_err(&client->dev, "regmap initialization failed: %d\n", ret);

WARNING: line over 80 characters
+       /* We can reuse as3711_subdevs[], it will be copied in mfd_add_devices() */

WARNING: line over 80 characters
+               as3711_subdevs[AS3711_REGULATOR].platform_data = &pdata->regulator;

WARNING: line over 80 characters
+               as3711_subdevs[AS3711_REGULATOR].pdata_size = sizeof(pdata->regulator);

WARNING: line over 80 characters
+               as3711_subdevs[AS3711_BACKLIGHT].platform_data = &pdata->backlight;

WARNING: line over 80 characters
+               as3711_subdevs[AS3711_BACKLIGHT].pdata_size = sizeof(pdata->backlight);

total: 0 errors, 8 warnings, 236 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: arizona-i2c: Add blank line formatting after declaration
Lee Jones [Wed, 28 Oct 2015 13:54:07 +0000 (13:54 +0000)]
mfd: arizona-i2c: Add blank line formatting after declaration

WARNING: Missing a blank line after declarations
+       struct arizona *arizona = dev_get_drvdata(&i2c->dev);
+       arizona_dev_exit(arizona);

total: 0 errors, 1 warnings, 120 lines checked

Cc: patches@opensource.wolfsonmicro.com
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead
Lee Jones [Wed, 28 Oct 2015 12:42:30 +0000 (12:42 +0000)]
mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+               msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+                       msleep(5);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+               msleep(1);

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+               msleep(1);

total: 0 errors, 4 warnings, 1407 lines checked

Cc: patches@opensource.wolfsonmicro.com
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: adp5520: Some trivial 'no space before tab' fixes
Lee Jones [Wed, 28 Oct 2015 12:21:12 +0000 (12:21 +0000)]
mfd: adp5520: Some trivial 'no space before tab' fixes

WARNING: please, no space before tabs
+ * ^IMike Rapoport <mike@compulab.co.il>$

WARNING: please, no space before tabs
+ * ^IEric Miao <eric.miao@marvell.com>$

WARNING: please, no space before tabs
+^I.id_table ^I= adp5520_id,$

total: 0 errors, 3 warnings, 365 lines checked

Cc: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues
Lee Jones [Wed, 28 Oct 2015 11:11:05 +0000 (11:11 +0000)]
mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues

WARNING: char * array declaration might be better as static const
+       static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"};

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then
 pr_info(...  to printk(KERN_INFO ...
+                       printk(KERN_INFO

WARNING: quoted string split across lines
+                              "Charger \"%s\" is connected with known battery."
+                              " Rebooting.\n",

WARNING: quoted string split across lines
+                                       "unable to set sysClkReq%dRfClkBuf: "
+                                       "%d\n", j + 1, ret);

total: 0 errors, 4 warnings, 199 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error
Lee Jones [Wed, 28 Oct 2015 10:32:10 +0000 (10:32 +0000)]
mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error

WARNING: line over 80 characters
+#define ADC_CH_IBAT_MIN                        (-6000) /* mA range measured by ADC for ib
t*/

WARNING: line over 80 characters
+#define ADC_CH_IBAT_MIN_V              (-60)   /* mV range measured by ADC for ibat*/

WARNING: suspect code indent for conditional statements (16, 20)
+               if (!strcmp(name, dev_name(gpadc->dev)))
+                   return gpadc;

WARNING: suspect code indent for conditional statements (0, 16)
+if (ad_value < 0) {
+               dev_err(gpadc->dev, "GPADC raw value failed ch: %d\n",

WARNING: quoted string split across lines
+               dev_err(gpadc->dev, "GPADC to voltage conversion failed ch:"
+                       " %d AD: 0x%x\n", channel, ad_value);

WARNING: Missing a blank line after declarations
+       int raw_data;
+       raw_data = ab8500_gpadc_double_read_raw(gpadc, channel,

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+               msleep(10);

ERROR: else should follow close brace '}'
+       }
+       else

WARNING: line over 80 characters
+                       delay_max = 10000; /* large range to optimise sleep mode */

WARNING: line over 80 characters
+                       gpadc->cal_data[ADC_INPUT_IBAT].gain = V_gain * V2A_gain;

WARNING: line over 80 characters
+       gpadc = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_gpadc), GFP_KERNEL);

WARNING: Possible unnecessary 'out of memory' message
+       if (!gpadc) {
+               dev_err(&pdev->dev, "Error: No memory\n");

WARNING: space prohibited before semicolon
+       return ;

WARNING: void function return statements are not generally useful
+       return ;
+}

WARNING: quoted string split across lines
+MODULE_AUTHOR("Arun R Murthy, Daniel Willerud, Johan Palsson,"
+               "M'boumba Cedric Madianga");

total: 1 errors, 14 warnings, 1089 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting
Lee Jones [Wed, 28 Oct 2015 09:27:32 +0000 (09:27 +0000)]
mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting

WARNING: Block comments use a trailing */ on a separate line
+                        * not be accessed from here */

WARNING: Block comments use a trailing */ on a separate line
+                        * not be accessed from here */

WARNING: Block comments use a trailing */ on a separate line
+                                * the output is wanted in any case */

WARNING: Consecutive strings are generally better as a single string
+               "  addr=0x%08X, mask=0x%X, shift=%d" "value=0x%X\n",

total: 0 errors, 4 warnings, 3331 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: ab8500-core: Fix many warnings reported by Checkpatch
Lee Jones [Wed, 28 Oct 2015 09:15:02 +0000 (09:15 +0000)]
mfd: ab8500-core: Fix many warnings reported by Checkpatch

WARNING: Block comments use a trailing */ on a separate line
+        * */

WARNING: Block comments use a trailing */ on a separate line
+        * bank on higher 8 bits and reg in lower */

WARNING: Block comments use a trailing */ on a separate line
+        * bank on higher 8 bits and reg in lower */

WARNING: suspect code indent for conditional statements (8, 24)
+       if (unlikely(*offset == 17))
+                       *offset = 24;

WARNING: suspect code indent for conditional statements (8, 24)
+       if (unlikely(*offset == 16))
+                       *offset = 25;

WARNING: suspect code indent for conditional statements (8, 24)
+       if ((i == 3) && (*offset >= 24))
+                       *offset += 2;

WARNING: ENOSYS means 'invalid syscall nr' and nothing else
+               return -ENOSYS;

WARNING: static const char * array should probably be static const char * const
+       static const char *switch_off_status[] = {

WARNING: static const char * array should probably be static const char * const
+       static const char *turn_on_status[] = {

total: 0 errors, 9 warnings, 1867 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: ab2100-otp: Remove pointless 'out of memory' error message
Lee Jones [Wed, 28 Oct 2015 09:08:22 +0000 (09:08 +0000)]
mfd: ab2100-otp: Remove pointless 'out of memory' error message

WARNING: Possible unnecessary 'out of memory' message
+       if (!otp) {
+               dev_err(&pdev->dev, "could not allocate AB3100 OTP device\n");

total: 0 errors, 1 warnings, 250 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch
Lee Jones [Tue, 27 Oct 2015 16:19:31 +0000 (16:19 +0000)]
mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch

WARNING: Missing a blank line after declarations
+       struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
+       if (!ab3100->startup_events_read)

WARNING: Possible unnecessary 'out of memory' message
+       if (!ab3100) {
+               dev_err(&client->dev, "could not allocate AB3100 device\n");

WARNING: else is not generally useful after a break or return
+                               break;
+                       } else {

total: 0 errors, 3 warnings, 996 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: aat2870-core: Remove unnecessary 'out of memory' message
Lee Jones [Tue, 27 Oct 2015 16:14:06 +0000 (16:14 +0000)]
mfd: aat2870-core: Remove unnecessary 'out of memory' message

WARNING: Possible unnecessary 'out of memory' message
+       if (!aat2870) {
+               dev_err(&client->dev,

total: 0 errors, 1 warnings, 524 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: 88pm860x-core: Fix commenting and declaration spacing
Lee Jones [Tue, 27 Oct 2015 16:12:21 +0000 (16:12 +0000)]
mfd: 88pm860x-core: Fix commenting and declaration spacing

Checkpatch output:

WARNING: Block comments use a trailing */ on a separate line
+        * - turn off */

WARNING: Missing a blank line after declarations
+       int ret;
+       ret = i2c_add_driver(&pm860x_driver);

total: 0 errors, 2 warnings, 1283 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: arizona: Add device tree binding documentation for new clock driver
Charles Keepax [Fri, 8 Jan 2016 11:29:42 +0000 (11:29 +0000)]
mfd: arizona: Add device tree binding documentation for new clock driver

Specify the device tree binding for the input clocks to Arizona devices.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: Use to_i2c_client() instead of open-coding it
Geliang Tang [Mon, 28 Dec 2015 15:00:14 +0000 (23:00 +0800)]
mfd: Use to_i2c_client() instead of open-coding it

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agodt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
Krzysztof Kozlowski [Fri, 4 Dec 2015 01:10:05 +0000 (10:10 +0900)]
dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings

The mfd/s2mpa01.txt duplicates some of the information about bindings
with old mfd/s2mps11.txt. Now common part exists entirely in
mfd/samsung,sec-core.txt so:
 - add company prefix to file name (regulator/samsung,s2mpa01.txt),
 - remove duplicated information,
 - reorganize the contents to match style of
   regulator/samsung,s2mps11.txt.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agodt-bindings: regulator/mfd: Reorganize S5M8767 bindings
Krzysztof Kozlowski [Fri, 4 Dec 2015 01:10:04 +0000 (10:10 +0900)]
dt-bindings: regulator/mfd: Reorganize S5M8767 bindings

The regulator/s5m8767-regulator.txt duplicates some of the information
about bindings with old mfd/s2mps11.txt. Now common part exists entirely
in mfd/samsung,sec-core.txt so:
 - add company prefix to file name (regulator/samsung,s5m8767.txt),
 - remove duplicated information,
 - reorganize the contents to match style of
   regulator/samsung,s2mps11.txt.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agodt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
Krzysztof Kozlowski [Fri, 4 Dec 2015 01:10:03 +0000 (10:10 +0900)]
dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings

Bindings for Samsung S2M and S5M family PMICs are in mess. They are
spread over different files and subdirectories in a non-consistent way.
The devices and respective drivers for them share a lot in common so
everything could be organized in a more readable way.

Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the
drivers for this family of devices:
 - move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD
   driver (common for entire family),
 - split clock block to clock/samsung,s2mps11.txt,
 - split regulator block to regulator/samsung,s2mps11.txt.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Michael Turquette <mturquette@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: asic3: Be sure to clamp return value
Linus Walleij [Tue, 22 Dec 2015 14:47:05 +0000 (15:47 +0100)]
mfd: asic3: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: dm355evm_mps: Be sure to clamp return value
Linus Walleij [Tue, 22 Dec 2015 14:47:31 +0000 (15:47 +0100)]
mfd: dm355evm_mps: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: htc-egpio: Be sure to clamp return value
Linus Walleij [Tue, 22 Dec 2015 14:47:39 +0000 (15:47 +0100)]
mfd: htc-egpio: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: tc6393xb: Be sure to clamp return value
Linus Walleij [Tue, 22 Dec 2015 14:47:55 +0000 (15:47 +0100)]
mfd: tc6393xb: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agomfd: tps65010: Be sure to clamp return value
Linus Walleij [Tue, 22 Dec 2015 14:48:13 +0000 (15:48 +0100)]
mfd: tps65010: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

This also start to propagate the negative error code from the
smbus call if there is one, as the last commit of this series
will make the gpiolib core deal with that properly.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
8 years agoMerge tag 'xfs-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc...
Linus Torvalds [Thu, 14 Jan 2016 05:15:18 +0000 (21:15 -0800)]
Merge tag 'xfs-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs

Pull xfs updates from Dave Chinner:
 "There's not a lot in this - the main addition is the CRC validation of
  the entire region of the log that the will be recovered, along with
  several log recovery fixes.  Most of the rest is small bug fixes and
  cleanups.

  I have three bug fixes still pending, all that address recently fixed
  regressions that I will send to next week after they've had some time
  in for-next.

  Summary:
   - extensive CRC validation during log recovery
   - several log recovery bug fixes
   - Various DAX support fixes
   - AGFL size calculation fix
   - various cleanups in preparation for new functionality
   - project quota ENOSPC notification via netlink
   - tracing and debug improvements"

* tag 'xfs-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (26 commits)
  xfs: handle dquot buffer readahead in log recovery correctly
  xfs: inode recovery readahead can race with inode buffer creation
  xfs: eliminate committed arg from xfs_bmap_finish
  xfs: bmapbt checking on debug kernels too expensive
  xfs: add tracepoints to readpage calls
  xfs: debug mode log record crc error injection
  xfs: detect and trim torn writes during log recovery
  xfs: fix recursive splice read locking with DAX
  xfs: Don't use reserved blocks for data blocks with DAX
  XFS: Use a signed return type for suffix_kstrtoint()
  libxfs: refactor short btree block verification
  libxfs: pack the agfl header structure so XFS_AGFL_SIZE is correct
  libxfs: use a convenience variable instead of open-coding the fork
  xfs: fix log ticket type printing
  libxfs: make xfs_alloc_fix_freelist non-static
  xfs: make xfs_buf_ioend_async() static
  xfs: send warning of project quota to userspace via netlink
  xfs: get mp from bma->ip in xfs_bmap code
  xfs: print name of verifier if it fails
  libxfs: Optimize the loop for xfs_bitmap_empty
  ...

8 years agoMerge tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
Linus Torvalds [Thu, 14 Jan 2016 05:01:44 +0000 (21:01 -0800)]
Merge tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs

Pull f2fs updates from Jaegeuk Kim:
 "This series adds two ioctls to control cached data and fragmented
  files.  Most of the rest fixes missing error cases and bugs that we
  have not covered so far.  Summary:

  Enhancements:
   - support an ioctl to execute online file defragmentation
   - support an ioctl to flush cached data
   - speed up shrinking of extent_cache entries
   - handle broken superblock
   - refector dirty inode management infra
   - revisit f2fs_map_blocks to handle more cases
   - reduce global lock coverage
   - add detecting user's idle time

  Major bug fixes:
   - fix data race condition on cached nat entries
   - fix error cases of volatile and atomic writes"

* tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (87 commits)
  f2fs: should unset atomic flag after successful commit
  f2fs: fix wrong memory condition check
  f2fs: monitor the number of background checkpoint
  f2fs: detect idle time depending on user behavior
  f2fs: introduce time and interval facility
  f2fs: skip releasing nodes in chindless extent tree
  f2fs: use atomic type for node count in extent tree
  f2fs: recognize encrypted data in f2fs_fiemap
  f2fs: clean up f2fs_balance_fs
  f2fs: remove redundant calls
  f2fs: avoid unnecessary f2fs_balance_fs calls
  f2fs: check the page status filled from disk
  f2fs: introduce __get_node_page to reuse common code
  f2fs: check node id earily when readaheading node page
  f2fs: read isize while holding i_mutex in fiemap
  Revert "f2fs: check the node block address of newly allocated nid"
  f2fs: cover more area with nat_tree_lock
  f2fs: introduce max_file_blocks in sbi
  f2fs crypto: check CONFIG_F2FS_FS_XATTR for encrypted symlink
  f2fs: introduce zombie list for fast shrinking extent trees
  ...

8 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Thu, 14 Jan 2016 03:37:36 +0000 (19:37 -0800)]
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull first round of SCSI updates from James Bottomley:
 "This includes driver updates from the usual suspects (bfa, arcmsr,
  scsi_dh_alua, lpfc, storvsc, cxlflash).

  The major change is the addition of the hisi_sas driver, which is an
  ARM platform device for SAS.  The other change of note is an enormous
  style transformation to the atp870u driver (which is our worst written
  SCSI driver)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (169 commits)
  cxlflash: Enable device id for future IBM CXL adapter
  cxlflash: Resolve oops in wait_port_offline
  cxlflash: Fix to resolve cmd leak after host reset
  cxlflash: Removed driver date print
  cxlflash: Fix to avoid virtual LUN failover failure
  cxlflash: Fix to escalate LINK_RESET also on port 1
  storvsc: Tighten up the interrupt path
  storvsc: Refactor the code in storvsc_channel_init()
  storvsc: Properly support Fibre Channel devices
  storvsc: Fix a bug in the layout of the hv_fc_wwn_packet
  mvsas: Add SGPIO support to Marvell 94xx
  mpt3sas: A correction in unmap_resources
  hpsa: Add box and bay information for enclosure devices
  hpsa: Change SAS transport devices to bus 0.
  hpsa: fix path_info_show
  cciss: print max outstanding commands as a hex value
  scsi_debug: Increase the reported optimal transfer length
  lpfc: Update version to 11.0.0.10 for upstream patch set
  lpfc: Use kzalloc instead of kmalloc
  lpfc: Delete unnecessary checks before the function call "mempool_destroy"
  ...

8 years agoMerge tag 'libnvdimm-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
Linus Torvalds [Thu, 14 Jan 2016 03:15:14 +0000 (19:15 -0800)]
Merge tag 'libnvdimm-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm updates from Dan Williams:
 "The bulk of this has appeared in -next and independently received a
  build success notification from the kbuild robot.  The 'for-4.5/block-
  dax' topic branch was rebased over the weekend to drop the "block
  device end-of-life" rework that Al would like to see re-implemented
  with a notifier, and to address bug reports against the badblocks
  integration.

  There is pending feedback against "libnvdimm: Add a poison list and
  export badblocks" received last week.  Linda identified some localized
  fixups that we will handle incrementally.

  Summary:

   - Media error handling: The 'badblocks' implementation that
     originated in md-raid is up-levelled to a generic capability of a
     block device.  This initial implementation is limited to being
     consulted in the pmem block-i/o path.  Later, 'badblocks' will be
     consulted when creating dax mappings.

   - Raw block device dax: For virtualization and other cases that want
     large contiguous mappings of persistent memory, add the capability
     to dax-mmap a block device directly.

   - Increased /dev/mem restrictions: Add an option to treat all
     io-memory as IORESOURCE_EXCLUSIVE, i.e. disable /dev/mem access
     while a driver is actively using an address range.  This behavior
     is controlled via the new CONFIG_IO_STRICT_DEVMEM option and can be
     overridden by the existing "iomem=relaxed" kernel command line
     option.

   - Miscellaneous fixes include a 'pfn'-device huge page alignment fix,
     block device shutdown crash fix, and other small libnvdimm fixes"

* tag 'libnvdimm-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (32 commits)
  block: kill disk_{check|set|clear|alloc}_badblocks
  libnvdimm, pmem: nvdimm_read_bytes() badblocks support
  pmem, dax: disable dax in the presence of bad blocks
  pmem: fail io-requests to known bad blocks
  libnvdimm: convert to statically allocated badblocks
  libnvdimm: don't fail init for full badblocks list
  block, badblocks: introduce devm_init_badblocks
  block: clarify badblocks lifetime
  badblocks: rename badblocks_free to badblocks_exit
  libnvdimm, pmem: move definition of nvdimm_namespace_add_poison to nd.h
  libnvdimm: Add a poison list and export badblocks
  nfit_test: Enable DSMs for all test NFITs
  md: convert to use the generic badblocks code
  block: Add badblock management for gendisks
  badblocks: Add core badblock management code
  block: fix del_gendisk() vs blkdev_ioctl crash
  block: enable dax for raw block devices
  block: introduce bdev_file_inode()
  restrict /dev/mem to idle io memory ranges
  arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug
  ...

8 years agopower: bq27xxx_battery: Fix bq27541 AveragePower register address
Liu Xiang [Sat, 9 Jan 2016 14:10:39 +0000 (22:10 +0800)]
power: bq27xxx_battery: Fix bq27541 AveragePower register address

Currently in bq27541 driver, the average power register address is
incorrectly set to 0x76, which would result in an error:
bq27xxx-battery 2-0055: error reading average power register  10: -11
According to the bq27541 datasheet, fix this problem by setting
the average power register address to 0x24.

Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices")
Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
8 years agodrivers/of: Export OF changeset functions
Gavin Shan [Wed, 4 Nov 2015 13:12:49 +0000 (00:12 +1100)]
drivers/of: Export OF changeset functions

The PowerNV PCI hotplug driver is going to use the OF changeset
to manage the changed device sub-tree. This exports those OF
changeset functions for that.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Rob Herring <robh@kernel.org>
8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Wed, 13 Jan 2016 21:16:16 +0000 (13:16 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 updates from Martin Schwidefsky:
 "Among the traditional bug fixes and cleanups are some improvements:

   - A tool to generated the facility lists, generating the bit fields
     by hand has been a source of bugs in the past

   - The spinlock loop is reordered to avoid bursts of hypervisor calls

   - Add support for the open-for-business interface to the service
     element

   - The get_cpu call is added to the vdso

   - A set of tracepoints is defined for the common I/O layer

   - The deprecated sclp_cpi module is removed

   - Update default configuration"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (56 commits)
  s390/sclp: fix possible control register corruption
  s390: fix normalization bug in exception table sorting
  s390/configs: update default configurations
  s390/vdso: optimize getcpu system call
  s390: drop smp_mb in vdso_init
  s390: rename struct _lowcore to struct lowcore
  s390/mem_detect: use unsigned longs
  s390/ptrace: get rid of long longs in psw_bits
  s390/sysinfo: add missing SYSIB 1.2.2 multithreading fields
  s390: get rid of CONFIG_SCHED_MC and CONFIG_SCHED_BOOK
  s390/Kconfig: remove pointless 64 bit dependencies
  s390/dasd: fix failfast for disconnected devices
  s390/con3270: testing return kzalloc retval
  s390/hmcdrv: constify hmcdrv_ftp_ops structs
  s390/cio: add NULL test
  s390/cio: Change I/O instructions from inline to normal functions
  s390/cio: Introduce common I/O layer tracepoints
  s390/cio: Consolidate inline assemblies and related data definitions
  s390/cio: Fix incorrect xsch opcode specification
  s390/cio: Remove unused inline assemblies
  ...

8 years agoMerge tag 'please-pull-fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl...
Linus Torvalds [Wed, 13 Jan 2016 20:49:04 +0000 (12:49 -0800)]
Merge tag 'please-pull-fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux

Pull ia64 build fixes from Tony Luck:
 "The ARM guys broke the ia64 build ...  but gave me fixes, so it's all
  good now"

* tag 'please-pull-fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap
  ia64: split off early_ioremap() declarations into asm/early_ioremap.h

8 years agoMerge tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Wed, 13 Jan 2016 19:46:37 +0000 (11:46 -0800)]
Merge tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull second batch of media updates from Mauro Carvalho Chehab:
 "This is the second part of the media patches.  It contains the media
  controller next generation patches, with is the result of one year of
  discussions and development.  It also contains patches to enable media
  controller support at the DVB subsystem.

  The goal is to improve the media controller to allow proper support
  for other types of Video4Linux devices (radio and TV ones) and to
  extend the media controller functionality to allow it to be used by
  other subsystems like DVB, ALSA and IIO.

  In order to use the new functionality, a new ioctl is needed
  (MEDIA_IOC_G_TOPOLOGY).  As we're still discussing how to pack the
  struct fields of this ioctl in order to avoid compat32 issues, I
  decided to add a patch at the end of this series commenting out the
  new ioctl, in order to postpone the addition of the new ioctl to the
  next Kernel version (4.6).

  With that, no userspace visible changes should happen at the media
  controller API, as the existing ioctls are untouched.  Yet, it helps
  DVB, ALSA and IIO developers to develop and test the patches adding
  media controller support there, as the core will contain all required
  internal changes to allow adding support for devices that belong to
  those subsystems"

* tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (177 commits)
  [media] Postpone the addition of MEDIA_IOC_G_TOPOLOGY
  [media] mxl111sf: Add a tuner entity
  [media] dvbdev: create links on devices with multiple frontends
  [media] media-entitiy: add a function to create multiple links
  [media] dvb-usb-v2: postpone removal of media_device
  [media] dvbdev: Add RF connector if needed
  [media] dvbdev: remove two dead functions if !CONFIG_MEDIA_CONTROLLER_DVB
  [media] call media_device_init() before registering the V4L2 device
  [media] uapi/media.h: Use u32 for the number of graph objects
  [media] media-entity: don't sleep at media_device_register_entity()
  [media] media-entity: increase max number of PADs
  [media] media-entity.h: document the remaining functions
  [media] media-device.h: use just one u32 counter for object ID
  [media] media-entity.h fix documentation for several parameters
  [media] DocBook: document media_entity_graph_walk_cleanup()
  [media] move documentation to the header files
  [media] media: Move MEDIA_ENTITY_MAX_PADS from media-entity.h to media-entity.c
  [media] media: Remove pre-allocated entity enumeration bitmap
  [media] staging: v4l: davinci_vpbe: Use the new media graph walk interface
  [media] staging: v4l: omap4iss: Use the new media graph walk interface
  ...

8 years agoMerge tag 'spi-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Wed, 13 Jan 2016 19:38:27 +0000 (11:38 -0800)]
Merge tag 'spi-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "A quiet release for SPI, not even many driver updates:

   - Add a dummy loopback driver for use in exercising framework
     features during development.

   - Move the test utilities to tools/ and add support for transferring
     data to and from a file instead of stdin and stdout to spidev_test.

   - Support for Mediatek MT2701 and Renesas AG5 deices"

* tag 'spi-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (69 commits)
  spi: loopback: fix typo in MODULE_PARM_DESC
  spi: sun4i: Prevent chip-select from being activated twice before a transfer
  spi: loopback-test: spi_check_rx_ranges can get always done
  spi: loopback-test: rename method spi_test_fill_tx to spi_test_fill_pattern
  spi: loopback-test: write rx pattern also when running without tx_buf
  spi: fsl-espi: expose maximum transfer size limit
  spi: expose master transfer size limitation.
  spi: zynq: use to_platform_device()
  spi: cadence: use to_platform_device()
  spi: mediatek: Add spi support for mt2701 IC
  spi: mediatek: merge all identical compat to mtk_common_compat
  spi: mtk: Add bindings for mediatek MT2701 soc platform
  spi: mediatek: Prevent overflows in FIFO transfers
  spi: s3c64xx: Remove unused platform_device_id entries
  spi: use to_spi_device
  spi: dw: Use SPI_TMOD_TR rather than magic const 0 to set tmode
  spi: imx: defer spi initialization, if DMA engine is
  spi: imx: return error from dma channel request
  spi: imx: enable loopback only for ECSPI controller family
  spi: imx: fix loopback mode setup after controller reset
  ...