aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86
AgeCommit message (Collapse)Author
2015-11-13Merge tag 'platform-drivers-x86-v4.4-2' of ↵Linus Torvalds
git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull another x86 platform driver update from Darren Hart: "Support for the unfortunately rather unique ESC key on the Ideapad Yoga 3 and two DMI matches for rfkill support. Solitary fix for potential missed errors for asus-wmi. Downgrade a thinkpad_acpi message to info. asus-wmi: - fix error handling in store_sys_wmi() ideapad-laptop: - Add Lenovo Yoga 900 to no_hw_rfkill dmi list - include Yoga 3 1170 in add rfkill whitelist - add support for Yoga 3 ESC key thinkpad_acpi: - Don't yell on unsupported brightness interfaces" * tag 'platform-drivers-x86-v4.4-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: asus-wmi: fix error handling in store_sys_wmi() ideapad-laptop: Add Lenovo Yoga 900 to no_hw_rfkill dmi list ideapad-laptop: include Yoga 3 1170 in add rfkill whitelist ideapad-laptop: add support for Yoga 3 ESC key thinkpad_acpi: Don't yell on unsupported brightness interfaces
2015-11-11Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal updates from Zhang Rui: - Implement generic devfreq cooling mechanism through frequency reduction for devices using devfreq. From Ørjan Eide and Javi Merino. - Introduce OMAP3 support on TI SoC thermal driver. From Pavel Mack and Eduardo Valentin. - A bounch of small fixes on devfreq_cooling, Exynos, IMX, Armada, and Rockchip thermal drivers. * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (24 commits) thermal: exynos: Directly return 0 instead of using local ret variable thermal: exynos: Remove unneeded semicolon thermal: exynos: Use IS_ERR() because regulator cannot be NULL thermal: exynos: Fix first temperature read after registering sensor thermal: exynos: Fix unbalanced regulator disable on probe failure devfreq_cooling: return on allocation failure thermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r dt-bindings: rockchip-thermal: Add the pinctrl states in this document thermal: devfreq_cooling: Make power a u64 thermal: devfreq_cooling: use a thermal_cooling_device for register and unregister thermal: underflow bug in imx_set_trip_temp() thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula thermal: imx: register irq handler later in probe thermal: rockhip: fix setting thermal shutdown polarity thermal: rockchip: fix handling of invalid readings devfreq_cooling: add trace information thermal: Add devfreq cooling PM / OPP: get the voltage for all OPPs tools/thermal: tmon: use pkg-config also for CFLAGS linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS ...
2015-11-10asus-wmi: fix error handling in store_sys_wmi()Dan Carpenter
The asus_wmi_get_devstate_simple() returns 0-1 on success. In theory according to static checkers, it can return either -EIO or -ENODEV on failure. Currently the error handling code only handles -ENODEV and -EIO is treated as success. Let's make it handle the -EIO error as well. It's possible that it can't actually return -EIO and this patch is not needed but in that case this patch is harmless and silences a static checker warning so it's still worth it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-10Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm updates from Dave Airlie: "I Was Almost Tempted To Capitalise Every Word, but then I decided I couldn't read it myself! I've also got one pull request for the sti driver outstanding. It relied on a commit in Greg's tree and I didn't find out in time, that commit is in your tree now so I might send that along once this is merged. I also had the accidental misfortune to have access to a Skylake on my desk for a few days, and I've had to encourage Intel to try harder, which seems to be happening now. Here is the main drm-next pull request for 4.4. Highlights: New driver: vc4 driver for the Rasberry Pi VPU. (From Eric Anholt at Broadcom.) Core: Atomic fbdev support Atomic helpers for runtime pm dp/aux i2c STATUS_UPDATE handling struct_mutex usage cleanups. Generic of probing support. Documentation: Kerneldoc for VGA switcheroo code. Rename to gpu instead of drm to reflect scope. i915: Skylake GuC firmware fixes HPD A support VBT backlight fallbacks Fastboot by default for some systems FBC work BXT/SKL workarounds Skylake deeper sleep state fixes amdgpu: Enable GPU scheduler by default New atombios opcodes GPUVM debugging options Stoney support. Fencing cleanups. radeon: More efficient CS checking nouveau: gk20a instance memory handling improvements. Improved PGOB detection and GK107 support Kepler GDDR5 PLL statbility improvement G8x/GT2xx reclock improvements new userspace API compatiblity fixes. virtio-gpu: Add 3D support - qemu 2.5 has it merged for it's gtk backend. msm: Initial msm88896 (snapdragon 8200) exynos: HDMI cleanups Enable mixer driver byt default Add DECON-TV support vmwgfx: Move to using memremap + fixes. rcar-du: Add support for R8A7793/4 DU armada: Remove support for non-component mode Improved plane handling Power savings while in DPMS off. tda998x: Remove unused slave encoder support Use more HDMI helpers Fix EDID read handling dwhdmi: Interlace video mode support for ipu-v3/dw_hdmi Hotplug state fixes Audio driver integration imx: More color formats support. tegra: Minor fixes/improvements" [ Merge fixup: remove unused variable 'dev' that had all uses removed in commit 4e270f088011: "drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj" ] * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (764 commits) drm/vmwgfx: Relax irq locking somewhat drm/vmwgfx: Properly flush cursor updates and page-flips drm/i915/skl: disable display side power well support for now drm/i915: Extend DSL readout fix to BDW and SKL. drm/i915: Do graphics device reset under forcewake drm/i915: Skip fence installation for objects with rotated views (v4) vga_switcheroo: Drop client power state VGA_SWITCHEROO_INIT drm/amdgpu: group together common fence implementation drm/amdgpu: remove AMDGPU_FENCE_OWNER_MOVE drm/amdgpu: remove now unused fence functions drm/amdgpu: fix fence fallback check drm/amdgpu: fix stoping the scheduler timeout drm/amdgpu: cleanup on error in amdgpu_cs_ioctl() drm/i915: Fix locking around GuC firmware load drm/amdgpu: update Fiji's Golden setting drm/amdgpu: update Fiji's rev id drm/amdgpu: extract common code in vi_common_early_init drm/amd/scheduler: don't oops on failure to load drm/amdgpu: don't oops on failure to load (v2) drm/amdgpu: don't VT switch on suspend ...
2015-11-09ideapad-laptop: Add Lenovo Yoga 900 to no_hw_rfkill dmi listHans de Goede
Like some of the other Yoga models the Lenovo Yoga 900 does not have a hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always reported blocking breaking wifi. This commit adds the Lenovo Yoga 900 to the no_hw_rfkill dmi list, fixing the wifi breakage. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1275490 Cc: stable@vger.kernel.org Reported-and-tested-by: Kevin Fenzi <kevin@scrye.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-09ideapad-laptop: include Yoga 3 1170 in add rfkill whitelistArnd Bergmann
This changes the entry to the whitelist of machines that do not have a physical rfkill switch. Unfortunately, the Yoga 3 generation seems to use upper-case letters for the YOGA 3 Pro-1370, while it uses normal capitalization for its Yoga 3 1170 and 1470 siblings. In order to catch all variants of the Yoga 3, I'm changing both the entry for the 1470 (using "Yoga" as the name) and the entry for the Pro 1370 (using all-caps "YOGA") to not match the exact model number but only the generation. This way, the 1170 and 1470 models share one entry, but if the firmware changes from one format to the other, it will still work. The second entry for Yoga 2 Pro that was recently added for some reason ended up not being added in alphanumeric order, and I'm moving the Yoga 3 1470 entry down while making the change, so they are sorted more logically. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-09ideapad-laptop: add support for Yoga 3 ESC keyArnd Bergmann
The ideapad-laptop handles most special keys on various Lenovo Laptops including the Yoga line. Unfortunately, the Yoga 3 11/13/14 models have one important exception, which is the Fn-ESC combination. On other Lenovo Laptops, this is FnLock, which switches the function keys between the primary (Mute, Vol down, Vol up, ...) and the secondary (F1, F2, F3, ...) behavior. On the new machines, FnLock is only available through BIOS setup (possibly through a yet-to-be-implemented feature in this driver) but not through Fn-ESC, but instead the ESC key itself switched between ESC and a "Paper Display" app for Windows. Unfortunately, that means that you can never have both ESC *and* the function keys working at the same time without needing to press Fn on one of them. As pointed out in the official Lenovo Forum by dozens of users, this makes the machine rather useless for any serious work [1]. I have now studied the ACPI DSDT one more time and found the event that is generated for the ESC key. Unlike all other key events on this machine, it is actually a WMI, while the other ones are read from the embedded controller. I am now installing a WMI notifier that uses the event number from the WMI subsystem as the scancode. The only event number generated here is '128', and that fits in nicely with the two existing ranges of scancodes used by the EC: 0-15 for the 16-bit VPCCMD_R_VPC register, 16-17 for the VPCCMD_R_NOVO register and 64-67 for VPCCMD_R_SPECIAL_BUTTONS. The only sane way to handle this button (in absence of the Windows Paper Display driver) seems to be to have it emit KEY_ESC, so that is what I use as the default. Should any user ever want to overwrite the default, they can install their own keymap. To ensure that we can still build the driver without adding a CONFIG_WMI dependency, all new code is enclosed in #ifdef. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [1] https://forums.lenovo.com/t5/Lenovo-Yoga-Series-Notebooks/YOGA-3-14-How-to-reclaim-my-Esc-key-and-permanently-disable/td-p/2070816 Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-06Merge tag 'asm-generic-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic cleanups from Arnd Bergmann: "The asm-generic changes for 4.4 are mostly a series from Christoph Hellwig to clean up various abuses of headers in there. The patch to rename the io-64-nonatomic-*.h headers caused some conflicts with new users, so I added a workaround that we can remove in the next merge window. The only other patch is a warning fix from Marek Vasut" * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: temporarily add back asm-generic/io-64-nonatomic*.h asm-generic: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations gpio-mxc: stop including <asm-generic/bug> n_tracesink: stop including <asm-generic/bug> n_tracerouter: stop including <asm-generic/bug> mlx5: stop including <asm-generic/kmap_types.h> hifn_795x: stop including <asm-generic/kmap_types.h> drbd: stop including <asm-generic/kmap_types.h> move count_zeroes.h out of asm-generic move io-64-nonatomic*.h out of asm-generic
2015-11-06Merge tag 'mfd-for-linus-4.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - Add support for 88pm860; 88pm80x - Add support for 24c08 EEPROM; at24 - Add support for Broxton Whiskey Cove; intel* - Add support for RTS522A; rts5227 - Add support for I2C devices; intel_quark_i2c_gpio New Functionality: - Add microphone support; arizona - Add general purpose switch support; arizona - Add fuel-gauge support; da9150-core - Add shutdown support; sec-core - Add charger support; tps65217 - Add flexible serial communication unit support; atmel-flexcom - Add power button support; axp20x - Add led-flash support; rt5033 Core Frameworks: - Supply a generic macro for defining Regmap IRQs - Rework ACPI child device matching Fix-ups: - Use Regmap to access registers; tps6105x - Use DEFINE_RES_IRQ_NAMED() macro; da9150 - Re-arrange device registration order; intel_quark_i2c_gpio - Allow OF matching; cros_ec_i2c, atmel-hlcdc, hi6421-pmic, max8997, sm501 - Handle deferred probe; twl6040 - Improve accuracy of headphone detect; arizona - Unnecessary MODULE_ALIAS() removal; bcm590xx, rt5033 - Remove unused code; htc-i2cpld, arizona, pcf50633-irq, sec-core - Simplify code; kempld, rts5209, da903x, lm3533, da9052, arizona - Remove #iffery; arizona - DT binding adaptions; many Bug Fixes: - Fix possible NULL pointer dereference; wm831x, tps6105x - Fix 64bit bug; intel_soc_pmic_bxtwc - Fix signedness issue; arizona" * tag 'mfd-for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (73 commits) bindings: mfd: s2mps11: Add documentation for s2mps15 PMIC mfd: sec-core: Remove unused s2mpu02-rtc and s2mpu02-clk children extcon: arizona: Add extcon specific device tree binding document MAINTAINERS: Add binding docs for Cirrus Logic/Wolfson Arizona devices mfd: arizona: Remove bindings covered in new subsystem specific docs mfd: rt5033: Add RT5033 Flash led sub device mfd: lpss: Add Intel Broxton PCI IDs mfd: lpss: Add Broxton ACPI IDs mfd: arizona: Signedness bug in arizona_runtime_suspend() mfd: axp20x: Add a cell for the power button part of the, axp288 PMICs mfd: dt-bindings: Document pulled down WRSTBI pin on S2MPS1X mfd: sec-core: Disable buck voltage reset on watchdog falling edge mfd: sec-core: Dump PMIC revision to find out the HW mfd: arizona: Use correct type ID for device tree config mfd: arizona: Remove use of codec build config #ifdefs mfd: arizona: Simplify adding subdevices mfd: arizona: Downgrade type mismatch messages to dev_warn mfd: arizona: Factor out checking of jack detection state mfd: arizona: Factor out DCVDD isolation control mfd: Make TPS6105X select REGMAP_I2C ...
2015-11-06thinkpad_acpi: Don't yell on unsupported brightness interfacesDavid Herrmann
The thinkpad_acpi driver currently emits error messages on unsupported brightness interfaces, giving the impression that someone will implement those. However, this error is spit out on nearly every thinkpad in production since 2 years now. Furthermore, the backlight interfaces on those devices are supported by the i915 driver just fine. Downgrade the error message to a normal pr_info() and stop telling people to report it to IBM. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-05toshiba_acpi: Initialize hotkey_event_type variableAzael Avalos
Commit 53147b6cabee5e8d1997b5682fcc0c3b72ddf9c2 ("toshiba_acpi: Fix hotkeys registration on some toshiba models") fixed an issue on some laptops regarding hotkeys registration, however, if failed to address the initialization of the hotkey_event_type variable, and thus, it can lead to potential unwanted effects as the variable is being checked. This patch initializes such variable to avoid such unwanted effects. Cc: <stable@vger.kernel.org> # 4.1+ Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-30platform: x86: PMC IPC depends on ACPILee Jones
This patch solves: on x86_64: when CONFIG_ACPI is not enabled: ../drivers/mfd/intel_soc_pmic_bxtwc.c: In function 'bxtwc_probe': ../drivers/mfd/intel_soc_pmic_bxtwc.c:342:2: error: implicit declaration of function 'acpi_evaluate_integer' [-Werror=implicit-function-declaration] status = acpi_evaluate_integer(handle, "_HRV", NULL, &hrv); ^ Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-20vga_switcheroo: Constify vga_switcheroo_handlerLukas Wunner
vga_switcheroo_client_ops has always been declared const since its introduction with 26ec685ff9d9 ("vga_switcheroo: Introduce struct vga_switcheroo_client_ops"). Do so for vga_switcheroo_handler as well. drivers/gpu/drm/amd/amdgpu/amdgpu.ko: 6 .rodata 00009888 - 19 .data 00001f00 + 19 .data 00001ee0 drivers/gpu/drm/nouveau/nouveau.ko: 6 .rodata 000460b8 17 .data 00018fe0 drivers/gpu/drm/radeon/radeon.ko: - 7 .rodata 00030944 + 7 .rodata 00030964 - 21 .data 0000d6a0 + 21 .data 0000d678 drivers/platform/x86/apple-gmux.ko: - 7 .rodata 00000140 + 7 .rodata 00000160 - 11 .data 000000e0 + 11 .data 000000b8 Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Darren Hart <dvhart@linux.intel.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Christian König <christian.koenig@amd.com>. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-10-15intel_scu_ipc: Protect dev member assignment on ->remove()Andy Shevchenko
Protect the dev member assignment in ->remove() since user may potentially call unbind from a sysfs even if the driver is built-in. The latter might be racy with ongoing SCU communication. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-15intel_scu_ipc: Switch to use module_pci_driver() macroAndy Shevchenko
Eliminate some boilerplate code by using module_pci_driver() instead of init/exit, moving the salient bits from init into probe. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-15intel_scu_ipc: Convert to use struct device *Andy Shevchenko
Switch the code to use struct device * instead of struct pci_dev * since there is no reason to access PCI related features in the driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-15intel_scu_ipc: Propagate pointer to struct intel_scu_ipc_devAndy Shevchenko
As much as possible propagate a pointer to struct intel_scu_ipc_dev. There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-15intel_scu_ipc: Fix error path by turning to devm_* / pcim_*Andy Shevchenko
The error handling is broken right now since it leaves resources unfreed. Convert the code to use managed resources to fix the error handling. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-15move io-64-nonatomic*.h out of asm-genericChristoph Hellwig
These are not implementations of default architecture code but helpers for drivers. Move them to the place they belong to. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Darren Hart <dvhart@linux.intel.com> Acked-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-10-10linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUSRasmus Villemoes
The macros KELVIN_TO_CELSIUS and CELSIUS_TO_KELVIN actually convert between deciKelvins and Celsius, so rename them to reflect that. While at it, use a statement expression in DECI_KELVIN_TO_CELSIUS to prevent expanding the argument multiple times and get rid of a few casts. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-10-06acer-wmi: remove threeg and interface sysfs interfacesLee, Chun-Yi
Since v3.0 kernel, acer-wmi driver auto detects internal 3G device and provides the threeg rfkill interface. So the sysfs interface of 3G is no longer necessary now. The 7b8aca65 patch added kernel information log to remind to user space for the threeg sysfs interface will be removed in 2012, then b58b9ffc patch updated the interface removing time to 2014. I think the 3 years lead time is enough for user space application to use rfkill instead of sysfs interface to control 3G device. This patch removes code about threeg sysfs interface. And it also removes the unused interface sysfs that exposes which ACPI-WMI method used by acer-wmi driver on the machine. The information is already exposed by the acer-wmi initial log. Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Martin Kepplinger <martink@posteo.de> Cc: Darren Hart <dvhart@infradead.org> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03platform/x86: Toshiba WMI Hotkey DriverAzael Avalos
Toshiba laptops that feature WMI events for hotkeys were left unsupported by the toshiba_acpi driver, however, commit a88bc06e5aec ("toshiba_acpi: Avoid registering input device on WMI event laptops") added hardware support for such laptops, but the hotkeys are not handled there. This driver adds support for hotkey monitoring on certain Toshiba laptops that manage the hotkeys via WMI events instead of the Toshiba Configuration Interface (TCI). The toshiba_acpi driver and this one can co-exist, as this only takes care of hotkeys, while the proper takes care of hardware related stuff. Currently the driver is under the EXPERIMENTAL flag, as the keymap and the notify function are incomplete (due to lack of hardware to test). Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03sony-laptop: Fix handling sony_nc_hotkeys_decode resultAndrzej Hajda
sony_nv_hotkeys_decode can return a negative value. real_ev is a u32 variable. The check for real_ev > 0 is incorrect. Use an intermediate ret variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> [dvhart: clarify commit msg, drop superfluous else block] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03intel_mid_powerbtn: Remove misuse of IRQF_NO_SUSPEND flagSudeep Holla
The IRQF_NO_SUSPEND flag is used to identify the interrupts that should be left enabled so as to allow them to work as expected during the suspend-resume cycle, but doesn't guarantee that it will wake the system from a suspended state, enable_irq_wake is recommended to be used for the wakeup. This patch removes the use of IRQF_NO_SUSPEND flags and uses newly introduce PM wakeup APIs dev_pm_{set,clear}_wake_irq. Cc: Darren Hart <dvhart@infradead.org> Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03compal-laptop: Add charge control limitRoald Frederickx
Add charge control limit to the power supply subsystem of the Compal platform driver. This apparently was present in the original driver by Cezary Jackiewicz at http://eko.one.pl/index.php?page=compal-laptop but it seems to have been overlooked. The Kconfig description is updated to reflect this addition. It now also mentions the hwmon interface that was already present. Signed-off-by: Roald Frederickx <roald.frederickx@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03asus-wmi: restore kbd led level after resumeOleksij Rempel
Afters suspend/resume cycle with closed lid the kbd backlight level is lost. This patch will will restore this value to last known level. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Remove unneeded u32 variables from *setup_keyboardAzael Avalos
The function toshiba_acpi_setup_keyboard currently has two u32 variables used to store the Hotkey Event Type and the result of the HCI_SYSTEM_EVENT query. This patch removes those two variables, as we already have a global variable named "hotkey_event_type" and the result of the HCI_SYSTEM_EVENT query can be checked directly from the function. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Add 0x prefix to available_kbd_modes_show functionAzael Avalos
This patch adds the 0x prefix to the values printed by such function, the values are already being printed in hex, but without the prefix, causing confusion, even though the file under Documentation/ABI clearly states that hey are hex values. Simply add the 0x prefix to avoid such confusion. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Change default Hotkey enabling valueAzael Avalos
The driver currently uses the hotkey enabling value of 0x09 to enable hotkey events, but windows uses a different value (0x01). All Toshiba laptops accept the following "hotkey" parameters: 0x01 - Enable hotkey and system events. 0x03 - Enable system events only. 0x09 - Enable hotkey events only. 0x0b - Disable (hotkey and system) events. This patch changes the default hotkey enabling value from 0x09 to 0x01, enabling both the hotkey and system events. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Unify hotkey enabling functionsAzael Avalos
Currently the driver has two functions enabling hotkeys support, but these two functions can be merged into one. This patch merges these two functions, moving some checks to the *enable_hotkeys function, simplifying code in the process. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-17Merge tag 'platform-drivers-x86-v4.3-2' of ↵Linus Torvalds
git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Fix an issue introduced by the previous major toshiba rework. Add a quirk. Workaround a few platform specific firmware items. One cleanup to wmi I inadvertently dropped from a previous pull request. Details: hp-wmi: - limit hotkey enable toshiba_acpi: - Fix hotkeys registration on some toshiba models - Fix USB Sleep and Music always disabled wmi: - Remove private %pUL implementation asus-nb-wmi: - Add wapf=4 quirk for X456UA/X456UF" * tag 'platform-drivers-x86-v4.3-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: hp-wmi: limit hotkey enable toshiba_acpi: Fix hotkeys registration on some toshiba models toshiba_acpi: Fix USB Sleep and Music always disabled wmi: Remove private %pUL implementation asus-nb-wmi: Add wapf=4 quirk for X456UA/X456UF
2015-09-17hp-wmi: limit hotkey enableKyle Evans
Do not write initialize magic on systems that do not have feature query 0xb. Fixes Bug #82451. Redefine FEATURE_QUERY to align with 0xb and FEATURE2 with 0xd for code clearity. Add a new test function, hp_wmi_bios_2008_later() & simplify hp_wmi_bios_2009_later(), which fixes a bug in cases where an improper value is returned. Probably also fixes Bug #69131. Add missing __init tag. Signed-off-by: Kyle Evans <kvans32@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-11Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal updates from Zhang Rui: - use int instead of unsigned long to represent temperature to avoid bogus overheat detection when negative temperature reported. From Sascha Hauer. - export available thermal governors information to user space via sysfs. From Wei Ni. - introduce new thermal driver for Wildcat Point platform controller hub, which uses PCH thermal sensor and associated critical and hot trip points. From Tushar Dave. - add suuport for Intel Skylake and Denlow platforms in powerclamp driver. - some small cleanups in thermal core. * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: Add Intel PCH thermal driver thermal: Add comment explaining test for critical temperature thermal: Use IS_ENABLED instead of #ifdef thermal: remove unnecessary call to thermal_zone_device_set_polling thermal: trivial: fix typo in comment thermal: consistently use int for temperatures thermal: add available policies sysfs attribute thermal/powerclamp: add cpu id for denlow platform thermal/powerclamp: add cpu id for Skylake u/y thermal/powerclamp: add cpu id for skylake h/s
2015-09-10toshiba_acpi: Fix hotkeys registration on some toshiba modelsAzael Avalos
Commit a2b3471b5b13 ("toshiba_acpi: Use the Hotkey Event Type function for keymap choosing") changed the *setup_keyboard function to query for the Hotkey Event Type to help choose the correct keymap, but turns out that here are certain Toshiba models out there not implementing this feature, and thus, failing to continue the input device registration and leaving such laptops without hotkey support. This patch changes such check, and instead of returning an error if the Hotkey Event Type is not present, we simply inform userspace about it, changing the message printed from err to notice, making the function responsible for registering the input device to continue. This issue was found on a Toshiba Portege Z30-B, but there might be some other models out there affected by this regression as well. Cc: <stable@vger.kernel.org> # 4.1+ Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-10toshiba_acpi: Fix USB Sleep and Music always disabledAzael Avalos
Commit e1a949c1b988 ("toshiba_acpi: Refactor *{get, set} functions return value") made changes on the return type of the HCI/SCI functions, but a typo on the USB Sleep and Music code is always reporting non existent support for such feature. This patch corrects the typo, changing an assignment to a comparison, making the laptops with actual support for such feature to work again. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-10wmi: Remove private %pUL implementationRasmus Villemoes
The work performed by wmi_gtoa is equivalent to simply sprintf(out, "%pUL", in), so one could replace its body by this. However, most users feed the result directly as a %s argument to some other function which also understands the %p extensions (they all ultimately use vsnprintf), so we can eliminate some stack buffers and quite a bit of code by just using %pUL directly. In wmi_dev_uevent I'm not sure whether there's room for a nul-terminator in env->buf, so I've just replaced wmi_gtoa with the equivalent sprintf call. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-08Merge tag 'platform-drivers-x86-v4.3-1' of ↵Linus Torvalds
git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Significant work on toshiba_acpi, including new hardware support, refactoring, and cleanups. Extend device support for asus, ideapad, and acer systems. New surface pro 3 buttons driver. Misc minor cleanups for thinkpad and hp-wireless. acer-wmi: - No rfkill on HP Omen 15 wifi thinkpad_acpi: - Remove side effects from vdbg_printk -> no_printk macro surface pro 3: - Add support driver for Surface Pro 3 buttons hp-wireless: - remove unneeded goto/label in hpwl_init ideapad-laptop: - add alternative representation for Yoga 2 to DMI table - Add Lenovo Yoga 3 14 to no_hw_rfkill dmi list asus-laptop: - Add key found on Asus F3M MAINTAINERS: - Remove Toshiba Linux mailing list address toshiba_acpi: - Bump driver version to 0.23 - Remove unnecessary checks and returns in HCI/SCI functions - Refactor *{get, set} functions return value - Remove "*not supported" feature prints - Change *available functions return type - Add set_fan_status function - Change some variables to avoid warnings from ninja-check - Reorder toshiba_acpi_alt_keymap entries - Remove unused wireless defines - Transflective backlight updates - Avoid registering input device on WMI event laptops - Add /dev/toshiba_acpi device - Adapt /proc/acpi/toshiba/keys to TOS1900 devices" * tag 'platform-drivers-x86-v4.3-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (21 commits) acer-wmi: No rfkill on HP Omen 15 wifi thinkpad_acpi: Remove side effects from vdbg_printk -> no_printk macro surface pro 3: Add support driver for Surface Pro 3 buttons hp-wireless: remove unneeded goto/label in hpwl_init ideapad-laptop: add alternative representation for Yoga 2 to DMI table asus-laptop: Add key found on Asus F3M MAINTAINERS: Remove Toshiba Linux mailing list address ideapad-laptop: Add Lenovo Yoga 3 14 to no_hw_rfkill dmi list toshiba_acpi: Bump driver version to 0.23 toshiba_acpi: Remove unnecessary checks and returns in HCI/SCI functions toshiba_acpi: Refactor *{get, set} functions return value toshiba_acpi: Remove "*not supported" feature prints toshiba_acpi: Change *available functions return type toshiba_acpi: Add set_fan_status function toshiba_acpi: Change some variables to avoid warnings from ninja-check toshiba_acpi: Reorder toshiba_acpi_alt_keymap entries toshiba_acpi: Remove unused wireless defines toshiba_acpi: Transflective backlight updates toshiba_acpi: Avoid registering input device on WMI event laptops toshiba_acpi: Add /dev/toshiba_acpi device ...
2015-09-06asus-nb-wmi: Add wapf=4 quirk for X456UA/X456UFDaniel Drake
These laptops boot with wifi as hard-blocked, with no obvious way to enable it. Using a quirk to set wapf=4 solves the problem. Signed-off-by: Daniel Drake <drake@endlessm.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-04Merge tag 'mfd-for-linus-4.3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - New Clocksource driver from ST - New MFD/ACPI/DMA drivers for Intel's Sunrisepoint PCH based platforms - Add support for Arizona WM8998 and WM1814 - Add support for Dialog Semi DA9062 and DA9063 - Add support for Kontron COMe-bBL6 and COMe-cBW6 - Add support for X-Powers AXP152 - Add support for Atmel, many - Add support for STMPE, many - Add support for USB in X-Powers AXP22X Core Frameworks: - New Base API to traverse devices and their children in reverse order Bug Fixes: - Fix race between runtime-suspend and IRQs - Obtain platform data form more reliable source Fix-ups: - Constifying things - Variable signage changes - Kconfig depends|selects changes - Make use of BIT() macro - Do not supply .owner attribute in *_driver structures - MAINTAINERS entries - Stop using set_irq_flags() - Start using irq_set_chained_handler_and_data() - Export DT device ID structures" * tag 'mfd-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (69 commits) mfd: jz4740-adc: Init mask cache in generic IRQ chip mfd: cros_ec: spi: Add OF match table mfd: stmpe: Add OF match table mfd: max77686: Split out regulator part from the DT binding mfd: Add DT binding for Maxim MAX77802 IC mfd: max77686: Use a generic name for the PMIC node in the example mfd: max77686: Don't suggest in binding to use a deprecated property mfd: Add MFD_CROS_EC dependencies mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers mfd: axp20x: Add a cell for the usb power_supply part of the axp20x PMICs mfd: axp20x: Add missing registers, and mark more registers volatile mfd: arizona: Fixup some formatting/white space errors mfd: wm8994: Fix NULL pointer exception on missing pdata of: Add vendor prefix for Nuvoton mfd: mt6397: Implement wake handler and suspend/resume to handle wake up event mfd: atmel-hlcdc: Add support for new SoCs mfd: Export OF module alias information in missing drivers mfd: stw481x: Export I2C module alias information mfd: da9062: Support for the DA9063 OnKey in the DA9062 core mfd: max899x: Avoid redundant irq_data lookup ...
2015-08-28acer-wmi: No rfkill on HP Omen 15 wifiMichael Powell
Prevents acer-wmi from blocking wifi on HP Omen 15 laptops Signed-off-by: Michael Powell <michael_powell@mentor.com> [david.ward@ll.mit.edu: Resubmitted clean patch] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-28thinkpad_acpi: Remove side effects from vdbg_printk -> no_printk macroJoe Perches
vdbg_printk when not using CONFIG_THINKPAD_ACPI_DEBUG uses no_printk which produces no logging output but always evaluates arguments. Change the macro to surround the no_printk call with do { if (0) no_printk(...); } while (0) to avoid the unnecessary argument evaluations. $ size drivers/platform/x86/thinkpad_acpi.o* text data bss dec hex filename 60918 6184 824 67926 10956 drivers/platform/x86/thinkpad_acpi.o.new 60927 6184 824 67935 1095f drivers/platform/x86/thinkpad_acpi.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-26surface pro 3: Add support driver for Surface Pro 3 buttonsChen Yu
Since Surface Pro 3 does not follow the specs of "Windows ACPI Design Guide for SoC Platform", code in drivers/input/misc/soc_array.c can not detect these buttons on it. According to bios implementation, Surface Pro 3 encapsulates these buttons in a device named "VGBI", with _HID "MSHW0028". When any of the buttons is pressed, a specify ACPI notification code for this button will be delivered to "VGBI". For example, if power button is pressed down, ACPI notification code of 0xc6 will be sent by Notify(VGBI, 0xc6). This patch leverages "VGBI" to distinguish different ACPI notification code from Power button, Home button, Volume button, then dispatches these code to input layer. Lid is already covered by acpi button driver, so there's no need to rewrite. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=84651 Tested-by: Ethan Schoonover <es@ethanschoonover.com> Tested-by: Peter Amidon <psa.pub.0@picnicpark.org> Tested-by: Donavan Lance <tusklahoma@gmail.com> Tested-by: Stephen Just <stephenjust@gmail.com> Signed-off-by: Chen Yu <yu.c.chen@intel.com> [dvhart@linux.intel.com: Formatting corrections in MAINTAINERS and Intel (c)] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-25hp-wireless: remove unneeded goto/label in hpwl_initGiedrius Statkevičius
acpi_bus_register_driver() already returns an appropriate value (0 on success, and some negative value on error) to be used in __init functions so the goto/label is redundant in hpwl_init thus remove it and directly return the value Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-11mfd: watchdog: iTCO_wdt: Expose watchdog properties using platform dataMatt Fleming
Intel Sunrisepoint (Skylake PCH) has the iTCO watchdog accessible across the SMBus, unlike previous generations of PCH/ICH where it was on the LPC bus. Because it's on the SMBus, it doesn't make sense to pass around a 'struct lpc_ich_info', and leaking the type of bus into the iTCO watchdog driver is kind of backwards anyway. This change introduces a new 'struct itco_wdt_platform_data' for use inside the iTCO watchdog driver and by the upcoming Intel Sunrisepoint code, which neatly avoids having to include lpc_ich headers in the i801 i2c driver. This change is overdue because lpc_ich_info has already found its way into other TCO watchdog users, notably the intel_pmc_ipc driver where the watchdog actually isn't on the LPC bus as far as I can see. A simple translation layer is provided for converting from the existing 'struct lpc_ich_info' inside the lpc_ich mfd driver. Signed-off-by: Matt Fleming <matt.fleming@intel.com> Acked-by: Darren Hart <dvhart@linux.intel.com> [drivers/x86 refactoring] Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-08-10ideapad-laptop: add alternative representation for Yoga 2 to DMI tableSebastian Krzyszkowiak
There is at least one (mine) Yoga 2 Pro in existence that has incorrect product version stored in DMI (reading as "INVALID"), causing it to not be recognized as Yoga 2 by ideapad-laptop module, which in turn causes non-existent hardware rfkills to be always reported as blocked. This change adds a second check by board name, which is "Yoga2". Looks like it also happens to be "INVALID" on some other Yoga 2 machines where product version is correct instead, so the original check is left intact to catch both cases. Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-10asus-laptop: Add key found on Asus F3MŁukasz Stelmach
Asus F3M has two keys labeled with an icon of a touchpad. The first, reported as 0x6B is next to the power key and the second, reported as 0x6A, is F9 combined with Fn button. When I was pressing the latter, I was getting "Unknown key 6a pressed" message before applying this patch. Asus F3M does not support WMI so the commit does not update key mappings in the asus-nb-wmi.c file. I have not tested this mapping on any other Asus laptop. Signed-off-by: Łukasz Stelmach <stlman@poczta.fm> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-10ideapad-laptop: Add Lenovo Yoga 3 14 to no_hw_rfkill dmi listHans de Goede
Like some of the other Yoga models the Lenovo Yoga 3 14 does not have a hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always reported blocking breaking wifi. This commit adds the Lenovo Yoga 3 14 to the no_hw_rfkill dmi list, fixing the wifi breakage. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1239050 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Bump driver version to 0.23Azael Avalos
Given that some features were added (/dev/toshiba_acpi device), some clean-ups and minor (cosmetic) changes all over the driver code, bump the driver version to 0.23 to reflect these overall changes. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Remove unnecessary checks and returns in HCI/SCI functionsAzael Avalos
A previous patch added explicit feature checks for support, *SUCCESS* and *FAILURE to the HCI/SCI *{get, set} functions. This patch removes some unnedded checks to the driver HCI/SCI functions given that the default error return value is now set to -EIO, there is no need to check for other error values other than the ones currently checking for. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Refactor *{get, set} functions return valueAzael Avalos
This patch refactors the return value of the driver *{get, set} functions, since the driver default error value is -EIO. All the functions now check for TOS_FAILURE, TOS_NOT_SUPPORTED and TOS_SUCCESS. On TOS_FAILURE a pr_err message is printed informing the user of the error (no change was made to this, except the check was added to the functions not checking for this). On TOS_NOT_SUPPORTED we now return -ENODEV immediately (some functions were returning -EIO and some other were not checking) On TOS_SUCCESS* we now return 0 (as a side effect, a new success value was added, since some functions return one instead of zero to indicate success). As a special case, the LED functions now check for *FAILURE on *set, and check for TOS_FAILURE and TOS_SUCCESS on *get with their "default" return value set to LED_OFF. Also the {lcd, video}_proc* functions were adapted to reflect these changes to their parent HCI functions. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>