summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'asm-generic-for-linus' of ↵Linus Torvalds2015-11-062-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * move io-64-nonatomic*.h out of asm-genericChristoph Hellwig2015-10-152-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge tag 'mfd-for-linus-4.4' of ↵Linus Torvalds2015-11-061-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * | platform: x86: PMC IPC depends on ACPILee Jones2015-10-301-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | toshiba_acpi: Initialize hotkey_event_type variableAzael Avalos2015-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | intel_scu_ipc: Protect dev member assignment on ->remove()Andy Shevchenko2015-10-151-0/+3
| | | | | | | | | | | | | | | | | | 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>
* | intel_scu_ipc: Switch to use module_pci_driver() macroAndy Shevchenko2015-10-151-17/+6
| | | | | | | | | | | | | | | | 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>
* | intel_scu_ipc: Convert to use struct device *Andy Shevchenko2015-10-151-23/+18
| | | | | | | | | | | | | | | | 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>
* | intel_scu_ipc: Propagate pointer to struct intel_scu_ipc_devAndy Shevchenko2015-10-151-60/+74
| | | | | | | | | | | | | | | | | | 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>
* | intel_scu_ipc: Fix error path by turning to devm_* / pcim_*Andy Shevchenko2015-10-151-18/+8
| | | | | | | | | | | | | | | | 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>
* | acer-wmi: remove threeg and interface sysfs interfacesLee, Chun-Yi2015-10-061-92/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | OLPC: Use %*ph specifier instead of passing direct valuesAndy Shevchenko2015-10-061-8/+5
| | | | | | | | | | | | | | | | | | The %*ph specifier allows to dump small buffers in hex format. Let's use it instead of passing direct values via stack. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Paul Fox <pgf@laptop.org> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* | platform/x86: Toshiba WMI Hotkey DriverAzael Avalos2015-10-033-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | sony-laptop: Fix handling sony_nc_hotkeys_decode resultAndrzej Hajda2015-10-031-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | intel_mid_powerbtn: Remove misuse of IRQF_NO_SUSPEND flagSudeep Holla2015-10-031-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | compal-laptop: Add charge control limitRoald Frederickx2015-10-032-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | asus-wmi: restore kbd led level after resumeOleksij Rempel2015-10-031-2/+17
| | | | | | | | | | | | | | | | 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>
* | toshiba_acpi: Remove unneeded u32 variables from *setup_keyboardAzael Avalos2015-10-031-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | toshiba_acpi: Add 0x prefix to available_kbd_modes_show functionAzael Avalos2015-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | toshiba_acpi: Change default Hotkey enabling valueAzael Avalos2015-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | toshiba_acpi: Unify hotkey enabling functionsAzael Avalos2015-10-031-24/+12
|/ | | | | | | | | | | 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>
* Merge tag 'platform-drivers-x86-v4.3-2' of ↵Linus Torvalds2015-09-174-62/+48
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * hp-wmi: limit hotkey enableKyle Evans2015-09-171-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * toshiba_acpi: Fix hotkeys registration on some toshiba modelsAzael Avalos2015-09-101-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * toshiba_acpi: Fix USB Sleep and Music always disabledAzael Avalos2015-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * wmi: Remove private %pUL implementationRasmus Villemoes2015-09-101-45/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * asus-nb-wmi: Add wapf=4 quirk for X456UA/X456UFDaniel Drake2015-09-061-0/+18
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'next' of ↵Linus Torvalds2015-09-112-10/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | \
| | \
| *-. \ Merge branches 'thermal-core' and 'thermal-intel' of .git into nextZhang Rui2015-09-022-10/+8
| |\ \ \
| | * | | thermal: consistently use int for temperaturesSascha Hauer2015-08-032-10/+8
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The thermal code uses int, long and unsigned long for temperatures in different places. Using an unsigned type limits the thermal framework to positive temperatures without need. Also several drivers currently will report temperatures near UINT_MAX for temperatures below 0°C. This will probably immediately shut the machine down due to overtemperature if started below 0°C. 'long' is 64bit on several architectures. This is not needed since INT_MAX °mC is above the melting point of all known materials. Consistently use a plain 'int' for temperatures throughout the thermal code and the drivers. This only changes the places in the drivers where the temperature is passed around as pointer, when drivers internally use another type this is not changed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Peter Feuerer <peter@piie.net> Cc: Punit Agrawal <punit.agrawal@arm.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Jean Delvare <jdelvare@suse.de> Cc: Peter Feuerer <peter@piie.net> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: linux-acpi@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: Guenter Roeck <linux@roeck-us.net> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Darren Hart <dvhart@infradead.org> Cc: lm-sensors@lm-sensors.org Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | | | Merge tag 'platform-drivers-x86-v4.3-1' of ↵Linus Torvalds2015-09-089-385/+667
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * | | acer-wmi: No rfkill on HP Omen 15 wifiMichael Powell2015-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | thinkpad_acpi: Remove side effects from vdbg_printk -> no_printk macroJoe Perches2015-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | surface pro 3: Add support driver for Surface Pro 3 buttonsChen Yu2015-08-263-0/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | hp-wireless: remove unneeded goto/label in hpwl_initGiedrius Statkevičius2015-08-251-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | ideapad-laptop: add alternative representation for Yoga 2 to DMI tableSebastian Krzyszkowiak2015-08-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | asus-laptop: Add key found on Asus F3MŁukasz Stelmach2015-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | ideapad-laptop: Add Lenovo Yoga 3 14 to no_hw_rfkill dmi listHans de Goede2015-08-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | toshiba_acpi: Bump driver version to 0.23Azael Avalos2015-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | toshiba_acpi: Remove unnecessary checks and returns in HCI/SCI functionsAzael Avalos2015-08-051-125/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | toshiba_acpi: Refactor *{get, set} functions return valueAzael Avalos2015-08-051-73/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | toshiba_acpi: Remove "*not supported" feature printsAzael Avalos2015-08-051-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the driver prints "*not supported" if any of the features queried are in fact not supported, let us print the available features instead. This patch removes all instances pr_info printing "*not supported", and add a new function called "print_supported_features", which will print the available laptop features. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Change *available functions return typeAzael Avalos2015-08-051-67/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the *available functions return type from int to void. The checks for support of their respective features are done inside such functions and there was no need to return anything as we can flag the queried feature as supported inside these functions. The code was adapted accordingly to these changes and two new variables were created and another was changed from uint to bool. Also, the function toshiba_acceleremoter_supported was renamed to toshiba_accelerometer_available to maintain the naming consistency on the driver. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Add set_fan_status functionAzael Avalos2015-07-281-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new function named "set_fan_status" to complement its get* counterpart, as well as to avoid code duplication between "fan_proc_write" and "fan_store". Also, both functions (get*, set*) are now checking for TOS_FAILURE, TOS_NOT_SUPPORTED and TOS_SUCCESS (to be on par with the rest of the HCI/SCI functions), printing an error message, returning -ENODEV and zero respectively. The proc and sysfs functions were updated to reflect these changes as well, returning -EIO for proc, and propagating the error value on the sysfs functions. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Change some variables to avoid warnings from ninja-checkAzael Avalos2015-07-241-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes some variables to avoid warnings from ninja-check. We are basically moving some variables inside the conditionals where such variables are being used, and we are checking the returned values of some others. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Reorder toshiba_acpi_alt_keymap entriesAzael Avalos2015-07-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simply reorders the entries found in the new keymap by ascending order, this is simply a cosmetic change, no functionality was modified. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Remove unused wireless definesAzael Avalos2015-07-241-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 2b74103547b4 ("toshiba_acpi: Remove bluetooth rfkill code") removed bluetooth related code, however, the wireless defines were not removed and are unused. This patch simply removes those defines as there is no code using them. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Transflective backlight updatesAzael Avalos2015-07-241-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the tr function second parameter from bool to u32, to be on par with the rest of the TCI functions of the driver, and the code was updated accordingly. Also, the check for translective support was moved to the *add function, as the {__get, set}_lcd_brightness functions make use of it. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Avoid registering input device on WMI event laptopsAzael Avalos2015-07-241-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f11f999e9890 ("toshiba_acpi: Refuse to load on machines with buggy INFO implementations") denied loading on laptops with a WMI Event GUID given that such laptops manage the hotkeys via that interface, however, such laptops have a working Toshiba Configuration Interface (TCI), and thus, such commit denied several supported features. This patch avoids registering the input device and ignores all hotkey events on laptops with such WMI Event GUID, making the supported features found in those laptops to work. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
| * | | toshiba_acpi: Add /dev/toshiba_acpi deviceAzael Avalos2015-07-241-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were previous attempts to "merge" the toshiba SMM module to the toshiba_acpi one, they were trying to imitate what the old toshiba module does, however, some models (TOS1900 devices) come with a "crippled" implementation and do not provide all the "features" a "genuine" Toshiba BIOS does. This patch adds a new device called toshiba_acpi, which aim is to enable userspace to access the SMM on Toshiba laptops via ACPI calls. Creating a new convenience _IOWR command to access the SCI functions by opening/closing the SCI internally to avoid buggy BIOS, while at the same time providing backwards compatibility. Older programs (and new) who wish to access the SMM on newer models can do it by pointing their path to /dev/toshiba_acpi (instead of /dev/toshiba) as the toshiba.h header was modified to reflect these changes as well as adds all the toshiba_acpi paths and command, however, it is strongly recommended to use the new IOCTL for any SCI command to avoid any buggy BIOS. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>