summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'platform-drivers-x86-v4.19-1' of ↵Linus Torvalds2018-08-2225-418/+1659
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * platform/x86: acer-wmi: Silence "unsupported" message a bitBenjamin Herrenschmidt2018-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | This driver prints that "Unsupported machine..." message on every boot on ThinkPad X1 Carbon laptops (and I assume a number of other systems), which causes graphical boots to "glitch" a bit and is rather annoying ... Make it a pr_debug instead. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: intel_punit_ipc: fix build errorsRandy Dunlap2018-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build errors by #including <linux/io.h>. ../drivers/platform/x86/intel_punit_ipc.c: In function 'ipc_read_status': ../drivers/platform/x86/intel_punit_ipc.c:55:2: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration] return readl(ipcdev->base[type][BASE_IFACE]); ../drivers/platform/x86/intel_punit_ipc.c: In function 'ipc_write_cmd': ../drivers/platform/x86/intel_punit_ipc.c:60:2: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration] writel(cmd, ipcdev->base[type][BASE_IFACE]); Fixes: 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Zha Qipeng <qipeng.zha@intel.com> Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: ideapad: Add Y520-15IKBM and Y720-15IKBM to no_hw_rfkillIke Panhc2018-08-151-0/+14
| | | | | | | | | | | | | | | | | | | | Lenovo Y520-15IKBM and Y720-15IKBM are another Lenovo models without physical radio switch and ideapad-laptop reports it is hard blocked. Add them into no_hw_rfkill to unlock wireless. BugLink: https://bugs.launchpad.net/bugs/1723612 Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360Aleh Filipovich2018-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add entry to WMI keymap for lid flip event on Asus UX360. On Asus Zenbook ux360 flipping lid from/to tablet mode triggers keyscan code 0xfa which cannot be handled and results in kernel log message "Unknown key fa pressed". Signed-off-by: Aleh Filipovich<aleh@appnexus.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: acer-wmi: refactor function has_capGustavo A. R. Silva2018-08-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | Refactor function has_cap in order to avoid returning integer values, when instead it should return booleans. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: thinkpad_acpi: Fix multi-battery bugThomas Weißschuh2018-08-151-1/+5
| | | | | | | | | | | | | | | | | | The struct containing the supported operations for all batteries is being zeroed on each battery probe. This prevents all other batteries except the lastly probed one from being configured. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: thinkpad_acpi: extend battery quirk coverageJouke Witteveen2018-08-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Based on bug reports and a web search for "Thinkpad_acpi: Error probing battery 2" four more models were found that require the battery quirk: Lenovo B5400, Thinkpad 11e, Thinkpad 11e gen 3, Thinkpad 13 gen 3. Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com> Tested-by: James Cheshire <jermizzey@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: touchscreen_dmi: Add info for the Cube KNote i1101 tabletyouling2572018-08-151-0/+26
| | | | | | | | | | | | | | | | Add touchscreen info for the Cube KNote i1101 tablet. Reported-and-tested-by: lkongl <lkongl@163.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()Wei Yongjun2018-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | The return value from platform_device_register_resndata() is not checked correctly. The test is done against a wrong variable. This patch fix it. Fixes: 0378123c5800 ("platform/x86: mlx-platform: Add mlxreg-fan platform driver activation") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: mlx-platform: Remove unused defineVadim Pasternak2018-08-011-1/+0
| | | | | | | | | | | | | | Remove unused define MLXPLAT_CPLD_AGGR_MASK_MSN21XX. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: mlx-platform: Change mlxreg-io configuration for MSN274x systemsVadim Pasternak2018-08-011-2/+2
| | | | | | | | | | | | | | | | Change mlxreg-io platform driver configuration for MSN274x system types from the default to MSN21xx. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: mlx-platform: Allow mlxreg-io driver activation for more systemsVadim Pasternak2018-08-011-0/+96
| | | | | | | | | | | | | | | | | | Allow mlxreg-io platform driver activation for more system types, in particular for MSN21xx, MSN201x types, which have reset causes bits slightly different from the default configuration. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: mlx-platform: Add ASIC hotplug device configurationVadim Pasternak2018-08-011-3/+71
| | | | | | | | | | | | | | | | | | | | | | Add support for ASIC hotplug device events for the all system types. The ASIC hotplug event is sent in cases ASIC reaches the good health state or dropped to the bad health state. The health state is used to change, when device is reset or in case of some system failures. In such cases hwmon uevent notification will be sent. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/mellanox: mlxreg-hotplug: Add hotplug hwmon uevent notificationVadim Pasternak2018-08-011-9/+17
| | | | | | | | | | | | | | | | Notify user when hotplug device signal is received in order to allow user to handle such case, if it wishes to take some action on this matter. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/mellanox: mlxreg-hotplug: Improve mechanism of ASIC health discoveryVadim Pasternak2018-08-011-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the logic of ASIC health discovery. ASIC device can indicate its health state as a good, booting or dormant. During ASIC reset the device is dropped to dormant state and should get to the stable good health state through the intermediate booting state. The sequence for getting to the steady state health after reset is: (dormant -> booting -> good)+. Initial implementation assumes that ?good? within this sequence is always repeated twice and device is getting steady state only after the second ?good?. This patch removes this dependency, since the second ?good? is received because of the noise on line and can be ignored. Device reaches steady state after the first ?good? is received. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: mlx-platform: Add mlxreg-fan platform driver activationVadim Pasternak2018-08-011-1/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mlxreg-fan platform driver activation. FAN driver uses the same regmap infrastructure as others Mellanox platform drivers. Specific registers description for default FAN platform data configuration are added to mlx-platform. There are the registers for tachometers reading, PWM control and FAN ownership control. The last one has a default value, which is set at initialization time through the regmap infrastructure, which is necessary for moving FAN control ownership from hardware to software. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: dell-laptop: Fix backlight detectionDamien Thébault2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix return code check for "max brightness" ACPI call. The Dell laptop ACPI video brightness control is not present on dell laptops anymore, but was present in older kernel versions. The code that checks the return value is incorrect since the SMM refactoring. The old code was: if (buffer->output[0] == 0) Which was changed to: ret = dell_send_request(...) if (ret) However, dell_send_request() will return 0 if buffer->output[0] == 0, so we must change the check to: if (ret == 0) This issue was found on a Dell M4800 laptop, and the fix tested on it as well. Fixes: 549b4930f057 ("dell-smbios: Introduce dispatcher for SMM calls") Signed-off-by: Damien Thébault <damien@dtbo.net> Tested-by: Damien Thébault <damien@dtbo.net> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Reviewed-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: toshiba_acpi: Fix defined but not used build warningsRandy Dunlap2018-07-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix a build warning in toshiba_acpi.c when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused. ../drivers/platform/x86/toshiba_acpi.c:1685:12: warning: 'version_proc_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Azael Avalos <coproscefalo@gmail.com> Cc: platform-driver-x86@vger.kernel.org Cc: Andy Shevchenko <andy@infradead.org> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: thinkpad_acpi: Support battery quirkJouke Witteveen2018-07-181-2/+21
| | | | | | | | | | | | | | | | | | | | | | Some Thinkpads have a single battery, but expose it as BAT1. Use the quirks engine to force these machines into always addressing the primary battery. Without this, the battery name would resolve to the non-existent secondary battery and ACPI calls would fail. Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: thinkpad_acpi: Proper model/release matchingJouke Witteveen2018-07-181-50/+48
| | | | | | | | | | | | | | | | | | | | | | Modern Thinkpads have three character model designators. Previously, they would be accepted, but recorded incompletely. Revision matching extracted the wrong bytes from the ID string. This made the use of quirks for modern machines impossible. Fixes: 1b0eb5bc2413 Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: intel_ips: remove redundant variables slope and offsetColin Ian King2018-07-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Variables slope and offset are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'slope' set but not used [-Wunused-but-set-variable] warning: variable 'offset' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/mellanox: Use 2-factor allocator callsKees Cook2018-07-181-2/+2
| | | | | | | | | | | | | | | | | | As already done treewide, switch from open-coded multiplication to using 2-factor allocation helpers. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: asus-wireless: Fix uninitialized symbol usageJoão Paulo Rechi Vita2018-07-021-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 'ret' will not be initialized if acpi_evaluate_integer() returns through an error path, so it should not be used in this case. This fixes the following Smatch static analyser error: drivers/platform/x86/asus-wireless.c:76 asus_wireless_method() error: uninitialized symbol 'ret'. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> 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: Toggle airplane mode LEDJoão Paulo Rechi Vita2018-07-021-0/+1
| | | | | | | | | | | | | | | | This commit makes use of a newly implemented RFKill LED trigger to trigger the LED when all radios are blocked. Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: dell-smbios-wmi: make function dell_smbios_wmi_call staticColin Ian King2018-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The function dell_smbios_wmi_call is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'dell_smbios_wmi_call' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: intel-vbtn: Add support for dock mode detectionMatt Delco2018-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Dell laptop I have has an ACPI that sends 0xCB and 0xCC on entering tablet mode. On exiting tablet mode it sends 0xCA and 0xCD. Based on: http://www.traby.de/medion/DSDT/dsdt.dsl https://gist.github.com/jprvita/5737de3cbb670e80973b7d4e51c38ab6 https://osdn.net/projects/android-x86/scm/git/kernel/commits/ 7cbe5a330687b851f32dd9f1048a6ce182d0ff44 It appears that 0xCA and 0xCB are about dock mode, which for my convertible laptop seems questionably tied to whether I've put the laptop in tablet or laptop mode. I previously proposed no-oping 0xCA and 0xCB but this revised change attempts to add support for detecting dock mode--this detection will essentially be broken for my laptop (the main workaround would be for 0xCA and 0xCB to be used to provoke a query of the VGBS method that reports the current dock & tablet mode [which is accurately reported on my laptop but based on the prior workarounds in the driver it apparently can't be trusted for all systems]). Signed-off-by: Matt Delco <delco@chromium.org> Cc: Darren Hart <dvhart@infradead.org> Cc: Andy Shevchenko <andy@infradead.org> Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: intel-hid: Add support for Device Specific MethodsSrinivas Pandruvada2018-07-021-21/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some of the recent platforms, it is possible that stand alone methods for HEBC() or other methods used in this driver may not exist. In this case intel-hid driver will fail to load and power button will not be functional. It is also possible that some quirks in this driver added for some platforms may have same issue in loading intel-hid driver. There is an update to the ACPI details for the HID event filter driver. In the updated specification a _DSM is added, which has separate function indexes for each of the previous stand alone methods. This change brings in support for the _DSM and allows usage of function index for corresponding stand alone methods. Details of Device Specific Method: Intel HID Event Filter Driver _DSM UUID: eeec56b3-4442-408f-a792-4edd4d758054 • Function index 0: Returns a buffer with a bit-field representing the supported function IDs. Function Index ASL Object -------------------------------- 1 BTNL 2 HDMM 3 HDSM 4 HDEM 5 BTNS 6 BTNE 7 HEBC 8 VGBS 9 HEBC One significant change is to query the supported methods implemented on the platform. So the previous HEBC() has two variants. HEBC v1 and HEBC v2. The v2 version allowed further define which of the 5-button are actually defined by the platform. HEBC v2 support is only available via new DSM. v1 Button details: Bits [0] - Rotation Lock, Num Lock, Home, End, Page Up, Page Down Bits [1] - Wireless Radio Control Bits [2] - System Power Down Bits [3] - System Hibernate Bits [4] - System Sleep/ System Wake Bits [5] - Scan Next Track Bits [6] - Scan Previous Track Bits [7] - Stop Bits [8] - Play/Pause Bits [9] - Mute Bits [10] - Volume Increment Bits [11] - Volume Decrement Bits [12] - Display Brightness Increment Bits [13] - Display Brightness Decrement Bits [14] - Lock Tablet Bits [15] - Release Tablet Bits [16] - Toggle Bezel Bits [17] - 5 button array Bits [18-31] - reserved v2 Buttom details: Bits [0-16] - Same as v1 version Bits [17] - 5 button array Bits [18] – Power Button Bits [19] - W Home Button Bits [20] - Volume Up Button Bits [21] - Volume Down Button Bits [22] – Rotation Lock Button Bits [23-31] – reserved Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Tested-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: touchscreen_dmi: Add info for the Onda V820w tabletJun Bo Bi2018-07-021-0/+24
| | | | | | | | | | | | | | | | Add touchscreen platform data for the Onda V820w tablet. Signed-off-by: Jun Bo Bi <jambonmcyeah@gmail.com> [andy: fixed compilation error, massaged commit message] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: touchscreen_dmi: Add info for the "Connect Tablet 9" tabletHans de Goede2018-07-021-0/+25
| | | | | | | | | | | | | | | | | | Add touchscreen info for the "Connect Tablet 9" tablet. This appears to be a variant of the same hardware as the ITworks TW891 tablet, but it needs different firmware for the touchscreen to fonction properly. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: touchscreen_dmi: Add info for the ONDA V891W Dual OS tabletyouling2572018-07-021-0/+27
| | | | | | | | | | | | | | | | | | Add touchscreen info for hardware revision "v3" of the ONDA V891W Dual OS tablet. Reported-and-tested-by: youling257 <youling257@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: asus-wmi: Add keyboard backlight toggle supportChris Chiu2018-07-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Some ASUS laptops like UX550GE has hotkey (Fn+F7) for keyboard backlight toggle which would emit the scan code 0xc7 each keypress. On the UX550GE, the max keyboard brightness level is 3 so the toggle would not be simply on/off the led but need to be cyclic. Per ASUS spec, it should increment the brightness for each keypress, then toggle(off) the LED when it already reached the max level. Signed-off-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: asus-wmi: Call led hw_changed API on kbd brightness changeChris Chiu2018-07-021-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make asus-wmi notify on hotkey kbd brightness changes, listen for brightness events and update the brightness directly in the driver. Create new do_kbd_led_set function for in-driver update, and leave kbd_led_set for original led_classdev call path. Update the brightness by led_classdev_notify_brightness_hw_changed. This will allow userspace to monitor (poll) for brightness changes on the LED without reporting via input keymapping. Signed-off-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: intel_pmc_core: Add CNP SLPS0 debug registersBox, David E2018-07-022-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds debugfs access to registers in the Cannon Point PCH PMC that are useful for debugging #SLP_S0 signal assertion and other low power relate activities. Device pm states are latched in these registers whenever the package enters C10 and can be read from slp_s0_debug_status. The pm states may also be latched by writing 1 to slp_s0_dbg_latch which will immediately capture the current state on the next read of slp_s0_debug_status. Signed-off-by: Box, David E <david.e.box@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: Rename silead_dmi to touchscreen_dmiHans de Goede2018-07-023-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * platform/x86: silead_dmi: Add touchscreen info for the Chuwi Vi10 tabletHans de Goede2018-07-021-0/+26
| | | | | | | | | | | | | | Add touchscreen info for the 10" Chuwi Vi10 (CWI505) tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: silead_dmi: Sort entries alphabeticallyHans de Goede2018-07-021-252/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | We have so much entries now that it is good to bring some form of order to them. This should also reduce conflicts when multiple patches make changes at the same time (compared to tagging all new entries at the end). Note this commit purely moves stuff around and adds 2 comments about keeping the data and table alphabetically sorted. There are no functional changes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: silead_dmi: Rename trekstor entriesHans de Goede2018-07-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | Prefix the entries for trekstor tablets with trekstor_ and drop the detailed model version (still available as comment in the dmi table) to keep things within 80 chars. This is a preparation patch for sorting all the entries alphabetically. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
| * platform/x86: dell-smbios: make a function and a pointer staticColin Ian King2018-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function dell_smbios_smm_call and pointer platform_device are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: warning: symbol 'platform_device' was not declared. Should it be static? warning: symbol 'dell_smbios_smm_call' 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>
| * platform/x86: ideapad-laptop: Apply no_hw_rfkill to Y20-15IKBM, tooTakashi Iwai2018-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 5d9f40b56630 ("platform/x86: ideapad-laptop: Add Y520-15IKBN to no_hw_rfkill") added the entry for Y20-15IKBN, and it turned out that another variant, Y20-15IKBM, also requires the no_hw_rfkill. Trim the last letter from the string so that it matches to both Y20-15IKBN and Y20-15IKBM models. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1098626 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: dell-smbios-base: Support systems without tokensMario Limonciello2018-06-261-14/+21
| | | | | | | | | | | | | | | | Some Dell servers can use dell-smbios but they don't support the token interface. Make it optional. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: thinkpad_acpi: Add support for calculator hotkeyBenjamin Berg2018-06-261-2/+2
| | | | | | | | | | | | | | | | | | The P52 has a keyboard which features a calculator key above the numpad. Add support for this the calculator key (0x1313). Signed-off-by: Benjamin Berg <bberg@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: toshiba_acpi: Update KBD backlight LED on second gen laptopsAzael Avalos2018-06-261-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Second generation keyboard backlight (type 2) laptops can switch on the keyboard LED on their own via hardware/firmware, but the LED subsystem is unaware of such change since the LED interface was only being created on first generation keyboard backlight (type 1) laptops. This patch creates the LED interface for second gen keyboards and calls the *_hw_changed API whenever userspace changes the state of the keyboard backlight LED. While we are at it, remove an unneeded asignment to the acpi_dev struct under *_kbd_bl_work, and also update the kbd_event_generated variable in the main toshiba struct instead of the global struct. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> [dvhart: correct int* and int compare with dev->kbd_mode] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: wmi: Do not mix pages and kmallocKees Cook2018-06-221-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The probe handler_data was being allocated with __get_free_pages() for no reason I could find. The error path was using kfree(). Since other things are happily using kmalloc() in the probe path, switch to kmalloc() entirely. This fixes the error path mismatch and will avoid issues with CONFIG_HARDENED_USERCOPY_PAGESPAN=y. Reported-by: Mihai Donțu <mihai.dontu@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Mario Limonciello <Mario.limonciello@dell.com> Cc: stable@vger.kernel.org Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/x86: mlx-platform: Add mlxreg-io platform driver activationVadim Pasternak2018-06-191-2/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mlxreg-io platform driver activation. Access driver uses the same regmap infrastructure as others Mellanox platform drivers. Specific registers description for default platform data configuration are added to mlx-platform. There are the registers for resets control, reset causes monitoring, programmable devices version reading and mux select control. This platform data is passed to mlxreg-io driver. Also some default values for the register are set at initialization time through the regmap infrastructure, which are necessary for moving write protection from the general purpose registers, which are used by mlxreg-io for write access. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> v4-v5: Changes added by Vadim: - Add two new attributes for ASIC health and main power domain shutdown. Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
| * platform/mellanox: Introduce support for Mellanox register access driverVadim Pasternak2018-06-193-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new Mellanox platform driver to allow access to Mellanox programmable device register space trough sysfs interface. The driver purpose is to provide sysfs interface for user space for the registers essential for system control and monitoring. The sets of registers for sysfs access are supposed to be defined per system type bases and include the registers related to system resets operation, system reset causes monitoring and some kinds of mux selection. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> [dvhart: Kconfig typo fixes spotted by Randy Dunlap] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
* | Merge branch 'siginfo-linus' of ↵Linus Torvalds2018-08-211-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull core signal handling updates from Eric Biederman: "It was observed that a periodic timer in combination with a sufficiently expensive fork could prevent fork from every completing. This contains the changes to remove the need for that restart. This set of changes is split into several parts: - The first part makes PIDTYPE_TGID a proper pid type instead something only for very special cases. The part starts using PIDTYPE_TGID enough so that in __send_signal where signals are actually delivered we know if the signal is being sent to a a group of processes or just a single process. - With that prep work out of the way the logic in fork is modified so that fork logically makes signals received while it is running appear to be received after the fork completes" * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (22 commits) signal: Don't send signals to tasks that don't exist signal: Don't restart fork when signals come in. fork: Have new threads join on-going signal group stops fork: Skip setting TIF_SIGPENDING in ptrace_init_task signal: Add calculate_sigpending() fork: Unconditionally exit if a fatal signal is pending fork: Move and describe why the code examines PIDNS_ADDING signal: Push pid type down into complete_signal. signal: Push pid type down into __send_signal signal: Push pid type down into send_signal signal: Pass pid type into do_send_sig_info signal: Pass pid type into send_sigio_to_task & send_sigurg_to_task signal: Pass pid type into group_send_sig_info signal: Pass pid and pid type into send_sigqueue posix-timers: Noralize good_sigevent signal: Use PIDTYPE_TGID to clearly store where file signals will be sent pid: Implement PIDTYPE_TGID pids: Move the pgrp and session pid pointers from task_struct to signal_struct kvm: Don't open code task_pid in kvm_vcpu_ioctl pids: Compute task_tgid using signal->leader_pid ...
| * | pids: Compute task_tgid using signal->leader_pidEric W. Biederman2018-07-211-0/+1
| |/ | | | | | | | | | | | | | | | | | | The cost is the the same and this removes the need to worry about complications that come from de_thread and group_leader changing. __task_pid_nr_ns has been updated to take advantage of this change. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
* | Merge tag 'chrome-platform-for-linus-4.19' of ↵Linus Torvalds2018-08-211-1/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform Pull chrome platform updates from Benson Leung. Everything but the SPDX identifier updates actually came in earlier through the MFD merge. * tag 'chrome-platform-for-linus-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: platform/chrome: chromeos_tbmc - fix SPDX identifier
| * \ Merge tag 'ib-platform-chrome-mfd-move-cros-ec-transport-for-4.19' into ↵Benson Leung2018-07-094-0/+1151
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | working-branch-for-4.19 Immutable branch (mfd, chrome) due for the v4.19 window Immutable Branch which moves the cros_ec_i2c and cros_ec_spi transport drivers from mfd to platform/chrome. Changes in arm are a simple rename in defconfigs. Change in input is a rename in help text.