summaryrefslogtreecommitdiff
path: root/drivers/platform
AgeCommit message (Collapse)Author
2017-10-31platform/x86: ideapad-laptop: Add Lenovo Yoga 920-13IKB to no_hw_rfkill dmi listPhilipp Hug
The Lenovo Yoga 920-13IKB does not have a hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always report as blocked. This commit adds the Lenovo Yoga 920-13IKB to the no_hw_rfkill dmi list, fixing the WiFI breakage. Signed-off-by: Philipp Hug <philipp@hug.cx> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-10-31treewide: Fix function prototypes for module_param_call()Kees Cook
Several function prototypes for the set/get functions defined by module_param_call() have a slightly wrong argument types. This fixes those in an effort to clean up the calls when running under type-enforced compiler instrumentation for CFI. This is the result of running the following semantic patch: @match_module_param_call_function@ declarer name module_param_call; identifier _name, _set_func, _get_func; expression _arg, _mode; @@ module_param_call(_name, _set_func, _get_func, _arg, _mode); @fix_set_prototype depends on match_module_param_call_function@ identifier match_module_param_call_function._set_func; identifier _val, _param; type _val_type, _param_type; @@ int _set_func( -_val_type _val +const char * _val , -_param_type _param +const struct kernel_param * _param ) { ... } @fix_get_prototype depends on match_module_param_call_function@ identifier match_module_param_call_function._get_func; identifier _val, _param; type _val_type, _param_type; @@ int _get_func( -_val_type _val +char * _val , -_param_type _param +const struct kernel_param * _param ) { ... } Two additional by-hand changes are included for places where the above Coccinelle script didn't notice them: drivers/platform/x86/thinkpad_acpi.c fs/lockd/svc.c Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jessica Yu <jeyu@kernel.org>
2017-10-30platform/x86: fujitsu-laptop: Fix radio LED detectionMichał Kępień
Radio LED detection method implemented in commit 4f62568c1fcf ("fujitsu-laptop: Support radio LED") turned out to be incorrect as it causes a radio LED to be erroneously detected on a Fujitsu Lifebook E751 which has a slide switch (and thus no radio LED). Use bit 17 of flags_supported (the value returned by method S000 of ACPI device FUJ02E3) to determine whether a radio LED is present as it seems to be a more reliable indicator, based on comparing DSDT tables of four Fujitsu Lifebook models (E744, E751, S7110, S8420). Fixes: 4f62568c1fcf ("fujitsu-laptop: Support radio LED") Reported-by: Heinrich Siebmanns <harv@gmx.de> Signed-off-by: Michał Kępień <kernel@kempniu.pl> Tested-by: Heinrich Siebmanns <harv@gmx.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-27platform/x86: hp_accel: Add quirk for HP ProBook 440 G4Osama Khan
Added support for HP ProBook 440 G4 laptops by including the accelerometer orientation quirk for that device. Testing was performed based on the axis orientation guidelines here: https://www.kernel.org/doc/Documentation/misc-devices/lis3lv02d which states "If the left side is elevated, X increases (becomes positive)". When tested, on lifting the left edge, x values became increasingly negative thus indicating an inverted x-axis on the installed lis3lv02d chip. This was compensated by adding an entry for this device in hp_accel.c specifying the quirk as x_inverted. The patch was tested on a ProBook 440 G4 device and x-axis as well as y and z-axis values are now generated as per spec. Signed-off-by: Osama Khan <osama.khan@ericsson.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-27platform/x86: intel_turbo_max_3: Add Skylake platformSrinivas Pandruvada
Ev Kontsevoy reported that he can't see the presence of "/proc/sys/kernel/sched_itmt_enabled" on i9-7900x with Asrock x299 Taichi system even if he enabled "Turbo 3.0" in the BIOS. The problem is that even if one core max is 200MHz more than others, the current implementation couldn't enumerate that with the way the system is configured. The system by default configured for legacy mode (no HWP or speed shift technology), in this mode only way we can enumerate via the mail box interface as implemented in this driver. We were planing to only use this driver for Broadwell, but we need to extend this because some Skylake system has same issue as Braodwell systems. On this system BIOS allows to change to HWP mode, where we expect that we can enumerate favored core with ACPI-CPPC. But on this system the core priority is 0xff for all cores in CPPC object. So this is not an option. Hence this change allows Skylake systems to be enumerate favored core similar to Broadwell in legacy mode. Reported-and-tested-by: Ev Kontsevoy <ev@kontsevoy.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-27platform/x86: intel_telemetry: Remove useless default in KconfigAndy Shevchenko
'default n' is a default behaviour of Kconfig options. So, remove explicit line from Kconfig. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-27platform/x86: intel_telemetry: Add needed inclusionAndy Shevchenko
linux/io.h defines readq() and ioremap_nocache() / iounmap() functions. If not included, the build fails: intel_telemetry_pltdrv.c:1165:31: warning: assignment makes pointer from integer without a cast [-Wint-conversion] intel_telemetry_pltdrv.c:1165:33: error: implicit declaration of function 'ioremap_nocache' [-Werror=implicit-function-declaration] intel_telemetry_pltdrv.c:1202:3: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration] intel_telemetry_pltdrv.c:900:20: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration] Fix this by including linux/io.h. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-23platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updatesKuppuswamy Sathyanarayanan
Currently, update_no_reboot_bit() function implemented in this driver uses mutex_lock() to protect its register updates. But this function is called with in atomic context in iTCO_wdt_start() and iTCO_wdt_stop() functions in iTCO_wdt.c driver, which in turn causes "sleeping into atomic context" issue. This patch fixes this issue by replacing the mutex_lock() with spin_lock() to protect the GCR read/write/update APIs. Fixes: 9d855d4 ("platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure") Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kupuswamy@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-23platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updatesKuppuswamy Sathyanarayanan
Currently, update_no_reboot_bit() function implemented in this driver uses mutex_lock() to protect its register updates. But this function is called with in atomic context in iTCO_wdt_start() and iTCO_wdt_stop() functions in iTCO_wdt.c driver, which in turn causes "sleeping into atomic context" issue. This patch fixes this issue by replacing the mutex_lock() with spin_lock() to protect the GCR read/write/update APIs. Fixes: 9d855d4 ("platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure") Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kupuswamy@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-23platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe functionKuppuswamy Sathyanarayanan
This patch cleans up unnecessary free/alloc calls in ipc_plat_probe(), ipc_pci_probe() and ipc_plat_get_res() functions by using devm_* calls. This patch also adds proper error handling for failure cases in ipc_pci_probe() function. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> [andy: fixed style issues, missed devm_free_irq(), removed unnecessary log message] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-23platform/x86: intel_telemetry: cleanup redundant headersRajneesh Bhardwaj
Removes unnecessary header files included in the driver and sorts the remaining ones in the alphabetical order. Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-23platform/x86: intel_telemetry: Fix typosRajneesh Bhardwaj
Telemetry word is misspelled several times in this file as Telemtry. This fixes the spelling mistake and folds in another minor typo. Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-23platform/x86: intel_telemetry: Fix load failure infoRajneesh Bhardwaj
Intel Telemetry driver depends on IPC1 interface. If IPC1 interface is disabled on a given platform by the system firmware, the driver does not load but prints misleading information in the dmesg logs. Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-23platform/x86: intel_cht_int33fe: make a couple of local functions staticColin Ian King
The functions cht_int33fe_check_for_max17047 and cht_int33fe_find_max17047 are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'cht_int33fe_check_for_max17047' was not declared. Should it be static? symbol 'cht_int33fe_find_max17047' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-16platform/x86: mlx-platform: make a couple of structures staticColin Ian King
The structures mlxplat_dev and mlxplat_hotplug are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'mlxplat_dev' was not declared. Should it be static? symbol 'mlxplat_hotplug' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-10-16platform/x86: silead_dmi: Add entry for the Chuwi Hi8 Pro tabletHans de Goede
Add touchscreen platform data for the Chuwi Hi8 Pro tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-10-12treewide: Fix typos in KconfigMasanari Iida
This patch fixes some spelling typos found in Kconfig files. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-10-09Merge 4.14-rc4 into staging-nextGreg Kroah-Hartman
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08platform/x86: intel_ips: Remove FSF address from GPL noticeAndy Shevchenko
This patch removes the FSF address from the GPL notice to fix a checkpatch.pl CHECK message. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08platform/x86: intel_ips: Remove unneeded fields and labelAndy Shevchenko
There are fields in the struct ips_mcp_limits which are not used anywhere and a label which we may get rid of. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08platform/x86: intel_ips: Keep pointer to struct deviceAndy Shevchenko
...instead of keeping pointer to struct pci_dev. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08platform/x86: intel_ips: Use PCI_VDEVICE() macroAndy Shevchenko
Intel vendor ID is defined globally, thus we may use PCI_VDEVICE(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08platform/x86: intel_ips: Switch to new PCI IRQ allocation APIAndy Shevchenko
This makes code cleaner. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08platform/x86: intel_ips: Simplify error handling via devres APIAndy Shevchenko
Use devm_ and pcim_ functions to make error handling simpler and code smaller and tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08platform/x86: peaq-wmi: Add DMI check before binding to the WMI interfaceHans de Goede
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not as unique as a GUID should be and is used on some other devices too. This is causing spurious key-press reports on these other devices. This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to ensure that it is actually running on a PEAQ 2-in-1, fixing the spurious key-presses on these other devices. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1497861 BugLink: https://bugzilla.suse.com/attachment.cgi?id=743182 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-08platform/x86: peaq-wmi: Revert Blacklist Lenovo ideapad 700-15ISKAndy Shevchenko
In favour of new approach this reverts commit ff74972e966bfc586cea116f976866858d1b0fec. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-04platform/x86: peaq-wmi: Blacklist Lenovo ideapad 700-15ISKKai Heng Feng
peaq-wmi on Lenovo ideapad 700-15ISK keeps sending KEY_SOUND, which makes user's repeated keys gets interrupted. The system does not have Dolby button, let's blacklist it. BugLink: https://bugs.launchpad.net/bugs/1720219 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-01platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe functionKuppuswamy Sathyanarayanan
This patch cleans up unnecessary free/alloc calls in ipc_plat_probe(), ipc_pci_probe() and ipc_plat_get_res() functions by using devm_* calls. This patch also adds proper error handling for failure cases in ipc_pci_probe() function. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> [andy: fixed style issues, missed devm_free_irq(), removed unnecessary log message] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-01platform/x86: thinkpad_acpi: Implement tablet mode using GMMS methodBenjamin Berg
Many thinkpad laptops and convertibles provide the GMMS method to resolve how far the laptop has been opened and whether it has been converted into tablet mode. This allows reporting a more precise tablet mode state to userspace. The current implementation only reports a summarized tablet mode state which is triggered as soon as the input devices become unusable as they are folded away from the display. This will work on all models where the CMMD method was used previously and it may also work in other cases. Thanks to Peter Zhang of Lenovo for providing information on how to use the GMMS method to query the tablet mode. Signed-off-by: Benjamin Berg <bberg@redhat.com> Cc: Peter FP1 Zhang <zhangfp1@lenovo.com> Cc: Lyude Paul <lyude@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-09-29platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presntVille Syrjälä
My Fujitsu-Siemens Lifebook S6120 doesn't have the FUJ02E3 device, but it does have FUJ02B1. That means we do register the backlight device (and it even seems to work), but the code will oops as soon as we try to set the backlight brightness because it's trying to call call_fext_func() with a NULL device. Let's just skip those function calls when the FUJ02E3 device is not present. Cc: Jonathan Woithe <jwoithe@just42.net> Cc: Andy Shevchenko <andy@infradead.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: <stable@vger.kernel.org> # 4.13.x Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: wmi: Destroy on cleanup rather than unregisterMario Limonciello
device_create documentation says to cleanup using device_destroy Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: wmi: Cleanup exit routine in reverse order of initMario Limonciello
The initialize routine is: * class -> bus -> platform The exit routine is: * platform -> class -> bus Fix the exit routine to be: * platform -> bus -> class Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: wmi: Sort include listMario Limonciello
The include list is randomly assembled right now. Sort in alphabetical order. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: dell-smbios: Add pr_fmt definition to driverMario Limonciello
pr_fmt provides formatting to be used by the driver when displaying errors and messages. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Reviewed-by: Pali Pohar <pali.rohar@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: dell-wmi: Do not match on descriptor GUID modaliasMario Limonciello
The descriptor GUID is not used to indicate that WMI notifications in the dell-wmi driver work properly. As such a modalias should not be present that causes this driver to load on systems with this GUID. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Reviewed-by: Pali Pohar <pali.rohar@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: dell-wmi: Label driver as handling notificationsMario Limonciello
This driver serves the purpose of responding to WMI based notifications from the DELL_EVENT_GUID (9DBB5994-A997-11DA-B012-B622A1EF5492). Other GUIDs will be handled by separate drivers. Update the language used by this driver to avoid future confusion. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: asus-wmi: Add lightbar led supportMaxime Bellengé
Some Asus laptops (ROG series for example) are provided with a lightbar behind the monitor. This patch make possible to switch it on and off. This lightbar works exactly like any other led. Signed-off-by: Maxime Bellengé <maxime.bellenge@gmail.com> [dvhart: fix commit message format and variable declaration order] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-27platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presntVille Syrjälä
My Fujitsu-Siemens Lifebook S6120 doesn't have the FUJ02E3 device, but it does have FUJ02B1. That means we do register the backlight device (and it even seems to work), but the code will oops as soon as we try to set the backlight brightness because it's trying to call call_fext_func() with a NULL device. Let's just skip those function calls when the FUJ02E3 device is not present. Cc: Jonathan Woithe <jwoithe@just42.net> Cc: Andy Shevchenko <andy@infradead.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: <stable@vger.kernel.org> # 4.13.x Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-25Merge tag 'iio-for-4.15a' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Round one of new device support, features and cleanup for IIO in the 4.15 cycle. Note there is a misc driver drop in here given we have support in IIO and the feeling is no one will care. A large part of this series is a boiler plate removal series avoiding the need to explicitly provide THIS_MODULE in various locations. It's very dull but touches all drivers. New device support * ad5446 - add ids to support compatible parts DAC081S101, DAC101S101, DAC121S101. - add the dac7512 id and drop the misc driver as feeling is no one is using it (was introduced for a board that is long obsolete) * mt6577 - add bindings for mt2712 which is fully compatible with other supported parts. * st_pressure - add support for LPS33HW and LPS35HW with bindings (ids mostly). New features * ccs811 - Add support for the data ready trigger. * mma8452 - remove artifical restriction on supporting multiple event types at the same time. * tcs3472 - support out of threshold events Core and tree wide cleanup * Use macro magic to remove the need to provide THIS_MODULE as part of struct iio_info or struct iio_trigger_ops. This is similar to work done in a number of other subsystems (e.g. i2c, spi). All drivers are fixed and then the fields in these structures are removed. This will cause build failures for out of tree drivers and any new drivers that cross with this work going into the kernel. Note mostly done with a coccinelle patch, included in the series on the mailing list but not merged as the fields no longer exist in the structures so the any hold outs will cause a build failure. Cleanups * ads1015 - avoid writing config register when it doesn't change. - add 10% to conversion wait time as it seems it is sometimes a little small. * ade7753 - replace use of core mlock with a local lock. This is part of a long term effort to make the use of mlock opaque and single purpose. * ade7759 - expand the use of buf_lock to cover previous mlock cases. This is a slightly nicer solution to the same issue as in ade7753. * cros_ec - drop an unused variable * inv_mpu6050 - add a missing break in a switch for consistency - not actual bug, - make some local arrays static to save on object code size. * max5481 - drop manual setting of the spi module owner as handled by the spi core. * max5487 - drop manual setting of the spi module owner as handled by the spi core. * max9611 - drop explicit setting of the i2c module owner as handled by the i2c core. * mcp320x - speed up reads on single channel devices, - drop unused of_device_id data elements, - document the struct mcp320x, - improve binding docs to reflect restrictions on spi setup and to make it explicit that the reference regulator is needed. * mma8452 - symbolic to octal permissions, - unsigned to unsigned int. * st_lsm6dsx - avoid setting odr values multiple times, - drop config of LIR as it is only ever set to the existing defaults, - drop rounding configuration as it only ever matches the defaults. * ti-ads8688 - drop manual setting of the spi module owner as handled by the spi core. * tsl2x7x - constify the i2c_device_id, - cleanup limit checks to avoid static checker warnings (and generally have nicer code).
2017-09-22platform/x86: intel-hid: Power button suspend on Dell Latitude 7275Jérôme de Bretagne
On Dell Latitude 7275 the 5-button array is not exposed in the ACPI tables, but notififies are still sent to the Intel HID device object (device ID INT33D5) in response to power button actions. They were ignored as the intel-hid driver was not prepared to take care of them until recently. Power button wakeup from suspend-to-idle was added in: commit 635173a17b03 ("intel-hid: Wake up Dell Latitude 7275 from suspend-to-idle") However power button suspend doesn't work yet on this platform so it would be good to add it also. On the affected platform (for which priv->array is NULL), add a new upfront check against the power button press notification (0xCE) to notify_handler(), outside the wakeup mode this time, which allows reporting the power button press event and triggers the suspend. Also catch and ignore the corresponding power button release notification (0xCF) to stop it from being reported as an "unknown event" in the logs. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196115 Tested-by: Jérôme de Bretagne <jerome.debretagne@gmail.com> Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com> Acked-By: Mario Limonciello <mario.limonciello@dell.com> [dvhart: minor coding style and commit message format fix] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-22platform/x86: intel-wmi-thunderbolt: Silence error casesMario Limonciello
These were raised by Lukas Wunner as potential DOS attacks against the system log by passing bad data to sysfs. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-22platform/x86: intel_telemetry_debugfs: Use standard ARRAY_SIZE() macroAllen Pais
Use the standard ARRAY_SIZE() macro instead of the custom TELEM_EVT_LEN(). Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-20platform/x86: intel_cht_int33fe: Work around BIOS bug on some devicesHans de Goede
At least one BIOS enumerates the max17047 both through the INT33FE ACPI device (it is right there in the resources table) as well as through a separate MAX17047 device. This commit checks for the max17047 already being enumerated through a separate MAX17047 ACPI device and if so it uses the i2c-client instantiated for this and attaches the device-props for the max17047 to that i2c-client. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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-09-14dmi: Mark all struct dmi_system_id instances constChristoph Hellwig
... and __initconst if applicable. Based on similar work for an older kernel in the Grsecurity patch. [JD: fix toshiba-wmi build] [JD: add htcpen] [JD: move __initconst where checkscript wants it] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2017-09-08Merge tag 'platform-drivers-x86-v4.14-1' of ↵Linus Torvalds
git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Several fixes from static analysis and message noise reduction. Correct WMI core and related drivers to evaluate instance number 0x0 in accordance with the documentation. Add intel-telemetry support for Gemini Lake. Various individual driver fixes noted below. dell-wmi: - Update dell_wmi_check_descriptor_buffer() to new model intel-vbtn: - reduce unnecessary messages for normal users - match power button on press rather than release intel-hid: - reduce unnecessary messages for normal users thinkpad_acpi: - Fix warning about deprecated hwmon_device_register wmi: - Fix check for method instance number ideapad-laptop: - Expose conservation mode switch intel_pmc_core: - Make the driver PCH family agnostic peaq-wmi: - Evaluate wmi method with instance number 0x0 - silence a static checker warning mxm-wmi: - Evaluate wmi method with instance number 0x0 asus-wmi: - Evaluate wmi method with instance number 0x0 intel_scu_ipc: - make intel_scu_ipc_pdata_t const intel_mid_powerbtn: - make mid_pb_ddata const - fix error return code in mid_pb_probe() hp-wmi: - Remove unused macro helper - Correctly determine method id in WMI calls dell-wmi: - Fix driver interface version query intel_telemetry: - remove redundant macro definition - Add GLK PSS Event Table alienware-wmi: - fix format string overflow warning ibm_rtl: - remove unnecessary static in ibm_rtl_write() msi-wmi: - remove unnecessary static in msi_wmi_notify()" * tag 'platform-drivers-x86-v4.14-1' of git://git.infradead.org/linux-platform-drivers-x86: (23 commits) platform/x86: dell-wmi: Update dell_wmi_check_descriptor_buffer() to new model platform/x86: intel-vbtn: reduce unnecessary messages for normal users platform/x86: intel-hid: reduce unnecessary messages for normal users platform/x86: thinkpad_acpi: Fix warning about deprecated hwmon_device_register platform/x86: wmi: Fix check for method instance number platform/x86: ideapad-laptop: Expose conservation mode switch platform/x86: intel_pmc_core: Make the driver PCH family agnostic platform/x86: peaq-wmi: Evaluate wmi method with instance number 0x0 platform/x86: mxm-wmi: Evaluate wmi method with instance number 0x0 platform/x86: asus-wmi: Evaluate wmi method with instance number 0x0 platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const platform/x86: intel_mid_powerbtn: make mid_pb_ddata const platform/x86: intel_mid_powerbtn: fix error return code in mid_pb_probe() platform/x86: hp-wmi: Remove unused macro helper platform/x86: hp-wmi: Correctly determine method id in WMI calls platform/x86: intel-vbtn: match power button on press rather than release platform/x86: dell-wmi: Fix driver interface version query platform/x86: intel_telemetry: remove redundant macro definition platform/x86: intel_telemetry: Add GLK PSS Event Table platform/x86: alienware-wmi: fix format string overflow warning ...
2017-09-04Merge branch 'pm-sleep'Rafael J. Wysocki
* pm-sleep: ACPI / PM: Check low power idle constraints for debug only PM / s2idle: Rename platform operations structure PM / s2idle: Rename ->enter_freeze to ->enter_s2idle PM / s2idle: Rename freeze_state enum and related items PM / s2idle: Rename PM_SUSPEND_FREEZE to PM_SUSPEND_TO_IDLE ACPI / PM: Prefer suspend-to-idle over S3 on some systems platform/x86: intel-hid: Wake up Dell Latitude 7275 from suspend-to-idle PM / suspend: Define pr_fmt() in suspend.c PM / suspend: Use mem_sleep_labels[] strings in messages PM / sleep: Put pm_test under CONFIG_PM_SLEEP_DEBUG PM / sleep: Check pm_wakeup_pending() in __device_suspend_noirq() PM / core: Add error argument to dpm_show_time() PM / core: Split dpm_suspend_noirq() and dpm_resume_noirq() PM / s2idle: Rearrange the main suspend-to-idle loop PM / timekeeping: Print debug messages when requested PM / sleep: Mark suspend/hibernation start and finish PM / sleep: Do not print debug messages by default PM / suspend: Export pm_suspend_target_state
2017-08-22platform/x86: toshiba_acpi: drop assignment of iio_info.driver_moduleJonathan Cameron
This is now handled by use of a macro for device registration. The field in iio_info will be going away shortly as it is no longer used. Cc: <platform-driver-x86@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Azael Avalos <coproscefalo@gmail.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
2017-08-18platform/x86: dell-wmi: Update dell_wmi_check_descriptor_buffer() to new modelAndy Lutomirski
This converts dell_wmi_check_descriptor_buffer() to the new driver model interface and puts the interface version in dell_wmi_priv where it belongs. Signed-off-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-08-18platform/x86: intel-vbtn: reduce unnecessary messages for normal usersAlex Hung
Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages. Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>