summaryrefslogtreecommitdiff
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* platform/x86: fujitsu-laptop: rename FUNC_RFKILL to FUNC_FLAGSAlan Jenkins2017-02-261-25/+25
| | | | | | | | | | | | | | FUNC subfunction 0x1000 is currently referred to as FUNC_RFKILL, which is misleading, because it handles more than just radio devices (also lid, dock, LEDs). Rename the FUNC_RFKILL constant to FUNC_FLAGS. Replace "rfkill" with "flags" in the names of its associated fields inside struct fujitsu_laptop. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
* platform/x86: fujitsu-laptop: make platform-related variables match naming ↵Alan Jenkins2017-02-261-10/+10
| | | | | | | | | | | | | convention Replace "fujitsupf" with "fujitsu_pf" in all platform-related variable names to match the module-wide naming convention. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
* platform/x86: fujitsu-laptop: replace "hotkey" with "laptop" in symbol namesAlan Jenkins2017-02-261-79/+79
| | | | | | | | | | | | | | Functions, structures, variables and constants whose names currently contain the "hotkey" keyword are not only responsible for handling hotkeys, but also other laptop-related features (rfkill, lid, dock, LEDs). Fix their naming by using a consistent "_laptop"/"_LAPTOP" suffix/infix. Update comments so that they reflect this change. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
* platform/x86: fujitsu-laptop: clearly denote backlight-related symbolsAlan Jenkins2017-02-261-107/+107
| | | | | | | | | | | | Unify naming for all backlight-related functions, structures, variables and constants by using a consistent "_bl"/"_BL" suffix/infix. Adjust indentation to make checkpatch happy. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> [kempniu: rebase patch, rewrite commit message] Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
* platform/x86: intel_turbo_max_3: make it explicitly non-modularPaul Gortmaker2017-02-241-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: drivers/platform/x86/Kconfig:config INTEL_TURBO_MAX_3 drivers/platform/x86/Kconfig: bool "Intel Turbo Boost Max Technology 3.0 enumeration driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. We do uncover some implicit includes during build coverage that were hidden behind the module.h which pulls in a lot of dependants. Cc: Andy Shevchenko <andy@infradead.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: dell-laptop: Add Latitude 7480 and others to the DMI whitelistAlex Hung2017-02-241-0/+6
| | | | | | | | This is to support Latitude 7480 and many other newer Dell laptops. Signed-off-by: Alex Hung <alex.hung@canonical.com> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: intel-hid: Support 5 button arrayAlex Hung2017-02-241-5/+91
| | | | | | | | | | | | | New firmwares include a feature called 5 button array that supports super key, volume up/down, rotation lock and power button. Support for this feature is required to fix power button on some recent systems. This patch was tested on a Dell Latitude 7480. Signed-off-by: Alex Hung <alex.hung@canonical.com> Reviewed-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: thinkpad_acpi: Call led_classdev_notify_brightness_hw_changed ↵Hans de Goede2017-02-241-4/+38
| | | | | | | | | | | | | | | | on kbd brightness change Make thinkpad_acpi call led_classdev_notify_brightness_hw_changed on the kbd_led led_classdev registered by thinkpad_acpi when the kbd backlight brightness is changed through the hotkey. This will allow userspace to monitor (poll) for brightness changes on these LEDs caused by the hotkey. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Pavel Machek <pavel@ucw.cz>
* platform/x86: thinkpad_acpi: Use brightness_set_blocking callback for LEDsHans de Goede2017-02-241-64/+16
| | | | | | | | | | | | | | Now a days the LED core can take care of executing brightness_set from a workqueue if it needs to sleep, make use of this and remove a bunch of DIY code for this. Since this commit removes the workqueue usage for LEDs, the led_sysfs_blink_set callback may now also sleep, this is fine. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Pavel Machek <pavel@ucw.cz>
* platform/x86: thinkpad_acpi: Stop setting led_classdev brightness directlyHans de Goede2017-02-241-3/+1
| | | | | | | | | | | | | | | There is no need to set the led_classdev's brightness value from its set_brightness callback, this is taken care of by the led-core and thinkpad_acpi really should not be mucking with it. Note that kbdlight_set_level_and_update() is still used by the old thinpad_acpi specific sysfs interface for the led, so we cannot remove it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Pavel Machek <pavel@ucw.cz>
* platform/x86: acer-wmi: add another KEY_WLAN keycodeChris Chiu2017-02-241-0/+1
| | | | | | | | | | | | | | Now that we have informed the firmware that the RF Button driver is active, laptops such as the Acer TravelMate P238-M will generate a WMI key event with code 0x86 when the Fn+F3 airplane mode key is pressed. Add this keycode to the table so that it is converted to an appropriate input event. Signed-off-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: acer-wmi: Inform firmware that RF Button Driver is activeChris Chiu2017-02-241-16/+58
| | | | | | | | | | | | | | | | | The same method to activate LM(Launch Manager) can also be used to activate the RF Button driver with different bit toggled in the same lm_status. To express that many functions this byte field can achieve, rename the lm_status to app_status. And also the app_mask is the bit mask which specifically indicate which bits are going to be changed. This solves a problem where the AR9565 wifi included in the Acer Aspire ES1-421 is permanently hard blocked according to the rfkill GPIO read by ath9k. Signed-off-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Daniel Drake <drake@endlessm.com> Reviewed-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: asus-wireless: Fix indentationJoão Paulo Rechi Vita2017-02-241-2/+1
| | | | | | | | Fix indentation problem introduced when this driver was first merged into the kernel. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: asus-wireless: Use per-HID HSWC parametersJoão Paulo Rechi Vita2017-02-241-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Asus machines use 0x4/0x5 as their LED on/off values, while others use 0x0/0x1, as shown in the DSDT excerpts below. Luckily it seems this behavior is tied to different HIDs, after looking at 44 DSDTs from different Asus models. Another small difference is that a few of them call GWBL instead of OWGS, and SWBL instead of OWGD. That does not seem to make a difference for asus-wireless, and is additional reasoning to not try to call these methods directly. Device (ASHS) | Device (ASHS) { | { Name (_HID, "ATK4002") | Name (_HID, "ATK4001") Method (HSWC, 1, Serialized) | Method (HSWC, 1, Serialized) { | { If ((Arg0 < 0x02)) | If ((Arg0 < 0x02)) { | { OWGD (Arg0) | OWGD (Arg0) Return (One) | Return (One) } | } If ((Arg0 == 0x02)) | { | If ((Arg0 == 0x02)) Local0 = OWGS () | { If (Local0) | Return (OWGS ()) { | } Return (0x05) | } | If ((Arg0 == 0x03)) Else | { { | Return (0xFF) Return (0x04) | } } | } | If ((Arg0 == 0x80)) If ((Arg0 == 0x03)) | { { | Return (One) Return (0xFF) | } } | } If ((Arg0 == 0x04)) | Method (_STA, 0, NotSerialized) { | { OWGD (Zero) | If ((MSOS () >= OSW8)) Return (One) | { } | Return (0x0F) If ((Arg0 == 0x05)) | } { | Else OWGD (One) | { Return (One) | Return (Zero) } | } If ((Arg0 == 0x80)) | } { | } Return (One) | } | } | Method (_STA, 0, NotSerialized) | { | If ((MSOS () >= OSW8)) | { | Return (0x0F) | } | Else | { | Return (Zero) | } | } | } | Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Add APL PMC PCI IdRajneesh Bhardwaj2017-02-241-0/+1
| | | | | | | | | | | | | | This patch adds the PCI Device id for Power Management Controller on Intel Apollo Lake platforms. Intel PMC IPC Driver loads as a platform driver on Apollo Lake platforms since Intel BIOS hides the PCI Configuration space for 0:13:1 and re-enumerates it as ACPI device (INT34D2). The correct PCI Device ID should be added if some platform firmware choses to enumerate the device via PCI space. Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: read s0ix residency APIShanth Murthy2017-02-241-6/+58
| | | | | | | | | | | | | | | | | | | | | | | This patch adds a new API to indicate S0ix residency in usec. It utilizes the PMC Global Control Registers (GCR) to read deep and shallow S0ix residency. PMC MMIO resources: o Lower 4kB: IPC1 (PMC inter-processor communication) interface o Upper 4kB: GCR (Global Control Registers) This enables the power management framework to take corrective actions when the platform fails to enter S0ix after kernel freeze as part of the suspend to idle flow. (echo freeze > /sys/power/state). This is expected to be used with a S0ix failsafe framework such as: <https://lwn.net/Articles/689505/> [rajneesh: folded in "fix division in 32-bit case" from Andy Shevchenko] Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Shanth Murthy <shanth.murthy@intel.com> [andy: fixed kbuild error, removed "total" from variables, fixed macro] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: alienware-wmi: Remove header duplicateAndy Shevchenko2017-02-241-1/+0
| | | | | | No need to #include <linux/acpi.h> twice. Remove second occurrence. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Use SCU IPC directlyAndy Shevchenko2017-02-241-2/+2
| | | | | | | | | | On older Intel MID platforms is using SCU IPC library beneath MSIC calls. To make access unified between old and new platforms use SCU IPC library directly. It's safe since serialization is done in the library. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Unify IRQ acknowledgmentAndy Shevchenko2017-02-241-12/+7
| | | | | | | The IRQ on Intel Merrifield can be acknowledged in the similar way it's done for previous MID platforms. Unify acknowledgment via SCU IPC. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Move comment to where it belongsAndy Shevchenko2017-02-141-10/+10
| | | | | | | The comments is about initial interrupt acknowledgment only. So, move it back to where it belongs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Unify PBSTATUS accessAndy Shevchenko2017-02-141-28/+13
| | | | | | | | The status register on Intel Merrifield can be read in the similar way it's done for previous MID platforms. Unify access to PBSTATUS register via SCU IPC. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_core: fix out-of-bounds accesses on stackAndrey Ryabinin2017-02-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pmc_core_mtpmc_link_status() an pmc_core_check_read_lock_bit() use test_bit() on local 32-bit variable. This causes out-of-bounds access since test_bit() expects object at least of 'unsigned long' size: BUG: KASAN: stack-out-of-bounds in pmc_core_probe+0x3aa/0x3b0 Call Trace: __asan_report_load_n_noabort+0x5c/0x80 pmc_core_probe+0x3aa/0x3b0 local_pci_probe+0xf9/0x1e0 pci_device_probe+0x27b/0x350 driver_probe_device+0x419/0x830 __driver_attach+0x15f/0x1d0 bus_for_each_dev+0x129/0x1d0 driver_attach+0x42/0x70 bus_add_driver+0x385/0x690 driver_register+0x1a9/0x3d0 __pci_register_driver+0x1a2/0x290 intel_pmc_core_driver_init+0x19/0x1b do_one_initcall+0x12e/0x280 kernel_init_freeable+0x57c/0x623 kernel_init+0x13/0x140 ret_from_fork+0x2e/0x40 Fix this by open coding bit test. While at it, also refactor this code a little bit. Fixes: 173943b3dae5 ("platform/x86: intel_pmc_core: ModPhy core lanes pg status") Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> [andy: reverted not related changes, used BIT() macro] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: silead depends on I2C being built-inArnd Bergmann2017-02-141-1/+1
| | | | | | | | | | | | | | | The new driver cannot be a loadable module, so if I2C is loadable, we get this link error: drivers/platform/built-in.o: In function `silead_ts_dmi_init': silead_dmi.c:(.init.text+0x2ef): undefined reference to `i2c_bus_type' This makes the Kconfig dependency stricter to require I2C=y. Fixes: 9eeda3897a85 ("platform/x86: add support for devices with Silead touchscreens") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: add support for devices with Silead touchscreensHans de Goede2017-02-143-0/+148
| | | | | | | | | | | | | | | | | | | | 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>
* platform/x86: intel_mid_powerbtn: Remove snail addressAndy Shevchenko2017-02-041-5/+4
| | | | | | | | | | The snail address is subject to change. This already happened once. Remove the address completely from the file to avoid potential noise when update. While here, adjust copyright years and list authors. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Sort headers alphabeticallyAndy Shevchenko2017-02-041-4/+4
| | | | | | Sort header inclusion block in alphabetical order. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Join string literalsAndy Shevchenko2017-02-041-8/+9
| | | | | | | There is no need and bad practice for debugging to split string literals. Join them back. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Enable driver for MerrifieldAndy Shevchenko2017-02-041-0/+56
| | | | | | | Enable this driver to handle events from Basin Cove PMIC, which is installed on Intel Merrifield platform. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Acknowledge interruptsAndy Shevchenko2017-02-041-0/+1
| | | | | | | Some platforms require interrupt to be acknowledged by clearing MSIC_PWRBTNM bit in interrupt level 1 mask register. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Factor out mfld_ack()Andy Shevchenko2017-02-041-11/+18
| | | | | | | Move Intel Medfield specific code to another callback, which will be used later. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Introduce driver dataAndy Shevchenko2017-02-041-6/+56
| | | | | | | | | | This is preparatory patch to extend the driver in order to support other Intel MID platform. Here the new driver data structure is introduced with split of ->pbstat() callback. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Substitute mfld by midAndy Shevchenko2017-02-041-11/+11
| | | | | | | Replace all occurrences of mfld by mid to emphasize that driver is used for Intel MID platforms. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Convert to use devm_*()Andy Shevchenko2017-02-041-20/+9
| | | | | | | Convert driver to use managed resources. This eliminates error path boilerplate and makes code neat. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: Support Turbo Boost Max 3.0 for non HWP systemsSrinivas Pandruvada2017-02-043-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* platform/x86: fujitsu-laptop: make hotkey handling functions more similarMichał Kępień2017-02-041-5/+5
| | | | | | | | | | | | Make two minor tweaks to acpi_fujitsu_hotkey_press() to make it more similar to acpi_fujitsu_hotkey_release(): * call vdbg_printk() after reporting the input event, * return immediately when kfifo_in_locked() fails. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: fujitsu-laptop: break up complex loop conditionMichał Kępień2017-02-041-3/+5
| | | | | | | | | | | The loop condition in acpi_fujitsu_hotkey_release() includes an assignment, a four-argument function call and a comparison, making it hard to read. Separate the assignment from the comparison to improve readability. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: fujitsu-laptop: move keycode processing to separate functionsMichał Kępień2017-02-041-33/+43
| | | | | | | | | | | | | acpi_fujitsu_hotkey_notify() is pretty deeply nested, which hurts readability. Move the keycode processing part to two separate functions to make the code easier to understand and save a few line breaks. Rename variable keycode_r to keycode as there is no longer any need to differentiate between the two. Tweak indentations to make checkpatch happy. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: fujitsu-laptop: decrease indentation in ↵Michał Kępień2017-02-041-77/+75
| | | | | | | | | | | | acpi_fujitsu_hotkey_notify() acpi_fujitsu_hotkey_notify() is pretty deeply nested, which hurts readability. Strip off one level of indentation by returning early when the event code supplied as argument is not ACPI_FUJITSU_NOTIFY_CODE1. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: fujitsu-laptop: simplify logolamp_get()Michał Kępień2017-02-041-11/+11
| | | | | | | | | | | Now that call_fext_func() is invoked by logolamp_set() for both LOGOLAMP_POWERON and LOGOLAMP_ALWAYS for every brightness value, logolamp_get() can be simplified to decrease indentation and number of local variables. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: fujitsu-laptop: rework logolamp_set() to properly handle errorsMichał Kępień2017-02-041-9/+14
| | | | | | | | | | | | | Potential errors returned by some call_fext_func() calls inside logolamp_set() are currently ignored. Rework logolamp_set() to properly handle them. This causes one more call_fext_func() call to be made in the LED_OFF case, though one could argue that this is logically the right thing to do (even though the extra call is not needed to shut the LED off). Signed-off-by: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: dell-smbios: Auto-select as neededJean Delvare2017-02-031-6/+4
| | | | | | | | | | | | | | | | | | | Dell-smbios is a helper module, it serves no purpose on its own, so do not present it as an option to the user. Instead, select it automatically whenever a driver which needs it is selected. Also select DCDBAS as needed, instead of depending on it, so that the Dell driver options are always visible. As a clean-up, I removed the "default n" statements as they are not needed (n is the default default.) Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Michał Kępień <kernel@kempniu.pl> Cc: Pali Rohár <pali.rohar@gmail.com> Cc: Darren Hart <dvhart@infradead.org> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_pmc_ipc: Remove unused iTCO_version variableGuenter Roeck2017-02-031-2/+0
| | | | | | | | iTCO_version was there since the driver was introduced but never used. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_thermal: Fix module autoloadJavier Martinez Canillas2017-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias $ After this patch: $ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias alias: platform:msic_thermal Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_thermal: Remove duplicated platform device IDJavier Martinez Canillas2017-02-031-1/+0
| | | | | | | | | | | | | | Commit 3fca3d3d5075 ("platform-x86: intel_mid_thermal: add msic_thermal alias") added a "msic_thermal" entry to the driver's platform device ID table since that was the platform dev name registered in some platforms and the only dev in the platform table was "msic_sensor" (DRIVER_NAME). But then commit 634830704d80 ("x86/mid/thermal: Add msic_thermal alias") changed DRIVER_NAME from "msic_sensor" to "msic_thermal", and so there's now duplicated entries in the platform device ID table. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: mlx-platform: mlxcpld-hotplug driver style fixesVadim Pasternak2017-02-031-34/+50
| | | | | | | | | | | The patch contains several styling fixes: - Make names of hotplug devices shorter; - Change register offset assignment to defines; - Add defines for the all event masks; - Use PLATFORM_DEVID_NONE instead of -1; Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: hp_accel: Add support for HP ZBook 17Ladislav Michl2017-02-031-0/+1
| | | | | | | HP ZBook 17 laptop needs a non-standard mapping (xy_swap_yz_inverted). Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: acer-wmi: setup accelerometer when machine has appropriate ↵Lee, Chun-Yi2017-02-031-4/+18
| | | | | | | | | | | | | | | | | | | notify event The accelerometer event relies on the ACERWMID_EVENT_GUID notify. So, this patch changes the codes to setup accelerometer input device when detected ACERWMID_EVENT_GUID. It avoids that the accel input device created on every Acer machines. In addition, patch adds a clearly parsing logic of accelerometer hid to acer_wmi_get_handle_cb callback function. It is positive matching the "SENR" name with "BST0001" device to avoid non-supported hardware. Reported-by: Bjørn Mork <bjorn@mork.no> Cc: Darren Hart <dvhart@infradead.org> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> [andy: slightly massage commit message] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: fujitsu-laptop: set default trigger for radio LED to rfkill-anyMicha? K?pie?2017-02-031-0/+1
| | | | | | | | | | The "radio components indicator" LED present in Lifebook E734/E744/E754 should be lit when any radio transmitter is enabled, so set its default trigger to rfkill-any. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: ideapad-laptop: handle ACPI event 1Zach Ploskey2017-01-221-0/+1
| | | | | | | | | | | | | | | | | On Ideapad laptops, ACPI event 1 is currently not handled. Many models log "ideapad_laptop: Unknown event: 1" every 20 seconds or so while running on battery power. Some convertible laptops receive this event when switching in and out of tablet mode. This adds and additional case for event 1 in ideapad_acpi_notify to call ideapad_input_report(priv, vpc_bit), so that the event is reported to userspace and we avoid unnecessary logging. Fixes bug #107481 (https://bugzilla.kernel.org/show_bug.cgi?id=107481) Fixes bug #65751 (https://bugzilla.kernel.org/show_bug.cgi?id=65751) Signed-off-by: Zach Ploskey <zach@ploskey.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOTAndy Shevchenko2017-01-211-1/+1
| | | | | | | | | | | The commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests") starts refusing misconfigured interrupt handlers. This makes intel_mid_powerbtn not working anymore. Add a mandatory flag to a threaded IRQ request in the driver. Fixes: 1c6c69525b40 ("genirq: Reject bogus threaded irq requests") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>