1
0
Fork 0
Commit Graph

2202 Commits (5da99328f2595d2b376fcd2a87974b658f396da8)

Author SHA1 Message Date
Thomas Gleixner 8b0e195314 ktime: Cleanup ktime_set() usage
ktime_set(S,N) was required for the timespec storage type and is still
useful for situations where a Seconds and Nanoseconds part of a time value
needs to be converted. For anything where the Seconds argument is 0, this
is pointless and can be replaced with a simple assignment.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
2016-12-25 17:21:22 +01:00
Linus Torvalds 7c0f6ba682 Replace <asm/uaccess.h> with <linux/uaccess.h> globally
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>'
  sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-24 11:46:01 -08:00
Linus Torvalds 8421c60446 platform-drivers-x86 for 4.10-2
Move and add registration for the mlx-platform driver. Introduce button and lid
 drivers for the surface3 (different from the surface3-pro). Add BXT PMIC TMU
 support. Add Y700 to existing ideapad-laptop quirk.
 
 ideapad-laptop:
  - Add Y700 15-ACZ to no_hw_rfkill DMI list
 
 surface3_button:
  - Introduce button support for the Surface 3
 
 surface3-wmi:
  - Add custom surface3 platform device for controlling LID
  - Balance locking on error path
 
 mlx-platform:
  - Add mlxcpld-hotplug driver registration
  - Fix semicolon.cocci warnings
  - Move module from arch/x86
 
 platform/x86:
  - Add Whiskey Cove PMIC TMU support
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYVxXxAAoJEKbMaAwKp364mDAIAL750zoO/liY1qfFGktkY2zS
 xknJqh4UeIVW6iN9hEq7jQD3jkFl7hNuXgFyogLZgJQge8gfufsOD7ljkhp2wVF2
 3Ir437f4GdcUeuhO6PwuPZnn++Y6oH2rLZc1d+5anZRikW470tnXitrXs5hsqG57
 74KiSFa+v+Uj1kqU4Gjt0QDSfmQc185Wn5xieHPpZrcjDaut+N4t06+MDMcH7fjk
 6nJ+tvo/dreZojA+AklljaNB2BioIGbEOGamnxOJ9Rjs0jV2d0A1c/6XBHDe+Xtu
 SkWqvjdrLOSxAjErBpB97VYnYihjCDXfl+DIABOdumGO6hJz01DvbZ+VVLwGM0E=
 =YH31
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v4.10-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull more x86 platform driver updates from Darren Hart:
 "Move and add registration for the mlx-platform driver. Introduce
  button and lid drivers for the surface3 (different from the
  surface3-pro). Add BXT PMIC TMU support. Add Y700 to existing
  ideapad-laptop quirk.

  Summary:

  ideapad-laptop:
   - Add Y700 15-ACZ to no_hw_rfkill DMI list

  surface3_button:
   - Introduce button support for the Surface 3

  surface3-wmi:
   - Add custom surface3 platform device for controlling LID
   - Balance locking on error path

  mlx-platform:
   - Add mlxcpld-hotplug driver registration
   - Fix semicolon.cocci warnings
   - Move module from arch/x86

  platform/x86:
   - Add Whiskey Cove PMIC TMU support"

* tag 'platform-drivers-x86-v4.10-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
  platform/x86: surface3-wmi: Balance locking on error path
  platform/x86: Add Whiskey Cove PMIC TMU support
  platform/x86: ideapad-laptop: Add Y700 15-ACZ to no_hw_rfkill DMI list
  platform/x86: Introduce button support for the Surface 3
  platform/x86: Add custom surface3 platform device for controlling LID
  platform/x86: mlx-platform: Add mlxcpld-hotplug driver registration
  platform/x86: mlx-platform: Fix semicolon.cocci warnings
  platform/x86: mlx-platform: Move module from arch/x86
2016-12-18 15:45:33 -08:00
Andy Shevchenko 83da6b5991 platform/x86: surface3-wmi: Balance locking on error path
There is a possibility that lock will be left acquired.
Consolidate error path under out_free_unlock label.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-18 14:56:43 -08:00
Nilesh Bacchewar 957ae50981 platform/x86: Add Whiskey Cove PMIC TMU support
This adds TMU (Time Management Unit) support for Intel BXT platform.
It enables the alarm wake-up functionality in the TMU unit of Whiskey Cove
PMIC.

Signed-off-by: Nilesh Bacchewar <nilesh.bacchewar@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[andy: resolve merge conflict in Kconfig]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-18 14:56:37 -08:00
velemas e297046875 platform/x86: ideapad-laptop: Add Y700 15-ACZ to no_hw_rfkill DMI list
Like other Y700 models Lenovo Y700 15-ACZ does not have a physical rfkill switch.
ideapad-laptop wrongly reports all radios as blocked by hardware which causes
wireless network connections to fail.

Add this model without an rfkill switch to the no_hw_rfkill list.

Signed-off-by: Artiom Vaskov <velemas@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-16 23:30:26 +02:00
Benjamin Tissoires 1a64b719d3 platform/x86: Introduce button support for the Surface 3
The Surface 3 is not following the ACPI spec for PNP0C40, but nearly.
The device is connected to a I2C device that might have some magic
but we don't know about.
Just create the device after the enumeration and use the declared GPIOs
to provide button support.

This driver is just an adaptation of drivers/input/misc/soc_button_array.c

The Surface Pro 3 is using an ACPI driver and matches against the bid
of the device ("VGBI"). To prevent this incompatible driver to be used
on the Surface Pro, we add a match on the Surface 3 bid "TEV2".

link: https://bugzilla.kernel.org/show_bug.cgi?id=102761

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-16 23:30:26 +02:00
Benjamin Tissoires 3dda3b3798 platform/x86: Add custom surface3 platform device for controlling LID
The LID state provided by ACPI on the Surface 3 is not accurate.
The ACPI node doesn't get notified on LID open, which means the
LID input switch stays close most of the time.

Fortunatelly, there is a WMI method which directly queries the
GPIO underneath the LID state, so it's far more reliable than ACPI.
To get the notifications that the LID was opened/closed, we can
rely on the ACPI notification of the touchscreen: the DSDT shows
that the touchscreen will get notified on close/open as it also
controls its _STA method.

Note that we need to set the tag "power-switch" to the LID
input node through a udev rule for logind to accept it:

SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="surface3-wmi", \
	TAG+="power-switch"

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-16 23:30:25 +02:00
Vadim Pasternak afc4715901 platform/x86: mlx-platform: Add mlxcpld-hotplug driver registration
Add calls for mlxcpld-hotplug platform driver registration/unregistration
and add platform hotplug data configurations. This driver, when registered
within system will handle system hot-plug events for the power suppliers,
power cables and fans (insertion and removing). These events are
controlled through CPLD Lattice device.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-16 23:30:25 +02:00
kbuild test robot c3886c9d60 platform/x86: mlx-platform: Fix semicolon.cocci warnings
drivers/platform/x86/mlx-platform.c:219:2-3: Unneeded semicolon

 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

CC: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-16 23:30:25 +02:00
Vadim Pasternak 6613d18e90 platform/x86: mlx-platform: Move module from arch/x86
Since mlx-platform is not an architectural driver, it is moved out
of arch/x86/platform to drivers/platform/x86.
Relevant Makefile and Kconfig are updated.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-16 23:30:24 +02:00
Linus Torvalds e18bf801f1 platform-drivers-x86 for 4.10-1
Introduce one new driver for Mellanox platforms. Add support for various new
 models to existing drivers via quirks, hotkeys, etc. Significant updates to
 intel_pmc_core in support of Kabylake and Sunrise Point PCH power management
 debug. Some cleanup and refactoring across various drivers.
 
 dell-laptop:
  - Use brightness_set_blocking for kbd_led_level_set
 
 thinkpad_acpi:
  - Initialize local in_tablet_mode and type
  - Fix old style declaration GCC warning
  - Adding new hotkey ID for Lenovo thinkpad
  - Add support for X1 Yoga (2016) Tablet Mode
  - Move tablet detection into separate function
 
 asus-nb-wmi:
  - Add X45U quirk
  - Make use of dmi->ident
 
 asus-wmi:
  - Set specified XUSB2PR value for X550LB
 
 intel_mid_thermal:
  - Fix suspend handlers unused warning
 
 intel-vbtn:
  - Switch to use devm_input_allocate_device
 
 dell-wmi:
  - Add events created by Dell Rugged 2-in-1s
  - Adjust wifi catcher to emit KEY_WLAN
 
 intel_pmc_core:
  - Add KBL CPUID support
  - Add LTR IGNORE debug feature
  - Add MPHY PLL clock gating status
  - ModPhy core lanes pg status
  - Add PCH IP Power Gating Status
  - Fix PWRMBASE mask and mmio reg len
 
 acer-wmi:
  - Only supports AMW0_GUID1 on acer family
 
 mlx-platform:
  - Introduce support for Mellanox hotplug driver
 
 platform/x86:
  - Use ACPI_FAILURE at appropriate places
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYUwFxAAoJEKbMaAwKp3645GkH/RjsE8jubyerhlKqgG4UZaRA
 2a2NnCOI1fuDqSV0bgIo4rzMHeHHjR8Hosz6HXkb3cC67QNfae3Xasr2+vqzqqKd
 hJFUL/y6JmAhLUcPVp49HWOLrYLKM12iLyEidPOor4r/qWrarLtVEyvX5O8VEy01
 +cM29+KcZnHjtQQoDaVwWZ1bEbLVNRlSrQ/YZivGBPXJBsvnz1Wq5xPuGHDm660X
 rVw8h1GojPwctiNWTpw2VlMUz8Ho0yXMBAPTpEJOzlFR8FTaSD6XQqm/uZ5w8ToJ
 Sn12XavaKeQSki7VVTmouL+L4Ams0Ygz8pgDd3ynhN6U/hFfTWbGhdRCILxmSRk=
 =iHwp
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v4.10-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform driver updates from Darrent Hart:
 "Introduce one new driver for Mellanox platforms. Add support for
  various new models to existing drivers via quirks, hotkeys, etc.
  Significant updates to intel_pmc_core in support of Kabylake and
  Sunrise Point PCH power management debug. Some cleanup and refactoring
  across various drivers.

  Detailed summary:

  dell-laptop:
   - Use brightness_set_blocking for kbd_led_level_set

  thinkpad_acpi:
   - Initialize local in_tablet_mode and type
   - Fix old style declaration GCC warning
   - Adding new hotkey ID for Lenovo thinkpad
   - Add support for X1 Yoga (2016) Tablet Mode
   - Move tablet detection into separate function

  asus-nb-wmi:
   - Add X45U quirk
   - Make use of dmi->ident

  asus-wmi:
   - Set specified XUSB2PR value for X550LB

  intel_mid_thermal:
   - Fix suspend handlers unused warning

  intel-vbtn:
   - Switch to use devm_input_allocate_device

  dell-wmi:
   - Add events created by Dell Rugged 2-in-1s
   - Adjust wifi catcher to emit KEY_WLAN

  intel_pmc_core:
   - Add KBL CPUID support
   - Add LTR IGNORE debug feature
   - Add MPHY PLL clock gating status
   - ModPhy core lanes pg status
   - Add PCH IP Power Gating Status
   - Fix PWRMBASE mask and mmio reg len

  acer-wmi:
   - Only supports AMW0_GUID1 on acer family

  mlx-platform:
   - Introduce support for Mellanox hotplug driver

  platform/x86:
   - Use ACPI_FAILURE at appropriate places"

* tag 'platform-drivers-x86-v4.10-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (22 commits)
  platform/x86: thinkpad_acpi: Initialize local in_tablet_mode and type
  platform/x86: dell-laptop: Use brightness_set_blocking for kbd_led_level_set
  platform/x86: thinkpad_acpi: Fix old style declaration GCC warning
  platform/x86: thinkpad_acpi: Adding new hotkey ID for Lenovo thinkpad
  platform/x86: thinkpad_acpi: Add support for X1 Yoga (2016) Tablet Mode
  platform/x86: thinkpad_acpi: Move tablet detection into separate function
  platform/x86: asus-nb-wmi.c: Add X45U quirk
  platform/x86: asus-nb-wmi: Make use of dmi->ident
  platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB
  platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
  platform/x86: intel-vbtn: Switch to use devm_input_allocate_device
  platform/x86: Use ACPI_FAILURE at appropriate places
  platform/x86: dell-wmi: Add events created by Dell Rugged 2-in-1s
  platform/x86: dell-wmi: Adjust wifi catcher to emit KEY_WLAN
  platform/x86: intel_pmc_core: Add KBL CPUID support
  platform/x86: intel_pmc_core: Add LTR IGNORE debug feature
  platform/x86: intel_pmc_core: Add MPHY PLL clock gating status
  platform/x86: intel_pmc_core: ModPhy core lanes pg status
  platform/x86: intel_pmc_core: Add PCH IP Power Gating Status
  platform/x86: intel_pmc_core: Fix PWRMBASE mask and mmio reg len
  ...
2016-12-15 13:31:25 -08:00
Darren Hart cb2bf25145 platform/x86: thinkpad_acpi: Initialize local in_tablet_mode and type
linux-next reported in_tablet_mode and type may be used uninitialized
after:

b318002838 ("platform/x86: thinkpad_acpi: Move tablet detection into separate function")

This turns out to be a false positive as the pr_info call cannot be
reached if tp_features.hotkey_tablet (global scope) is 0, and
in_tablet_mode and type are assigned in both places
tp_features.hotkey_tablet is assigned.

Regardless, to make it explicit and avoid further reports, initialize
in_tablet_mode to 0 and type to NULL.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Lyude <lyude@redhat.com>
2016-12-15 12:31:48 -08:00
Linus Torvalds b78b499a67 Char/Misc driver patches for 4.10-rc1
Here's the big char/misc driver patches for 4.10-rc1.  Lots of tiny
 changes over lots of "minor" driver subsystems, the largest being some
 new FPGA drivers.  Other than that, a few other new drivers, but no new
 driver subsystems added for this kernel cycle, a nice change.
 
 All of these have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWFAtwA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykyCgCeJn36u1AsBi7qZ3u/1hwD8k56s2IAnRo6U31r
 WW65YcNTK7qYXqNbfgIa
 =/t/V
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver updates from Greg KH:
 "Here's the big char/misc driver patches for 4.10-rc1. Lots of tiny
  changes over lots of "minor" driver subsystems, the largest being some
  new FPGA drivers. Other than that, a few other new drivers, but no new
  driver subsystems added for this kernel cycle, a nice change.

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (107 commits)
  uio-hv-generic: store physical addresses instead of virtual
  Tools: hv: kvp: configurable external scripts path
  uio-hv-generic: new userspace i/o driver for VMBus
  vmbus: add support for dynamic device id's
  hv: change clockevents unbind tactics
  hv: acquire vmbus_connection.channel_mutex in vmbus_free_channels()
  hyperv: Fix spelling of HV_UNKOWN
  mei: bus: enable non-blocking RX
  mei: fix the back to back interrupt handling
  mei: synchronize irq before initiating a reset.
  VME: Remove shutdown entry from vme_driver
  auxdisplay: ht16k33: select framebuffer helper modules
  MAINTAINERS: add git url for fpga
  fpga: Clarify how write_init works streaming modes
  fpga zynq: Fix incorrect ISR state on bootup
  fpga zynq: Remove priv->dev
  fpga zynq: Add missing \n to messages
  fpga: Add COMPILE_TEST to all drivers
  uio: pruss: add clk_disable()
  char/pcmcia: add some error checking in scr24x_read()
  ...
2016-12-13 12:11:01 -08:00
Hans de Goede 1d161d4cd7 platform/x86: dell-laptop: Use brightness_set_blocking for kbd_led_level_set
kbd_led_level_set uses dell_smbios call which blocks, so the kbd_led
classdev should use the brightness_set_blocking callback.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:29:08 -08:00
Tobias Klauser bb55a2ee76 platform/x86: thinkpad_acpi: Fix old style declaration GCC warning
Fix an [-Wold-style-declaration] GCC warning by moving the inline
keyword before the return type.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:29:07 -08:00
Hui Wang a3c42a467a platform/x86: thinkpad_acpi: Adding new hotkey ID for Lenovo thinkpad
Recently we met an issue on lots of Lenovo thinkpad laptops (those
laptops are not released to market yet), the issue is that the
thinkpad_acpi.ko can't be automatically loaded as before.

Through debugging, we found the HKEY_HID is LEN0268 instead of
LEN0068 on those machines, and the MHKV is 0x200 instead of
0x100. So adding the new ID into the driver.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:29:07 -08:00
Lyude b03f4d4946 platform/x86: thinkpad_acpi: Add support for X1 Yoga (2016) Tablet Mode
For whatever reason, the X1 Yoga doesn't support the normal method of
querying for tablet mode. Instead of providing the MHKG method under the
hotkey handle, we're instead given the CMMD method under the EC handle.
Values on this handle are either 0x1, laptop mode, or 0x6, tablet mode.

Tested-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Lyude <lyude@redhat.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:29:06 -08:00
Lyude b318002838 platform/x86: thinkpad_acpi: Move tablet detection into separate function
The hotkey events and ACPI handles used for detecting tablet mode on a
few of the newer thinkpad models (Yoga X1 and the Yoga 260 specifically)
have been changed around, so unfortunately this means we're definitely
going to need to probe for multiple types of tablet mode support. Since
the hotkey_init() is already a lot larger than it should be, let's split
up this detection into its own function to make things a little easier
to read.

As well, since we're going to have multiple types of tablet modes, make
hotkey_tablet into an enum so we can also use it to indicate the type of
tablet mode reporting the machine supports.

Suggested by Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Lyude <lyude@redhat.com>
Cc: Daniel Martin <consume.noise@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:29:05 -08:00
Marcos Paulo de Souza e74e259939 platform/x86: asus-nb-wmi.c: Add X45U quirk
Without this patch, the Asus X45U wireless card can't be turned
on (hard-blocked), but after a suspend/resume it just starts working.

Following this bug report[1], there are other cases like this one, but
this Asus is the only model that I can test.

[1] https://ubuntuforums.org/showthread.php?t=2181558

Cc: stable@vger.kernel.org # 4.4.x-
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:29:04 -08:00
Marcos Paulo de Souza 085370eb19 platform/x86: asus-nb-wmi: Make use of dmi->ident
Make use of dmi->ident as other drivers do, like fujitsu, intel,
hp and samsung.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:29:04 -08:00
Kai-Chuan Hsieh 8023eff10e platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB
The bluetooth adapter Atheros AR3012 can't be enumerated
and make the bluetooth function broken.

T:  Bus=02 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=13d3 ProdID=3362 Rev=00.02
S:  Manufacturer=Atheros Communications
S:  Product=Bluetooth USB Host Controller
S:  SerialNumber=Alaska Day 2006
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

The error is:

 usb 2-6: device not accepting address 7, error -62
 usb usb2-port6: unable to enumerate USB device

It is caused by adapter's connected port is mapped to xHC
controller, but the xHCI is not supported by the usb device.

The output of 'sudo lspci -nnxxx -s 00:14.0':

 00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04)
 00: 86 80 31 9c 06 04 90 02 04 30 03 0c 00 00 00 00
 10: 04 00 a0 f7 00 00 00 00 00 00 00 00 00 00 00 00
 20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 1f 20
 30: 00 00 00 00 70 00 00 00 00 00 00 00 0b 01 00 00
 40: fd 01 36 80 89 c6 0f 80 00 00 00 00 00 00 00 00
 50: 5f 2e ce 0f 00 00 00 00 00 00 00 00 00 00 00 00
 60: 30 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 70: 01 80 c2 c1 08 00 00 00 00 00 00 00 00 00 00 00
 80: 05 00 87 00 0c a0 e0 fe 00 00 00 00 a1 41 00 00
 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 a0: 00 01 04 00 00 00 00 00 00 00 00 00 00 00 00 00
 b0: 0f 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 03 c0 30 00 00 00 00 00 03 0c 00 00 00 00 00 00
 d0: f9 01 00 00 f9 01 00 00 0f 00 00 00 0f 00 00 00
 e0: 00 08 00 00 00 00 00 00 00 00 00 00 d8 d8 00 00
 f0: 00 00 00 00 00 00 00 00 b1 0f 04 08 00 00 00 00

By referencing Intel Platform Controller Hub(PCH) datasheet,
the xHC USB 2.0 Port Routing(XUSB2PR) at offset 0xD0-0xD3h
decides the setting of mapping the port to EHCI controller or
xHC controller. And the port mapped to xHC will enable xHCI
during bus resume.

The setting of disabling bluetooth adapter's connected port is
0x000001D9. The value can be obtained by few times 1 bit flip
operation. The suited configuration should have the 'lsusb -t'
result with bluetooth using ehci:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
    |__ Port 5: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 5: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
        |__ Port 6: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 6: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

Signed-off-by: Kai-Chuan Hsieh <kai.chiuan@gmail.com>
Acked-by: Corentin Chary <corentin.chary@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[andy: resolve merge conflict in asus-wmi.h]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:29:03 -08:00
Borislav Petkov b4aca383f9 platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
Fix:

  drivers/platform/x86/intel_mid_thermal.c:424:12: warning: ‘mid_thermal_resume’
  defined but not used [-Wunused-function]
   static int mid_thermal_resume(struct device *dev)
              ^
  drivers/platform/x86/intel_mid_thermal.c:436:12: warning: ‘mid_thermal_suspend’
  defined but not used [-Wunused-function]
   static int mid_thermal_suspend(struct device *dev)
              ^

which I see during randbuilds here.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Darren Hart <dvhart@infradead.org>
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:29:02 -08:00
Axel Lin bb9ad48484 platform/x86: intel-vbtn: Switch to use devm_input_allocate_device
Use devm_input_allocate_device to simplify the error handling code.
This conversion also makes input_register_device() to be called after
acpi_remove_notify_handler. This avoid a small window that it's possible
to call notify_handler after unregister input device.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:29:01 -08:00
Axel Lin 3526ecadc8 platform/x86: Use ACPI_FAILURE at appropriate places
Use ACPI_FAILURE() to replace !ACPI_SUCCESS(), this avoid !! operations.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:29:01 -08:00
Mario Limonciello 5dc444b804 platform/x86: dell-wmi: Add events created by Dell Rugged 2-in-1s
The Dell Rugged 7202 has 3 programmable buttons (labeled P1, P2, P3)
and a detachable keyboard/mouse dock.

Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:29:00 -08:00
Mario Limonciello 915ac0574c platform/x86: dell-wmi: Adjust wifi catcher to emit KEY_WLAN
Wifi catcher is a slider switch, that when slid past the on position
will emit an event that is intended for launching a wifi application
or applet when the machine is turned on.

Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-12-13 09:28:59 -08:00
Rajneesh Bhardwaj daf5d1433d platform/x86: intel_pmc_core: Add KBL CPUID support
This patch adds Kabylake CPU support for pmc_core driver.

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:28:58 -08:00
Rajneesh Bhardwaj 9c2ee19987 platform/x86: intel_pmc_core: Add LTR IGNORE debug feature
SPT LTR_IGN register provides a means to make the PMC ignore the LTR values
reported by the individual PCH devices.

echo <IP Offset> > /sys/kernel/debug/pmc_core/ltr_ignore.

When a particular IP Offset bit is set the PMC will ignore the LTR value
reported by the corresponding IP when the PMC performs the latency
coalescing.

IP Offset	IP Name
0		SPA
1		SPB
2		SATA
3		GBE
4		XHCI
5		RSVD
6		ME
7		EVA
8		SPC
9		Azalia/ADSP
10		RSVD
11		LPSS
12		SPD
13		SPE
14		Camera
15		ESPI
16		SCC
17		ISH

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
[dvhart: pmc_core_ltr_ignore_write local declaration order cleanup]
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:28:58 -08:00
Rajneesh Bhardwaj fe74822757 platform/x86: intel_pmc_core: Add MPHY PLL clock gating status
ModPhy Common lanes can provide the clock gating status for the important
system PLLs such as Gen2 USB3PCIE2 PLL, DMIPCIE3 PLL, SATA PLL and MIPI
PLL.

On SPT, in addition to the crystal oscillator clock, the 100Mhz Gen2
USB3PCI2 PLL clock is used as the PLL reference clock and Gen2 PLL idling
is a necessary condition for the platform to go into low power states like
PC10 and S0ix.

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:28:57 -08:00
Rajneesh Bhardwaj 173943b3da platform/x86: intel_pmc_core: ModPhy core lanes pg status
The PCH implements a number of High Speed I/O (HSIO) lanes that are split
between PCIe*, USB 3.0, SATA, GbE, USB OTG and SSIC. This patch shows the
current power gating status of the available ModPhy Core lanes. This is
done by sending a message to the PMC (MTPMC) that contains the XRAM
register offset for the MPHY_CORE_STS_0 and MPHY_CORE_STS_1 and then by
reading the response sent by the PMC (MFPMC).

While enabling low power modes we often encounter situations when the
ModPhy lanes are not power gated and it becomes hard to debug which lane is
active and which is not in the absence of an external hardware debugger
(JTAG/ITP). This patch eliminates the dependency on an external hardware
debugger for reading the ModPhy Lanes power gating status.

This patch requires PMC_READ_DISABLE setting to be disabled in the platform
bios.

cat /sys/kernel/debug/pmc_core/mphy_lanes_power_gating_status

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:28:56 -08:00
Rajneesh Bhardwaj 0bdfaf429d platform/x86: intel_pmc_core: Add PCH IP Power Gating Status
This patch adds the support for reading the power gating status of various
devices present on Sunrise Point PCH. This is intended to be used for
debugging purpose while tuning the platform for power optimizations and
also to understand which devices (on PCH) are blocking the system to enter
a low power state.

Power Management Controller on Sunrise Point PCH provides access to "PGD
PFET Enable Ack Status Registers (ppfear)". This patch reads and decodes
this register and dumps the output in formatted manner showing various
devices present on the PCH and their "Power Gating" status.

Further documentation can be found in Intel 7th Gen Core family mobile u/y
processor io datasheet volume 2.

Sample output (stripped and not in order):

cat /sys/kernel/debug/pmc_core/pch_ip_power_gating_status
PMC				State: Not Power gated
OPI-DMI				State: Not Power gated
XHCI				State: Power gated
LPSS				State: Power gated
CSME_PSF			State: Not power gated

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:28:55 -08:00
Rajneesh Bhardwaj 8434709ba7 platform/x86: intel_pmc_core: Fix PWRMBASE mask and mmio reg len
On Sunrise Point PCH, the Power Management Controller provides 4K bytes of
memory space for various power management and debug registers. This fix is
needed to access power management & debug registers that are mapped at a
higher offset.

Also, this provides a fix for correctly masking the PWRMBASE as the initial
bits (0-11) are reserved.

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:28:54 -08:00
Lee, Chun-Yi 5241b1938a platform/x86: acer-wmi: Only supports AMW0_GUID1 on acer family
The AMW0_GUID1 wmi is not only found on Acer family but also other
machines like Lenovo, Fujitsu and Medion. In the past, acer-wmi handled
those non-Acer machines by quirks list.

But actually acer-wmi driver was loaded on any machine that had
AMW0_GUID1. This behavior is strange because those machines should be
supported by appropriate wmi drivers. e.g. fujitsu-laptop,
ideapad-laptop.

This patch adds the logic to check the machine that has AMW0_GUID1
should be in Acer/Packard Bell/Gateway white list. But, it still keeps
the quirk list of those supported non-acer machines for backward
compatibility.

Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13 09:28:48 -08:00
Greg Kroah-Hartman b7d91c9152 Merge 4.9-rc5 into char-misc-next
We want those fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:39:47 +01:00
Greg Kroah-Hartman ce0347c2b0 Merge 4.9-rc5 into staging-next
We want the staging/iio fixes in here as well to resolve issues and
merge problems.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 08:53:56 +01:00
Linus Torvalds 86e4ee760e ACPI fix for v4.9-rc5
Fix a recent regression in the 8250_dw serial driver introduced by
 adding a quirk for the APM X-Gene SoC to it which uncovered an issue
 related to the handling of built-in device properties in the core
 ACPI device enumeration code (Heikki Krogerus).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJYJlm+AAoJEILEb/54YlRxpsEP/3IspBg3tGvSDu3YoErtTrQ8
 Te1x9DlHrCiSPacxep0r/NdHcOdmnXaTp6Uo5GMqyvtICSJoe3+nsgwQwy66YzHZ
 HxRxs3NpgeHx7v2vtNZA0CJNOLocmJEunN670to/bsuz0hPcVdZbkZpI7GnRQ6wc
 72h9XLc5Fknr1UDTLYh3ZD3Iw1OQfrG/LOx8bdsfkP2g6HqPZwGBuVIbEQ/q9bkP
 PGd37DrMg9nXfM2wuwKmx2zqJQTceENsW+U5OjzmF2Sy6nFndYWzoRtc6whiKQcc
 CqNSyYsfzodXyUjwa5kI0D6N+jm49T9dBTznKJelsk0BxijELiskwEnjNJAVzDr7
 0A0yDGMvFWShjUqFAc0+uBlTs3yV0Sdjawfm1uE+lCmZId0mN4MTcMNd3MfusQs+
 dL7+pULrrB2UJvLyPiKCkuMVWngLWTnk72tnRlyJXbsc4oX+ljyXqwgn9iAq7Sjn
 vq/pECOKQj0fcLTm2TnKr+VyjPUCul6PDRqFyUGvEa8CjjrrS2piWsg5zBXFQNoM
 f95jliHgT10YQAVtbUKePavXz04GjzTNyLPPPxXT0jEVhLWkHVBtLNCjEX3LZdwW
 duc7ofc4Es9BQ21EDxcwGPeAygVSSuHGOr5Jq+WNdSTEa3sUk+63cqY59rrEAIfy
 cZgEpvlcP3kcgO8U0fF1
 =XF0E
 -----END PGP SIGNATURE-----

Merge tag 'acpi-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix a recent regression in the 8250_dw serial driver introduced by
  adding a quirk for the APM X-Gene SoC to it which uncovered an issue
  related to the handling of built-in device properties in the core ACPI
  device enumeration code (Heikki Krogerus)"

* tag 'acpi-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / platform: Add support for build-in properties
2016-11-11 17:02:01 -08:00
Rafael J. Wysocki 66f5854c68 Merge branch 'device-properties'
* device-properties:
  ACPI / platform: Add support for build-in properties
2016-11-11 23:23:02 +01:00
Lorenzo Stoakes 052662cada platform: goldfish: pipe: use get_user_pages_unlocked()
Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code
and takes advantage of VM_FAULT_RETRY functionality when faulting in pages.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 15:34:56 +01:00
Heikki Krogerus 1571875bee ACPI / platform: Add support for build-in properties
We have a couple of drivers, acpi_apd.c and acpi_lpss.c,
that need to pass extra build-in properties to the devices
they create. Previously the drivers added those properties
to the struct device which is member of the struct
acpi_device, but that does not work. Those properties need
to be assigned to the struct device of the platform device
instead in order for them to become available to the
drivers.

To fix this, this patch changes acpi_create_platform_device
function to take struct property_entry pointer as parameter.

Fixes: 20a875e2e8 (serial: 8250_dw: Add quirk for APM X-Gene SoC)
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Yazen Ghannam <yazen.ghannam@amd.com>
Tested-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-11-10 00:30:29 +01:00
Greg Kroah-Hartman 7970b9e6a5 Second round of new device support, cleanups and fixes for IIO in the 4.10 cycle
This includes two branch merges for elements that may also go via MFD.
 
 New device support
 * cros_ec
   - new driver to support these Chrome OS contiguous sensors which are behind
     the Chrome OS embedded controller.  Requires a few minor MFD and chrome
     platform changes.  One follow up fix deals with some dependency issues in
     Kconfig.
 * mpu-3050
   - new driver and device tree bindings for this venerable device.
 * st_accel
   - support for the lng2dm an
 
 Driver features
 * ad7192
   - Add DVdd regulator handling
 * ad9832
   - Add DVDD regulator handling
 * at91
   - Suspend and resume support
 * si7020
   - Device tree bindings
 * ti-am335x
   - DMA support - uses dma to accelerate short bursts of read back rather
   than full blown DMA buffer support.  Greatly improved performance.
   Includes an MFD addition to give access to the address needed for DMA.
 * tsl2583
   - Device tree bindings
 
 Cleanups and minor fixes
 * ad7192
   - Fix regulator naming to match datasheet
   - Handle regulator errors correctly (so as to not break deferred probing)
   - Rename reg variable to reflect which regulator it is
 * ad5933
   - Fix regulator naming to match datasheet
   - Handle regulator errors correctly (so as to not break deferred probing)
 * ad7746
   - Fix a missing return value (fallout from previous patch set)
 * ad7780
   - Fix regulator naming to match datasheet
   - Handle regulator errors correctly (so as to not break deferred probing)
 * ad9832
   - Fix regulator naming to match datasheet
   - Handle regulator errors correctly (so as to not break deferred probing)
   - Rename reg regulator to reflect which one it is
 * ad9834
   - Fix regulator naming to match datasheet
   - Handle regulator errors correctly (so as to not break deferred probing)
 * hts221
   - Remove a duplicated include
 * maxim thermocouple
   - Handle a wrong storage side in read function.  Prevent any problems that
   might be introduced by additions to this driver in future.
 * tsl2583 - big set from Brian Masney to drive this towards a staging
   graduation.
   - Convert to iio_chan_spec and read_raw / write_raw (in a couple of steps)
   - Improved error handling in various functions
   - Drop redundant power_state custom sysfs attribute.
   - Use IIO_*_ATTR* macros for remaining attributes.
   - Return an error code to userspace on invalid parameters being writen to
     sysfs files.
   - Add locking to various attribute accesses to remove possible races.
   - Add defines for various magic numbers.
   - Use smbus_read_byte_data instead of a write_byte followed by read_byte.
   - Query only relevant registers in probe.
   - Tidy up ordering of code comments.
   - Remove a pointless power off sequence in taos_chip_on.
   - Don't bother shutting down the chip when updating the lux table.
   The table is held entirely in the driver and doesn't effect the chip at all.
   - Drop a redundant i2c call in taos_als_calibrate where the same register
   is read twice in a row.
 -----BEGIN PGP SIGNATURE-----
 
 iQIuBAABCAAYBQJYH22HERxqaWMyM0BrZXJuZWwub3JnAAoJEFSFNJnE9BaIUg4P
 /1GRFGpTbqyzDOX6KZKAdBRsRMn3XPL0XslvbKpupY4T9WFEJbZi01z4P/x+uRIk
 6TtRlhdWBLdzVQ6sLpVAZVXR2/FxGj+nsc2ONgHJXm02/fDBmjI89Ed9WVS1HR73
 D2yLAFhflvE6mDMExvAnUVBh9ClR2SXoGL0N1k+VQM08Rs+F6IzBAg2albiPkct/
 7UQB9apn4VCCaRY02gllvWrUiJV3w8jsSikwDACZsprQGIxKjLiH4evtRfSOI8bg
 Z7UoJYaYNMiQtn6+rFaNUjFQtzlnWcjB92RUy/MqnpXmkuAvw3+CbXYteYnailO1
 eTsIjKpwssKaQh5HHALrxIwP/a/9a+Wyrd8iheygUQvzSNx3gcxXrtNrUk8eI/9W
 N8pBRBbu+2pzSzVLQb+7SR5wJG1zQ5NEXI1gpZuyed94g30Be0vQpeiZRNCUL+J0
 ta28Xa25cREzHrXGXrhfyxNJuriav/8A5PTtnGJSZZ8RhuHZq24TcC8h6KVOWR+3
 BBiehupFcIErbrGcMKuhq01q8A9+Vj/1z6hQaZzfIpXFjEEUvkBo3OMiNtgpkQYM
 XYdaF2bH25t8wx020z4FrmN48nxg2HDTLtKissP/6bInh4kYyGneKhf6QQVnG2IX
 41XLE/fw4QoAnLuTBXD3boydC08uJmVkXeOH2sfaCYwG
 =ptGw
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.10b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-testing

Jonathan writes:

Second round of new device support, cleanups and fixes for IIO in the 4.10 cycle

This includes two branch merges for elements that may also go via MFD.

New device support
* cros_ec
  - new driver to support these Chrome OS contiguous sensors which are behind
    the Chrome OS embedded controller.  Requires a few minor MFD and chrome
    platform changes.  One follow up fix deals with some dependency issues in
    Kconfig.
* mpu-3050
  - new driver and device tree bindings for this venerable device.
* st_accel
  - support for the lng2dm an

Driver features
* ad7192
  - Add DVdd regulator handling
* ad9832
  - Add DVDD regulator handling
* at91
  - Suspend and resume support
* si7020
  - Device tree bindings
* ti-am335x
  - DMA support - uses dma to accelerate short bursts of read back rather
  than full blown DMA buffer support.  Greatly improved performance.
  Includes an MFD addition to give access to the address needed for DMA.
* tsl2583
  - Device tree bindings

Cleanups and minor fixes
* ad7192
  - Fix regulator naming to match datasheet
  - Handle regulator errors correctly (so as to not break deferred probing)
  - Rename reg variable to reflect which regulator it is
* ad5933
  - Fix regulator naming to match datasheet
  - Handle regulator errors correctly (so as to not break deferred probing)
* ad7746
  - Fix a missing return value (fallout from previous patch set)
* ad7780
  - Fix regulator naming to match datasheet
  - Handle regulator errors correctly (so as to not break deferred probing)
* ad9832
  - Fix regulator naming to match datasheet
  - Handle regulator errors correctly (so as to not break deferred probing)
  - Rename reg regulator to reflect which one it is
* ad9834
  - Fix regulator naming to match datasheet
  - Handle regulator errors correctly (so as to not break deferred probing)
* hts221
  - Remove a duplicated include
* maxim thermocouple
  - Handle a wrong storage side in read function.  Prevent any problems that
  might be introduced by additions to this driver in future.
* tsl2583 - big set from Brian Masney to drive this towards a staging
  graduation.
  - Convert to iio_chan_spec and read_raw / write_raw (in a couple of steps)
  - Improved error handling in various functions
  - Drop redundant power_state custom sysfs attribute.
  - Use IIO_*_ATTR* macros for remaining attributes.
  - Return an error code to userspace on invalid parameters being writen to
    sysfs files.
  - Add locking to various attribute accesses to remove possible races.
  - Add defines for various magic numbers.
  - Use smbus_read_byte_data instead of a write_byte followed by read_byte.
  - Query only relevant registers in probe.
  - Tidy up ordering of code comments.
  - Remove a pointless power off sequence in taos_chip_on.
  - Don't bother shutting down the chip when updating the lux table.
  The table is held entirely in the driver and doesn't effect the chip at all.
  - Drop a redundant i2c call in taos_als_calibrate where the same register
  is read twice in a row.
2016-11-07 09:14:03 +01:00
Enric Balletbo i Serra 5668bfdd90 platform/chrome: cros_ec_dev - Register cros-ec sensors
Check whether the ChromeOS Embedded Controller is a sensor hub and in
such case issue a command to get the number of sensors and register them
all.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-10-25 18:20:32 +01:00
Vincent Palatin e4244ebdda platform/chrome: Introduce a new function to check EC features.
Use the EC_CMD_GET_FEATURES message to check the supported features for
each MCU.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
[tomeu: adapted to changes in mainline]
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
[enric: remove references to USB PD feature and do it more generic]
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
For the MFD changes:
  Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-10-25 18:20:29 +01:00
Vadim Pasternak 304887041d platform/x86: Introduce support for Mellanox hotplug driver
Enable system support for the Mellanox Technologies hotplug platform
driver, which provides support for the next Mellanox basic systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
"msb7800", "msn2740", "msn2100" and also various number of derivative
systems from the above basic types.
This driver handles hot-plug events for the power suppliers, power
cables and fans for the above systems.

The Kconfig currently controlling compilation of this code is:
driver/platform/x86:config MLX_CPLD_PLATFORM
                       tristate "Mellanox platform hotplug driver support"

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-23 07:52:57 -07:00
Azael Avalos 1c80e9603f toshiba-wmi: Fix loading the driver on non Toshiba laptops
Bug 150611 uncovered that the WMI ID used by the toshiba-wmi driver
is not Toshiba specific, and as such, the driver was being loaded
on non Toshiba laptops too.

This patch adds a DMI matching list checking for TOSHIBA as the
vendor, refusing to load if it is not.

Also the WMI GUID was renamed, dropping the TOSHIBA_ prefix, to
better reflect that such GUID is not a Toshiba specific one.

Cc: <stable@vger.kernel.org> # 4.4+
Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-19 13:25:54 -07:00
Mika Westerberg 446647d4b9 ideapad-laptop: Add another DMI entry for Yoga 900
This particular laptop has its motherboard replaced and after that, even
with the latest BIOS, some DMI identification strings have become
"INVALID". This includes DMI_PRODUCT_VERSION which results Wifi being
blocked.

It seems that DMI_BOARD_NAME is still valid so use that as an
alternative for Lenovo Yoga 900.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-10-19 13:08:39 -07:00
Linus Torvalds c3f8f7fa8b platform-drivers-x86 for 4.9-2
Fix a Kconfig issue leading potential link failure, and
 add a DMI match for an existing quirk.
 
 asus-wmi:
  - add SERIO_I8042 dependency
 
 ideapad-laptop:
  - Add Lenovo Yoga 910-13IKB to no_hw_rfkill dmi list
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYB7xbAAoJEKbMaAwKp364JZ0IAKbnhIY5UuwIxbShgbKR6o/H
 QOosQwHx+ZzGW4jtYRCEMU1uJH5B4CESMlUzPMJSqkpAz4yZyvaLnMnNL1C2QQkV
 vzn92owyeuNm1VmWxCBL5EbowcMQyAlWtZik9JEwz9G1nlSOlgOhjH4mfugePJLr
 2sCGyfenzXM3otTTB5eGqKg6+4upmf/H8I3HQlu8TUnISslFHahf9czOaFWKwrK6
 tm4nWHzx/nx4PcPQm+EvWT5mlsg/+DhFtyzJIqPZypmBuXR2MRaomqe8AugAXcst
 iVHxve7CWrw/Oiaa4tESdS/P2KhnLzVbDjUaOyAMLyBu670xBnlieH6Q4jJjd4Y=
 =yZrl
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v4.9-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform driver fixes from Darren Hart:
 "Fix a Kconfig issue leading potential link failure, and add a DMI
  match for an existing quirk.

  asus-wmi:
   - add SERIO_I8042 dependency

  ideapad-laptop:
   - Add Lenovo Yoga 910-13IKB to no_hw_rfkill dmi list"

* tag 'platform-drivers-x86-v4.9-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
  platform/x86: asus-wmi: add SERIO_I8042 dependency
  platform/x86: ideapad-laptop: Add Lenovo Yoga 910-13IKB to no_hw_rfkill dmi list
2016-10-19 11:45:06 -07:00
Linus Torvalds 63ae602cea Merge branch 'gup_flag-cleanups'
Merge the gup_flags cleanups from Lorenzo Stoakes:
 "This patch series adjusts functions in the get_user_pages* family such
  that desired FOLL_* flags are passed as an argument rather than
  implied by flags.

  The purpose of this change is to make the use of FOLL_FORCE explicit
  so it is easier to grep for and clearer to callers that this flag is
  being used.  The use of FOLL_FORCE is an issue as it overrides missing
  VM_READ/VM_WRITE flags for the VMA whose pages we are reading
  from/writing to, which can result in surprising behaviour.

  The patch series came out of the discussion around commit 38e0885465
  ("mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing"),
  which addressed a BUG_ON() being triggered when a page was faulted in
  with PROT_NONE set but having been overridden by FOLL_FORCE.
  do_numa_page() was run on the assumption the page _must_ be one marked
  for NUMA node migration as an actual PROT_NONE page would have been
  dealt with prior to this code path, however FOLL_FORCE introduced a
  situation where this assumption did not hold.

  See

      https://marc.info/?l=linux-mm&m=147585445805166

  for the patch proposal"

Additionally, there's a fix for an ancient bug related to FOLL_FORCE and
FOLL_WRITE by me.

[ This branch was rebased recently to add a few more acked-by's and
  reviewed-by's ]

* gup_flag-cleanups:
  mm: replace access_process_vm() write parameter with gup_flags
  mm: replace access_remote_vm() write parameter with gup_flags
  mm: replace __access_remote_vm() write parameter with gup_flags
  mm: replace get_user_pages_remote() write/force parameters with gup_flags
  mm: replace get_user_pages() write/force parameters with gup_flags
  mm: replace get_vaddr_frames() write/force parameters with gup_flags
  mm: replace get_user_pages_locked() write/force parameters with gup_flags
  mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
  mm: remove write/force parameters from __get_user_pages_unlocked()
  mm: remove write/force parameters from __get_user_pages_locked()
  mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
2016-10-19 08:39:47 -07:00
Lorenzo Stoakes 768ae309a9 mm: replace get_user_pages() write/force parameters with gup_flags
This removes the 'write' and 'force' from get_user_pages() and replaces
them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers
as use of this flag can result in surprising behaviour (and hence bugs)
within the mm subsystem.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-19 08:11:43 -07:00
Linus Torvalds 44dc8c9d68 platform-drivers-x86 for 4.9-1
Cleanups, refactoring, and a couple bug fixes.
 
 intel_pmc_core:
  - avoid boot time warning for !CONFIG_DEBUGFS_FS
 
 intel_pmc_ipc:
  - Convert to use platform_device_register_full
 
 asus-wmi:
  - Filter buggy scan codes on ASUS Q500A
 
 toshiba_bluetooth:
  - Decouple an error checking status code
 
 toshiba_haps:
  - Change logging level from info to debug
  - Split ACPI and HDD protection error handling
 
 asus-laptop:
  - get rid of parse_arg()
 
 asus-wmi:
  - fix asus ux303ub brightness issue
 
 toshiba_acpi:
  - Fix typo in *_cooling_method_set function
  - Change error checking logic from TCI functions
  - Clean up variable declaration
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJX/fUeAAoJEKbMaAwKp364UxoIAMA2UWY9qepIvVW+BA/4vTOH
 jqzLVtH0SnhAe1esjsZ3f2r8F0riXEz/pLWcE7cjV7nbmWQDGvSBAJHyALg5d7CJ
 lAaMjo+glxy2p/0HgHNWvlgXEhRSsc1slbIJMzwk8XWfX39o+LGU0MNar8uRtQML
 TRCFJ73d5maQcQIsZ4hPbPJjzHK3ExyLLimXj5fsFXYnIMBF5YsTfiwdTEnDQmm/
 8FIO+fdogSU+LOrS0/CKrpzB/TchapCdvqn0hTJEdRP9wSqHL4c1nk2c0EVywTZT
 cwHi3ABvoS7Q2gHl58Y02jeEl3e9rFJQ79Sk3Wxr58mpfqy+w1SwPsjyfnXOB4c=
 =AwRb
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v4.9-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform drivers updates from Darren Hart:
 "Cleanups, refactoring, and a couple bug fixes.

  intel_pmc_core:
   - avoid boot time warning for !CONFIG_DEBUGFS_FS

  intel_pmc_ipc:
   - Convert to use platform_device_register_full

  asus-wmi:
   - Filter buggy scan codes on ASUS Q500A

  toshiba_bluetooth:
   - Decouple an error checking status code

  toshiba_haps:
   - Change logging level from info to debug
   - Split ACPI and HDD protection error handling

  asus-laptop:
   - get rid of parse_arg()

  asus-wmi:
   - fix asus ux303ub brightness issue

  toshiba_acpi:
   - Fix typo in *_cooling_method_set function
   - Change error checking logic from TCI functions
   - Clean up variable declaration"

* tag 'platform-drivers-x86-v4.9-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
  platform/x86: intel_pmc_core: avoid boot time warning for !CONFIG_DEBUGFS_FS
  platform/x86: intel_pmc_ipc: Convert to use platform_device_register_full
  platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
  platform/x86: toshiba_bluetooth: Decouple an error checking status code
  platform/x86: toshiba_haps: Change logging level from info to debug
  platform/x86: toshiba_haps: Split ACPI and HDD protection error handling
  platform/x86: asus-laptop: get rid of parse_arg()
  platform/x86: asus-wmi: fix asus ux303ub brightness issue
  platform/x86: toshiba_acpi: Fix typo in *_cooling_method_set function
  platform/x86: toshiba_acpi: Change error checking logic from TCI functions
  platform/x86: toshiba_acpi: Clean up variable declaration
2016-10-13 16:52:39 -07:00