summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/Makefile
AgeCommit message (Collapse)Author
2019-10-15platform/x86: Add System76 ACPI driverJeremy Soller
Add System76 ACPI driver, which adds support for Fn-Fx key combinations, keyboard backlight, and airplane mode LEDs on System76 laptops running open source firmware. Signed-off-by: Jeremy Soller <jeremy@system76.com> Cc: platform-driver-x86@vger.kernel.org Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-10-15platform/x86: intel_cht_int33fe: Split code to Micro-B and Type-CYauhen Kharuzhy
Existing intel_cht_int33fe ACPI pseudo-device driver assumes that hardware has Type-C connector and register related devices described as I2C connections in the _CRS resource. There is at least one hardware (Lenovo Yoga Book YB1-91L/F) with Micro-B USB connector exists. It has INT33FE device in the DSDT table but there are only two I2C connection described: PMIC and BQ27452 battery fuel gauge. Splitting existing INT33FE driver allow to maintain code for USB Micro-B (or AB) connector variant separately and make it simpler. Split driver to intel_cht_int33fe_common.c and intel_cht_int33fe_{microb,typec}.c. Compile all this sources to one .ko module to make user experience easier. Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-07-08platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1"Rajat Jain
Most modern platforms already have the ACPI device "INT33A1" that could be used to attach to the driver. Switch the driver to using that and thus make the intel_pmc_core.c a pure platform_driver. Some of the legacy platforms though, may still not have this ACPI device in their ACPI tables. Thus for such platforms, move the code to manually instantiate a platform_device into a new file of its own. This would instantiate the intel_pmc_core platform device and thus attach to the driver, if the ACPI device for the same ("INT33A1") is not present in a system where it should be. This was discussed here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1966991.html Signed-off-by: Rajat Jain <rajatja@google.com> [andy: renamed to intel_pmc_core_pltdrv.c to be in align with other drivers] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-07-02platform/x86: ISST: Add common API to register and handle ioctlsSrinivas Pandruvada
Encapsulate common functions which all Intel Speed Select Technology interface drivers can use. This creates API to register misc device for user kernel communication and handle all common IOCTLs. As part of the registry it allows a callback which is to handle domain specific ioctl processing. There can be multiple drivers register for services, which can be built as modules. So this driver handle contention during registry and as well as during removal. Once user space opened the misc device, the registered driver will be prevented from removal. Also once misc device is opened by the user space new client driver can't register, till the misc device is closed. There are two types of client drivers, one to handle mail box interface and the other is to allow direct read/write to some specific MMIO space. This common driver implements IOCTL ISST_IF_GET_PLATFORM_INFO. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-06-29platform/x86: wmi: add Xiaomi WMI key driverMattias Jacobsson
Some function keys on the built in keyboard on Xiaomi's notebooks does not produce any key events when pressed in combination with the function key. Some of these keys do report that they are being pressed via WMI events. This driver reports key events for Fn+F7 and double tap on Fn. Other WMI events that are reported by the hardware but not utilized by this driver are Caps Lock(which already work) and Fn lock/unlock. Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-05-09platform/x86: Add support for Basin Cove power buttonAndy Shevchenko
This provides a new input driver for supporting the power button on Basin Cove PMIC, found on Intel Merrifield-based devices. The driver follows the design used in intel_chtdc_ti_pwrbtn.c module. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-02-22x86: pcengines apuv2 gpio/leds/keys platform driverEnrico Weigelt, metux IT consult
Driver for PCengines APUv2 board's front LEDs and Button, which are attached to AMD PCH GPIOs. Due to lack of dedicated ACPI entry, detecting the board via DMI. Cc: linux-gpio@vger.kernel.org Cc: linus.walleij@linaro.org Cc: bgolaszewski@baylibre.com Cc: dvhart@infradead.org Cc: platform-driver-x86@vger.kernel.org Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-28Merge tag 'char-misc-4.21-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big set of char and misc driver patches for 4.21-rc1. Lots of different types of driver things in here, as this tree seems to be the "collection of various driver subsystems not big enough to have their own git tree" lately. Anyway, some highlights of the changes in here: - binderfs: is it a rule that all driver subsystems will eventually grow to have their own filesystem? Binder now has one to handle the use of it in containerized systems. This was discussed at the Plumbers conference a few months ago and knocked into mergable shape very fast by Christian Brauner. Who also has signed up to be another binder maintainer, showing a distinct lack of good judgement :) - binder updates and fixes - mei driver updates - fpga driver updates and additions - thunderbolt driver updates - soundwire driver updates - extcon driver updates - nvmem driver updates - hyper-v driver updates - coresight driver updates - pvpanic driver additions and reworking for more device support - lp driver updates. Yes really, it's _finally_ moved to the proper parallal port driver model, something I never thought I would see happen. Good stuff. - other tiny driver updates and fixes. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (116 commits) MAINTAINERS: add another Android binder maintainer intel_th: msu: Fix an off-by-one in attribute store stm class: Add a reference to the SyS-T document stm class: Fix a module refcount leak in policy creation error path char: lp: use new parport device model char: lp: properly count the lp devices char: lp: use first unused lp number while registering char: lp: detach the device when parallel port is removed char: lp: introduce list to save port number bus: qcom: remove duplicated include from qcom-ebi2.c VMCI: Use memdup_user() rather than duplicating its implementation char/rtc: Use of_node_name_eq for node name comparisons misc: mic: fix a DMA pool free failure ptp: fix an IS_ERR() vs NULL check genwqe: Fix size check binder: implement binderfs binder: fix use-after-free due to ksys_close() during fdget() bus: fsl-mc: remove duplicated include files bus: fsl-mc: explicitly define the fsl_mc_command endianness misc: ti-st: make array read_ver_cmd static, shrinks object size ...
2018-12-13platform/x86: add support for Huawei WMI hotkeysAyman Bagabas
This driver adds support for missing hotkeys on some Huawei laptops. Laptops such as the Matebook X have non functioning hotkeys. Whereas newer laptops such as the Matebook X Pro come with working hotkeys out of the box. Old laptops, such as the Matebook X, report hotkey events through ACPI device "\WMI0". However, new laptops, such as the Matebook X Pro, does not have this WMI device. All the hotkeys on the Matebook X Pro work fine without this patch except (micmute, wlan, and huawei key). These keys and the brightness keys report events to "\AMW0" ACPI device. One problem is that brightness keys on the Matebook X Pro work without this patch. This results in reporting two brightness key press events one is captured by ACPI and another by this driver. A solution would be to check if such event came from the "\AMW0" WMI driver then skip reporting event. Another solution would be to leave this to user-space to handle. Which can be achieved by using "hwdb" tables and remap those keys to "unknown". This solution seems more natural to me because it leaves the decision to user-space. Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-11-07pvpanic: move pvpanic to misc as common driverPeng Hao
Move pvpanic.c from drivers/platform/x86 to drivers/misc. Following patches will use pvpanic device in arm64. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-29platform/x86: Add Intel AtomISP2 dummy / power-management driverHans de Goede
The Image Signal Processor found on Cherry Trail devices is brought up in D0 state on devices which have camera sensors attached to it. The ISP will not enter D3 state again without some massaging of its registers beforehand and the ISP not being in D3 state blocks the SoC from entering S0ix modes. There was a driver for the ISP in drivers/staging but that got removed again because it never worked. It does not seem likely that a real driver for the ISP will be added to the mainline kernel anytime soon. This commit adds a dummy driver which contains the necessary magic from the staging driver to powerdown the ISP, so that Cherry Trail devices where the ISP is used will properly use S0ix modes when suspended. Together with other recent S0ix related fixes this allows S0ix modes to be entered on e.g. a Chuwi Hi8 Pro and a HP x2 210. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196915 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-10-19platform/x86: Add LG Gram laptop special features driverMatan Ziv-Av
A driver for LG Gram laptop supporting features not available through the standard interfaces: - Support for the 5 Fn keys that generate ACPI or WMI events. - Two software controlled LEDs: keyboard backlight (also controlled by hardware) and touchpad LED. - Extra features: reader mode, Fn lock, cooling mode, USB charge mode, and maximal battery charging level. Signed-off-by: Matan Ziv-Av <matan@svgalib.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-09-27firmware: dcdbas: Move dcdbas to drivers/platform/x86Stuart Hayes
Move dcdbas to the more appropriate directory drivers/platform/x86. Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-09-27firmware: dell_rbu: Move dell_rbu to drivers/platform/x86Stuart Hayes
Move dell_rbu to the more appropriate directory drivers/platform/x86. Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-08-22Merge tag 'platform-drivers-x86-v4.19-1' of ↵Linus Torvalds
git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: - The driver for Silead touchscreen configurations has been renamed from silead_dmi to touchscreen_dmi since it starts supporting other touchscreens which require some DMI quirks It also gets expanded to cover cases for Chuwi Vi10, ONDA V891W, Connect Tablet 9, Onda V820w, and Cube KNote i1101 tablets. - Another bunch of changes is related to Mellanox platform code to allow user space to communicate with Mellanox for system control and monitoring purposes. The driver notifies user on hotplug device signal receiving. - ASUS WMI drivers recognize lid flip action on UX360, and correctly toggles airplane mode LED. In addition the keyboard backlight toggle gets support. - ThinkPad ACPI driver enables support for calculator key (on at least P52). It also has been fixed to support three characters model designators, which are used for modern laptops. Earlier the battery, marked as BAT1, on ThinkPad laptops has not been configured properly, which is fixed. On the opposite the multi-battery configurations now probed correctly. - Dell SMBIOS driver starts working on some Dell servers which do not support token interface. The regression with backlight detection has also been fixed. In order to support dock mode on some laptops, Intel virtual button driver has been fixed. The last but not least is the fix to Intel HID driver due to changes in Dell systems that prevented to use power button. * tag 'platform-drivers-x86-v4.19-1' of git://git.infradead.org/linux-platform-drivers-x86: (47 commits) platform/x86: acer-wmi: Silence "unsupported" message a bit platform/x86: intel_punit_ipc: fix build errors platform/x86: ideapad: Add Y520-15IKBM and Y720-15IKBM to no_hw_rfkill platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360 platform/x86: acer-wmi: refactor function has_cap platform/x86: thinkpad_acpi: Fix multi-battery bug platform/x86: thinkpad_acpi: extend battery quirk coverage platform/x86: touchscreen_dmi: Add info for the Cube KNote i1101 tablet platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init() platform/x86: mlx-platform: Remove unused define platform/x86: mlx-platform: Change mlxreg-io configuration for MSN274x systems Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces platform/x86: mlx-platform: Allow mlxreg-io driver activation for more systems platform/x86: mlx-platform: Add ASIC hotplug device configuration platform/mellanox: mlxreg-hotplug: Add hotplug hwmon uevent notification platform/mellanox: mlxreg-hotplug: Improve mechanism of ASIC health discovery platform/x86: mlx-platform: Add mlxreg-fan platform driver activation platform/x86: dell-laptop: Fix backlight detection platform/x86: toshiba_acpi: Fix defined but not used build warnings platform/x86: thinkpad_acpi: Support battery quirk ...
2018-08-09platform/x86: Add ACPI i2c-multi-instantiate pseudo driverHans de Goede
On systems with ACPI instantiated i2c-clients, normally there is 1 fw_node per i2c-device and that fw-node contains 1 I2cSerialBus resource for that 1 i2c-device. But in some rare cases the manufacturer has decided to describe multiple i2c-devices in a single ACPI fwnode with multiple I2cSerialBus resources. An earlier attempt to fix this in the i2c-core resulted in a lot of extra code to support this corner-case. This commit introduces a new i2c-multi-instantiate driver which fixes this in a different way. This new driver can be built as a module which will only loaded on affected systems. This driver will instantiate a new i2c-client per I2cSerialBus resource, using the driver_data from the acpi_device_id it is binding to to tell it which chip-type (and optional irq-resource) to use when instantiating. Note this driver depends on a platform device being instantiated for the ACPI fwnode, see the i2c_multi_instantiate_ids list of ACPI device-ids in drivers/acpi/scan.c: acpi_device_enumeration_by_parent(). Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-07-02platform/x86: Rename silead_dmi to touchscreen_dmiHans de Goede
Not only silead touchscreens need some extra info not available in the ACPI tables to work properly. X86 devices with a Chipone ICN8505 chip also need some DMI based extra configuration. There is no reason to have separate dmi config code per touchscreen controller vendor. This commit renames silead_dmi to a more generic touchscreen_dmi name (and Kconfig option) in preparation of adding info for tablets with an ICN8505 based touchscreen. Note there are no functional changes all code changes are limited to removing references to silead where these are no longer applicable. Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-03-09platform/x86: dell-smbios: Link all dell-smbios-* modules togetherMario Limonciello
Some race conditions were raised due to dell-smbios and its backends not being ready by the time that a consumer would call one of the exported methods. To avoid this problem, guarantee that all initialization has been done by linking them all together and running init for them all. As part of this change the Kconfig needs to be adjusted so that CONFIG_DELL_SMBIOS_SMM and CONFIG_DELL_SMBIOS_WMI are boolean rather than modules. CONFIG_DELL_SMBIOS is a visually selectable option again and both CONFIG_DELL_SMBIOS_WMI and CONFIG_DELL_SMBIOS_SMM are optional. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> [dvhart: Update prompt and help text for DELL_SMBIOS_* backends] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2018-03-09platform/x86: dell-smbios: Rename dell-smbios source to dell-smbios-baseMario Limonciello
This is being done to faciliate a later change to link all the dell-smbios drivers together. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2018-01-31platform/x86: Move Mellanox platform hotplug driver to platform/mellanoxVadim Pasternak
In preparation for making the hotplug driver build for different architectures, move mlxcpld-hotplug.c to platform/mellanox and the header to include/linux/platform_data as mlxreg.h to reflect the new interface changes to come. Replace references to CPLD with REG throughout the files, consistent with the new name. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> [dvhart: update copyright, rewrite commit message] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-12-21platform/x86: Add driver for GPD pocket custom fan controllerHans de Goede
Add a driver for the GPD pocket device's custom fan controller, which gets controlled through 2 GPIOs listed in a FAN02501 ACPI device. Cc: James <kernel@madingley.org> Suggested-by: James <kernel@madingley.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-11-27platform/x86: Add support for Dollar Cove TI power buttonTakashi Iwai
This provides a new input driver for supporting the power button on Dollar Cove TI PMIC, found on Cherrytrail-based devices. The patch is based on the original work by Intel, found at: https://github.com/01org/ProductionKernelQuilts Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193891 Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-11-27platform/x86: Add Acer Wireless Radio Control driverChris Chiu
New Acer laptops in 2018 will have a separate ACPI device for notifications from the airplane mode hotkey. The device name in the DSDT is SMKB and its ACPI _HID is 10251229. For these models, when the airplane mode hotkey (Fn+F3) pressed, a query 0x02 is started in the Embedded Controller, and all this query does is a notify SMKB with the value 0x80. Scope (_SB.PCI0.LPCB.EC0) { (...) Method (_Q02, 0, NotSerialized) // _Qxx: EC Query { HKEV (0x2, One) Notify (SMKB, 0x80) // Status Change } } Based on code from asus-wireless Signed-off-by: Chris Chiu <chiu@endlessm.com> Reviewed-by: João Paulo Rechi Vita <jprvita@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-11-18Merge tag 'platform-drivers-x86-v4.15-1' of ↵Linus Torvalds
git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: "Here is the collected material against Platform Drivers x86 subsystem. It's rather bit busy cycle for PDx86, mostly due to Dell SMBIOS driver activity For this cycle we have quite an update for the Dell SMBIOS driver including WMI work to provide an interface for SMBIOS tokens via sysfs and WMI support for 2017+ Dell laptop models. SMM dispatcher code is split into a separate driver followed by a new WMI dispatcher. The latter provides a character device interface to user space. The git history also contains a merge of immutable branch from Wolfram Sang in order to apply a dependent fix to the Intel CherryTrail Battery Management driver. Other Intel drivers got a lot of cleanups. The Turbo Boost Max 3.0 support is added for Intel Skylake. Peaq WMI hotkeys driver gets its own maintainer and white list of supported models. Silead DMI is expanded to support few additional platforms. Tablet mode via GMMS ACPI method is added to support some ThinkPad tablets. new driver: - Add driver to force WMI Thunderbolt controller power status asus-wmi: - Add lightbar led support dell-laptop: - Allocate buffer before rfkill use dell-smbios: - fix string overflow - Add filtering support - Introduce dispatcher for SMM calls - Add a sysfs interface for SMBIOS tokens - only run if proper oem string is detected - Prefix class/select with cmd_ - Add pr_fmt definition to driver dell-smbios-smm: - test for WSMT dell-smbios-wmi: - release mutex lock on WMI call failure - introduce userspace interface - Add new WMI dispatcher driver dell-smo8800: - remove redundant assignments to byte_data dell-wmi: - don't check length returned - clean up wmi descriptor check - increase severity of some failures - Do not match on descriptor GUID modalias - Label driver as handling notifications dell-*wmi*: - Relay failed initial probe to dependent drivers dell-wmi-descriptor: - check if memory was allocated - split WMI descriptor into it's own driver fujitsu-laptop: - Fix radio LED detection - Don't oops when FUJ02E3 is not presnt hp_accel: - Add quirk for HP ProBook 440 G4 hp-wmi: - Fix tablet mode detection for convertibles ideapad-laptop: - Add Lenovo Yoga 920-13IKB to no_hw_rfkill dmi list intel_cht_int33fe: - Update fusb302 type string, add properties - make a couple of local functions static - Work around BIOS bug on some devices intel-hid: - Power button suspend on Dell Latitude 7275 intel_ips: - Convert timers to use timer_setup() - Remove FSF address from GPL notice - Remove unneeded fields and label - Keep pointer to struct device - Use PCI_VDEVICE() macro - Switch to new PCI IRQ allocation API - Simplify error handling via devres API intel_pmc_ipc: - Revert Use MFD framework to create dependent devices - Use MFD framework to create dependent devices - Use spin_lock to protect GCR updates - Use devm_* calls in driver probe function intel_punit_ipc: - Fix resource ioremap warning intel_telemetry: - Remove useless default in Kconfig - Add needed inclusion - cleanup redundant headers - Fix typos - Fix load failure info intel_telemetry_debugfs: - Use standard ARRAY_SIZE() macro intel_turbo_max_3: - Add Skylake platform intel-wmi-thunderbolt: - Silence error cases mlx-platform: - make a couple of structures static peaq_wmi: - Fix missing terminating entry for peaq_dmi_table peaq-wmi: - Remove unnecessary checks from peaq_wmi_exit - Add DMI check before binding to the WMI interface - Revert Blacklist Lenovo ideapad 700-15ISK - Blacklist Lenovo ideapad 700-15ISK silead_dmi: - Add silead, home-button property to some tablets - Add entry for the Digma e200 tablet - Fix GP-electronic T701 entry - Add entry for the Chuwi Hi8 Pro tablet sony-laptop: - Drop variable assignment in sony_nc_setup_rfkill() - Fix error handling in sony_nc_setup_rfkill() thinkpad_acpi: - Implement tablet mode using GMMS method tools/wmi: - add a sample for dell smbios communication over WMI wmi: - release mutex on module acquistion failure - create userspace interface for drivers - Don't allow drivers to get each other's GUIDs - Add new method wmidev_evaluate_method - Destroy on cleanup rather than unregister - Cleanup exit routine in reverse order of init - Sort include list" * tag 'platform-drivers-x86-v4.15-1' of git://git.infradead.org/linux-platform-drivers-x86: (74 commits) platform/x86: silead_dmi: Add silead, home-button property to some tablets platform/x86: dell-laptop: Allocate buffer before rfkill use platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers platform/x86: dell-wmi-descriptor: check if memory was allocated platform/x86: Revert intel_pmc_ipc: Use MFD framework to create dependent devices platform/x86: dell-smbios-wmi: release mutex lock on WMI call failure platform/x86: wmi: release mutex on module acquistion failure platform/x86: dell-smbios: fix string overflow platform/x86: intel_pmc_ipc: Use MFD framework to create dependent devices platform/x86: intel_punit_ipc: Fix resource ioremap warning platform/x86: dell-smo8800: remove redundant assignments to byte_data platform/x86: hp-wmi: Fix tablet mode detection for convertibles platform/x86: intel_ips: Convert timers to use timer_setup() platform/x86: sony-laptop: Drop variable assignment in sony_nc_setup_rfkill() platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill() tools/wmi: add a sample for dell smbios communication over WMI platform/x86: dell-smbios-wmi: introduce userspace interface platform/x86: wmi: create userspace interface for drivers platform/x86: dell-smbios: Add filtering support platform/x86: dell-smbios-smm: test for WSMT ...
2017-11-03platform/x86: dell-smbios-wmi: Add new WMI dispatcher driverMario Limonciello
The dell-smbios stack only currently uses an SMI interface which grants direct access to physical memory to the firmware SMM methods via a pointer. This dispatcher driver adds a WMI-ACPI interface that is detected by WMI probe and preferred over the SMI interface in dell-smbios. Changing this to operate over WMI-ACPI will use an ACPI OperationRegion for a buffer of data storage when SMM calls are performed. This is a safer approach to use in kernel drivers as the SMM will only have access to that OperationRegion. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Reviewed-by: Edward O'Callaghan <quasisec@google.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-11-03platform/x86: dell-smbios: Introduce dispatcher for SMM callsMario Limonciello
This splits up the dell-smbios driver into two drivers: * dell-smbios * dell-smbios-smm dell-smbios can operate with multiple different dispatcher drivers to perform SMBIOS operations. Also modify the interface that dell-laptop and dell-wmi use align to this model more closely. Rather than a single global buffer being allocated for all drivers, each driver will allocate and be responsible for it's own buffer. The pointer will be passed to the calling function and each dispatcher driver will then internally copy it to the proper location to perform it's call. Add defines for calls used by these methods in the dell-smbios.h header for tracking purposes. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Reviewed-by: Edward O'Callaghan <quasisec@google.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-11-03platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driverMario Limonciello
All communication on individual GUIDs should occur in separate drivers. Allowing a driver to communicate with the bus to another GUID is just a hack that discourages drivers to adopt the bus model. The information found from the WMI descriptor driver is now exported for use by other drivers. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Reviewed-by: Edward O'Callaghan <quasisec@google.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-20platform/x86: Add driver to force WMI Thunderbolt controller power statusMario Limonciello
Current implementations of Intel Thunderbolt controllers will go into a low power mode when not in use. Many machines containing these controllers also have a GPIO wired up that can force the controller awake. This is offered via a ACPI-WMI interface intended to be manipulated by a userspace utility. This mechanism is provided by Intel to OEMs to include in BIOS. It uses an industry wide GUID that is populated in a separate _WDG entry with no binary MOF. This interface allows software such as fwupd to wake up thunderbolt controllers to query the firmware version or flash new firmware. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org> [andy fixed merge conflicts and bump kernel version for ABI] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-06Merge tag 'platform-drivers-x86-v4.13-1' of ↵Linus Torvalds
git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Introduce new bus architecture for WMI and expose BMOF data through sysfs. Correct several assumptions about WMI instance number from 1 to 0. Further fujitsu-laptop cleanups, continuing to prepare for separation into two modules. Add support for several new ideapad laptops and silead-based tablets. Various minor fixes and const cleanups. Detail summary: sony-laptop: - constify attribute_group and input index array fujitsu-laptop: - rework debugging - do not evaluate ACPI _INI methods - do not update ACPI device power status - sanitize hotkey input device identification - use strcpy to set ACPI device names and classes - remove redundant safety checks - use device-specific data in remaining module code - use device-specific data in LED-related code - explicitly pass ACPI device to call_fext_func() - track the last instantiated FUJ02E3 ACPI device - allocate fujitsu_laptop in acpi_fujitsu_laptop_add() - use device-specific data in backlight code - allocate fujitsu_bl in acpi_fujitsu_bl_add() - distinguish current uses of device-specific data msi-laptop: - constify msipf*_attribute_group eeepc-laptop: - constify platform_attribute_group toshiba_haps: - constify haps_attr_group dell-wmi-led: - Adjust instance of wmi_evaluate_method calls to 0 alienware-wmi: - Adjust instance of wmi_evaluate_method calls to 0 intel_menlow: - Add const to thermal_cooling_device_ops structure acerhdf: - Add const to thermal_cooling_device_ops structure dell-laptop: - Fix bogus keyboard backlight sysfs interface acer-wmi: - Using zero as first WMI instance number - Detect RF Button capability ideapad-laptop: - Add Y720-15IKBN to no_hw_rfkill - Add Y520-15IKBN to no_hw_rfkill - constify rfkill_ops structure - Squelch ACPI event 1 - hide unused 'touchpad_store' - Switch touchpad attribute to be RO - Add sysfs interface for touchpad state silead_dmi: - Add touchscreen info for PoV mobii wintab p800w - Add touchscreen info for Pipo W2S tablet - Add touchscreen info for GP-electronic T701 dell-rbtn: - constify rfkill_ops structures - Improve explanation about DELLABC6 samsung-laptop: - constify rfkill_ops structures panasonic-laptop: - remove unused code samsung-laptop: - Initialize loca variable dell-wmi: - Convert to the WMI bus infrastructure - Add a better description for "stealth mode" - Add a comment explaining the 0xb2 magic number wmi-bmof: - New driver to expose embedded Binary WMI MOF metadata wmi*: - Fix printing info about WDG structure - Add recent copyright statements - Require query for data blocks, rename writable to setable - Add an interface for subdrivers to access sibling devices - Bind the platform device, not the ACPI node - Add a new interface to read block data - Incorporate acpi_install_notify_handler - Instantiate all devices before adding them - Probe data objects for read and write capabilities - Split devices into types and add basic sysfs attributes - Fix error handling when creating devices - Turn WMI into a bus driver - Track wmi devices per ACPI device - Clean up acpi_wmi_add - Pass the acpi_device through to parse_wdg - Drop "Mapper (un)loaded" messages intel_cht_int33fe: - Set supplied-from property on max17047 dev intel_pmc_ipc: - Mark ipc_data_readb() as __maybe_unused topstar-laptop: - Add new device id peaq-wmi: - Add new peaq-wmi driver thinkpad_acpi: - Add a comment about 0 in module_param_call() - Join string literals back toshiba_acpi: - use memdup_user_nul" * tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86: (67 commits) platform/x86: sony-laptop: constify attribute_group and input index array platform/x86: fujitsu-laptop: rework debugging platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods platform/x86: fujitsu-laptop: do not update ACPI device power status platform/x86: fujitsu-laptop: sanitize hotkey input device identification platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes platform/x86: fujitsu-laptop: remove redundant safety checks platform/x86: msi-laptop: constify msipf*_attribute_group platform/x86: eeepc-laptop: constify platform_attribute_group platform/x86: toshiba_haps: constify haps_attr_group platform/x86: dell-wmi-led: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: intel_menlow: Add const to thermal_cooling_device_ops structure platform/x86: acerhdf: Add const to thermal_cooling_device_ops structure platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface platform/x86: acer-wmi: Using zero as first WMI instance number platform/x86: ideapad-laptop: Add Y720-15IKBN to no_hw_rfkill platform/x86: ideapad-laptop: Add Y520-15IKBN to no_hw_rfkill platform/x86: silead_dmi: Add touchscreen info for PoV mobii wintab p800w platform/x86: silead_dmi: Add touchscreen info for Pipo W2S tablet ...
2017-06-15platform/x86: Add driver for ACPI INT0002 Virtual GPIO deviceHans de Goede
Some peripherals on Bay Trail and Cherry Trail platforms signal a Power Management Event (PME) to the Power Management Controller (PMC) to wakeup the system. When this happens software needs to explicitly clear the PME bus 0 status bit in the GPE0a_STS register to avoid an IRQ storm on IRQ 9. This is modelled in ACPI through the INT0002 ACPI device, which is called a "Virtual GPIO controller" in ACPI because it defines the event handler to call when the PME triggers through _AEI and _L02 methods as would be done for a real GPIO interrupt in ACPI. This commit adds a driver which registers the Virtual GPIOs expected by the DSDT on these devices, letting gpiolib-acpi claim the virtual GPIO and install a GPIO-interrupt handler which call the _L02 handler as it would for a real GPIO controller. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-06-06platform/x86: wmi-bmof: New driver to expose embedded Binary WMI MOF metadataDarren Hart (VMware)
Many laptops (and maybe servers?) have embedded WMI Binary MOF metadata. We do not yet have open-source tools for processing the data, although one is in the works thanks to Pali: https://github.com/pali/bmfdec There is currently no interface to get the data in the first place. By exposing it, we facilitate the development of new tools. This is based on the original work of Andy Lutomirski <luto@kernel.org>, but contains several modifications in response to various reviews. Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Mario Limonciello <mario_limonciello@dell.com> Cc: Pali Rohár <pali.rohar@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
2017-05-15platform/x86: peaq-wmi: Add new peaq-wmi driverHans de Goede
PEAQ is a new European OEM, I've bought one of their 2-in-1 x86 devices, which is actually quite a nice device. Under Windows it has Dolby software for "better" sound and you can select different equalizer presets using a special button. This WMI interface for this button is not really nice, as it does not do notifies (it really does not I triple checked), but since I had already figured out the entire WMI interface for this I decided to go the full mile anyway and implement a WMI based input driver for this using input_polldev since, well, we need to poll. This commit adds support for this button making it report KEY_SOUND input events. KEY_SOUND is already used in various places to switch sound into theatre mode and things like that so it seems appropriate here. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [dvhart: minor declaration ordering and commit log typo fixes] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-04-17platform/x86: Add Intel Cherry Trail ACPI INT33FE device driverHans de Goede
The INT33FE ACPI device has a CRS table with I2cSerialBusV2 resources for 3 devices: Maxim MAX17047 Fuel Gauge Controller, FUSB302 USB Type-C Controller and PI3USB30532 USB switch. This commit adds a driver for this ACPI device which instantiates i2c-clients for these, so that the standard i2c drivers for these chips can bind to the them. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-03-06dell-led: move driver to drivers/platform/x86/dell-wmi-led.cMichał Kępień
The dell-led driver handles a specific WMI GUID present on some Dell laptops and as such it belongs in the x86 platform driver subsystem. Source code is moved along with the relevant Kconfig and Makefile entries, with some minor modifications: - Kconfig option is renamed from CONFIG_LEDS_DELL_NETBOOKS to CONFIG_DELL_WMI_LED, - the X86 Kconfig dependency is removed as the whole drivers/platform/x86 menu depends on it, so there is no need to duplicate it, - the name of the module's source file is removed from the header comment to avoid the need to update it in the future. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Tested-by: Alex Hung <alex.hung@canonical.com> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-02-25Merge tag 'platform-drivers-x86-v4.11-1' of ↵Linus Torvalds
git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Big picture: - New intel_turbo_max_3 driver, providing max core frequency information to the scheduler. Intel PMC APL support, s0ix read API, and fixes. - New Silead touchscreen platform touchscreen descriptions. Additional hotkey support for the intel-hid driver. - New model support for dell-laptop and hp_accel. - Several cleanups, especially to the fujitsu-laptop and intel_mid_powerbtn drivers. Detail summary: platorm/x86: - silead depends on I2C being built-in - add support for devices with Silead touchscreens - Support Turbo Boost Max 3.0 for non HWP systems intel_turbo_max_3: - make it explicitly non-modular dell-laptop: - Add Latitude 7480 and others to the DMI whitelist intel-hid: - Support 5 button array thinkpad_acpi: - Call led_classdev_notify_brightness_hw_changed on kbd brightness change - Use brightness_set_blocking callback for LEDs - Stop setting led_classdev brightness directly acer-wmi: - add another KEY_WLAN keycode - Inform firmware that RF Button Driver is active - setup accelerometer when machine has appropriate notify event asus-wireless: - Fix indentation - Use per-HID HSWC parameters intel_pmc_ipc: - Add APL PMC PCI Id - read s0ix residency API - Remove unused iTCO_version variable alienware-wmi: - Remove header duplicate intel_pmc_core: - fix out-of-bounds accesses on stack intel_mid_powerbtn: - Use SCU IPC directly - Unify IRQ acknowledgment - Move comment to where it belongs - Unify PBSTATUS access - Remove snail address - Sort headers alphabetically - Join string literals - Enable driver for Merrifield - Acknowledge interrupts - Factor out mfld_ack() - Introduce driver data - Substitute mfld by mid - Convert to use devm_*() fujitsu-laptop: - make hotkey handling functions more similar - break up complex loop condition - move keycode processing to separate functions - decrease indentation in acpi_fujitsu_hotkey_notify() - simplify logolamp_get() - rework logolamp_set() to properly handle errors - set default trigger for radio LED to rfkill-any dell-smbios: - Auto-select as needed intel_mid_thermal: - Fix module autoload - Remove duplicated platform device ID mlx-platform: - mlxcpld-hotplug driver style fixes hp_accel: - Add support for HP ZBook 17" * tag 'platform-drivers-x86-v4.11-1' of git://git.infradead.org/linux-platform-drivers-x86: (45 commits) platform/x86: intel_turbo_max_3: make it explicitly non-modular platform/x86: dell-laptop: Add Latitude 7480 and others to the DMI whitelist platform/x86: intel-hid: Support 5 button array platform/x86: thinkpad_acpi: Call led_classdev_notify_brightness_hw_changed on kbd brightness change platform/x86: thinkpad_acpi: Use brightness_set_blocking callback for LEDs platform/x86: thinkpad_acpi: Stop setting led_classdev brightness directly leds: class: Add new optional brightness_hw_changed attribute platform/x86: acer-wmi: add another KEY_WLAN keycode platform/x86: acer-wmi: Inform firmware that RF Button Driver is active platform/x86: asus-wireless: Fix indentation platform/x86: asus-wireless: Use per-HID HSWC parameters platform/x86: intel_pmc_ipc: Add APL PMC PCI Id platform/x86: intel_pmc_ipc: read s0ix residency API platform/x86: alienware-wmi: Remove header duplicate platform/x86: intel_mid_powerbtn: Use SCU IPC directly platform/x86: intel_mid_powerbtn: Unify IRQ acknowledgment platform/x86: intel_mid_powerbtn: Move comment to where it belongs platform/x86: intel_mid_powerbtn: Unify PBSTATUS access platform/x86: intel_pmc_core: fix out-of-bounds accesses on stack platform/x86: silead depends on I2C being built-in ...
2017-02-25Merge tag 'clk-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "The usual collection of new drivers, non-critical fixes, and updates to existing clk drivers. The bulk of the work is on Allwinner and Rockchip SoCs, but there's also an Intel Atom driver in here too. New Drivers: - Tegra BPMP firmware - Hisilicon hi3660 SoCs - Rockchip rk3328 SoCs - Intel Atom PMC - STM32F746 - IDT VersaClock 5P49V5923 and 5P49V5933 - Marvell mv98dx3236 SoCs - Allwinner V3s SoCs Removed Drivers: - Samsung Exynos4415 SoCs Updates: - Migrate ABx500 to OF - Qualcomm IPQ4019 CPU clks and general PLL support - Qualcomm MSM8974 RPM - Rockchip non-critical fixes and clk id additions - Samsung Exynos4412 CPUs - Socionext UniPhier NAND and eMMC support - ZTE zx296718 i2s and other audio clks - Renesas CAN and MSIOF clks for R-Car M3-W - Renesas resets for R-Car Gen2 and Gen3 and RZ/G1 - TI CDCE913, CDCE937, and CDCE949 clk generators - Marvell Armada ap806 CPU frequencies - STM32F4* I2S/SAI support - Broadcom BCM2835 DSI support - Allwinner sun5i and A80 conversion to new style clk bindings" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (130 commits) clk: renesas: mstp: ensure register writes complete clk: qcom: Do not drop device node twice clk: mvebu: adjust clock handling for the CP110 system controller clk: mvebu: Expand mv98dx3236-core-clock support clk: zte: add i2s clocks for zx296718 clk: sunxi-ng: sun9i-a80: Fix wrong pointer passed to PTR_ERR() clk: sunxi-ng: select SUNXI_CCU_MULT for sun5i clk: sunxi-ng: Check kzalloc() for errors and cleanup error path clk: tegra: Add BPMP clock driver clk: uniphier: add eMMC clock for LD11 and LD20 SoCs clk: uniphier: add NAND clock for all UniPhier SoCs ARM: dts: sun9i: Switch to new clock bindings clk: sunxi-ng: Add A80 Display Engine CCU clk: sunxi-ng: Add A80 USB CCU clk: sunxi-ng: Add A80 CCU clk: sunxi-ng: Support separately grouped PLL lock status register clk: sunxi-ng: mux: Get closest parent rate possible with CLK_SET_RATE_PARENT clk: sunxi-ng: mux: honor CLK_SET_RATE_NO_REPARENT flag clk: sunxi-ng: mux: Fix determine_rate for mux clocks with pre-dividers clk: qcom: SDHCI enablement on Nexus 5X / 6P ...
2017-02-14platform/x86: add support for devices with Silead touchscreensHans de Goede
On ACPI based tablets, the ACPI touchscreen node only contains info on the gpio and the irq, and is missing any info on the axis. This info is expected to be built into the tablet model specific version of the driver shipped with the os-image for the device. Add support for getting the missing info from a table built into the driver, using dmi data to identify which entry of the table to use and add info for the CUBE iwork8 Air and Jumper EZpad mini3 tablets on which this code was tested / developed. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=187531 Signed-off-by: Hans de Goede <hdegoede@redhat.com> [dmitry.torokhov@gmail.com: Move to platform/x86] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> [andy: fixed merge conflict] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-02-04platform/x86: Support Turbo Boost Max 3.0 for non HWP systemsSrinivas Pandruvada
On platforms supporting Intel Turbo Boost Max Technology 3.0, the maximum turbo frequencies (turbo ratio) of some cores in a CPU package may be higher than the other cores in the same package. In that case, better performance can be achieved by making the scheduler prefer to run tasks on the CPUs with higher max turbo frequencies. On Intel® Broadwell Xeon systems, it is optional to turn on HWP (Hardware P-States). When HWP is not turned on, the BIOS doesn't present required CPPC (Collaborative Processor Performance Control) tables. This table is used to get the per CPU core maximum performance ratio and inform scheduler (in cpufreq/intel_pstate driver). On such systems the maximum performance ratio can be read via over clocking (OC) mailbox interface for each CPU. This interface is not architectural and can change for every model of processors. This driver reads maximum performance ratio of each CPU and set up the scheduler priority metrics. In this way scheduler can prefer CPU with higher performance to schedule tasks. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2017-01-26arch/x86/platform/atom: Move pmc_atom to drivers/platform/x86Irina Tirdea
The pmc_atom driver does not contain any architecture specific code. It only enables the SoC Power Management Controller driver for BayTrail and CherryTrail platforms. Move the pmc_atom driver from arch/x86/platform/atom to drivers/platform/x86. Also clean-up and reorder include files by alphabetical order in pmc_atom.h Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-01-14x86/platform/intel: Remove PMIC GPIO block supportAndy Shevchenko
Moorestown support was removed by commit: 1a8359e411eb ("x86/mid: Remove Intel Moorestown") Remove this leftover. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Darren Hart <dvhart@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: platform-driver-x86@vger.kernel.org Link: http://lkml.kernel.org/r/20170112112331.93236-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-12-18platform/x86: Add Whiskey Cove PMIC TMU supportNilesh Bacchewar
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-16platform/x86: Introduce button support for the Surface 3Benjamin Tissoires
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-16platform/x86: Add custom surface3 platform device for controlling LIDBenjamin Tissoires
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-16platform/x86: mlx-platform: Move module from arch/x86Vadim Pasternak
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-10-23platform/x86: Introduce support for Mellanox hotplug driverVadim Pasternak
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-07-22intel-vbtn: new driver for Intel Virtual ButtonAceLan Kao
This driver supports power button event in Intel Virtual Button currently. New Dell XPS 13 requires this driver for the power button. This driver is copied/modified from intel-hid.c Most credit goes to the author of intel-hid.c, Alex Hung <alex.hung@canonical.com> Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-05-27platform/x86: Add PMC Driver for Intel Core SoCRajneesh Bhardwaj
This patch adds the Power Management Controller driver as a PCI driver for Intel Core SoC architecture. This driver can utilize debugging capabilities and supported features as exposed by the Power Management Controller. Please refer to the below specification for more details on PMC features. http://www.intel.in/content/www/in/en/chipsets/100-series-chipset-datasheet-vol-2.html The current version of this driver exposes SLP_S0_RESIDENCY counter. This counter can be used for detecting fragile SLP_S0 signal related failures and take corrective actions when PCH SLP_S0 signal is not asserted after kernel freeze as part of suspend to idle flow (echo freeze > /sys/power/state). Intel Platform Controller Hub (PCH) asserts SLP_S0 signal when it detects favorable conditions to enter its low power mode. As a pre-requisite the SoC should be in deepest possible Package C-State and devices should be in low power mode. For example, on Skylake SoC the deepest Package C-State is Package C10 or PC10. Suspend to idle flow generally leads to PC10 state but PC10 state may not be sufficient for realizing the platform wide power potential which SLP_S0 signal assertion can provide. SLP_S0 signal is often connected to the Embedded Controller (EC) and the Power Management IC (PMIC) for other platform power management related optimizations. In general, SLP_S0 assertion == PC10 + PCH low power mode + ModPhy Lanes power gated + PLL Idle. As part of this driver, a mechanism to read the SLP_S0_RESIDENCY is exposed as an API and also debugfs features are added to indicate SLP_S0 signal assertion residency in microseconds. echo freeze > /sys/power/state wake the system cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Vishwanath Somayaji <vishwanath.somayaji@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-03-23dell-laptop: extract SMBIOS-related code to a separate moduleMichał Kępień
Extract SMBIOS-related code from dell-laptop to a new kernel module, dell-smbios. The static specifier is removed from exported symbols, otherwise code is just moved around. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> [dvhart: Include linux/io.h in dell-smbios.c as caught by lkp] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-01-19platform:x86: Add Intel Telemetry Debugfs interfacesSouvik Kumar Chakravarty
This implements debugfs interfaces for reading the telemetry samples from SSRAM and configuring firmware trace verbosity. Interface created under /sys/kernel/debug/telemetry soc_states: SoC Device and Low Power States pss_info: Info from the Primary SubSystem ioss_info: Info from IO SubSusytem pss_trace_verbosity: Read/Modify PSS F/W trace verbosity ioss_trace_verbosity: Read/Modify IOSS F/W trace verbosity. Signed-off-by: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>