aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/thinkpad_acpi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-04-10Merge tag 'platform-drivers-x86-v4.17-1' of git://git.infradead.org/linux-platform-drivers-x86Linus Torvalds1-0/+8
Pull x86 platform driver updates from Andy Shevchenko: - Dell SMBIOS driver fixed against memory leaks. - The fujitsu-laptop driver is cleaned up and now supports hotkeys for Lifebook U7x7 models. Besides that the typo introduced by one of previous clean up series has been fixed. - Specific to x86-based laptops HID device now supports KEY_ROTATE_LOCK_TOGGLE event which is emitted, for example, by Wacom MobileStudio Pro 13. - Turbo MAX 3 technology is enabled for the rest of platforms that support Hardware-P-States feature which have core priority described by ACPI CPPC table. - Mellanox on x86 gets better support of I2C bus in use including support of hotpluggable ones. - Silead touchscreen is enabled on two tablet models, i.e Yours Y8W81 and I.T.Works TW701. - From now on the second fan on Thinkpad P50 is supported. - The topstar-laptop driver is reworked to support new models, in particular Topstar U931. * tag 'platform-drivers-x86-v4.17-1' of git://git.infradead.org/linux-platform-drivers-x86: (41 commits) platform/x86: thinkpad_acpi: Add 2nd Fan Support for Thinkpad P50 platform/x86: dell-smbios: Fix memory leaks in build_tokens_sysfs() intel-hid: support KEY_ROTATE_LOCK_TOGGLE intel-hid: clean up and sort header files platform/x86: silead_dmi: Add entry for the Yours Y8W81 tablet platform/x86: fujitsu-laptop: Support Lifebook U7x7 hotkeys platform/x86: mlx-platform: Add physical bus number auto detection platform/mellanox: mlxreg-hotplug: Change input for device create routine platform/x86: mlx-platform: Add deffered bus functionality platform/x86: mlx-platform: Use define for the channel numbers platform/x86: fujitsu-laptop: Revert UNSUPPORTED_CMD back to an int platform/x86: Fix dell driver init order platform/x86: dell-smbios: Resolve dependency error on ACPI_WMI platform/x86: dell-smbios: Resolve dependency error on DCDBAS platform/x86: Allow for SMBIOS backend defaults platform/x86: dell-smbios: Link all dell-smbios-* modules together platform/x86: dell-smbios: Rename dell-smbios source to dell-smbios-base platform/x86: dell-smbios: Correct some style warnings platform/x86: wmi: Fix misuse of vsprintf extension %pULL platform/x86: intel-hid: Reset wakeup capable flag on removal ...
2018-04-03platform/x86: thinkpad_acpi: Add 2nd Fan Support for Thinkpad P50Alexander Kappner1-0/+8
The Thinkpad P50 has 2 fans. Add the 2FAN quirk so the tpacpi driver properly reports both fan speeds. Because the P50 doesn't report the version of its EC controller, we need to identify it by BIOS version (N1). Signed-off-by: Alexander Kappner <agk@godking.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [andy: renamed macro, massaged changelog] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-02-21thinkpad_acpi: Add support for battery thresholdsOgnjen Galic1-1/+388
1) Charge start threshold /sys/class/power_supply/BATN/charge_start_threshold Valid values are [0, 99]. A value of 0 turns off the start threshold wear control. 2) Charge stop threshold /sys/class/power_supply/BATN/charge_stop_threshold Valid values are [1, 100]. A value of 100 turns off the stop threshold wear control. This must be configured first. Signed-off-by: Ognjen Galic <smclt30p@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-24platform/x86: thinkpad_acpi: suppress warning about palm detectionDavid Herrmann1-0/+10
This patch prevents the thinkpad_acpi driver from warning about 2 event codes returned for keyboard palm-detection. No behavioral changes, other than suppressing the warning in the kernel log. The events are still forwarded via acpi-netlink channels. We could, optionally, decide to forward the event through a input-switch on the tpacpi input device. However, so far no suitable input-code exists, and no similar drivers report such events. Hence, leave it an acpi event for now. Note that the event-codes are named based on empirical studies. On the ThinkPad X1 5th Gen the sensor can be found underneath the arrow key. Cc: Matthew Thode <mthode@mthode.org> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-12-21platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode statusBenjamin Berg1-5/+3
On the X1 Yoga 2nd Generation and most likely other notebooks the FLAT mode is reported. Decode it correctly rather than warning about an unexpected multi mode status to be reported. Signed-off-by: Benjamin Berg <bberg@redhat.com> Cc: Peter FP1 Zhang <zhangfp1@lenovo.com Cc: Lyude <lyude@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-11-18Merge tag 'platform-drivers-x86-v4.15-1' of git://git.infradead.org/linux-platform-drivers-x86Linus Torvalds1-13/+119
Pull x86 platform driver updates from Andy Shevchenko: "Here is the collected material against Platform Drivers x86 subsystem. It's rather bit busy cycle for PDx86, mostly due to Dell SMBIOS driver activity For this cycle we have quite an update for the Dell SMBIOS driver including WMI work to provide an interface for SMBIOS tokens via sysfs and WMI support for 2017+ Dell laptop models. SMM dispatcher code is split into a separate driver followed by a new WMI dispatcher. The latter provides a character device interface to user space. The git history also contains a merge of immutable branch from Wolfram Sang in order to apply a dependent fix to the Intel CherryTrail Battery Management driver. Other Intel drivers got a lot of cleanups. The Turbo Boost Max 3.0 support is added for Intel Skylake. Peaq WMI hotkeys driver gets its own maintainer and white list of supported models. Silead DMI is expanded to support few additional platforms. Tablet mode via GMMS ACPI method is added to support some ThinkPad tablets. new driver: - Add driver to force WMI Thunderbolt controller power status asus-wmi: - Add lightbar led support dell-laptop: - Allocate buffer before rfkill use dell-smbios: - fix string overflow - Add filtering support - Introduce dispatcher for SMM calls - Add a sysfs interface for SMBIOS tokens - only run if proper oem string is detected - Prefix class/select with cmd_ - Add pr_fmt definition to driver dell-smbios-smm: - test for WSMT dell-smbios-wmi: - release mutex lock on WMI call failure - introduce userspace interface - Add new WMI dispatcher driver dell-smo8800: - remove redundant assignments to byte_data dell-wmi: - don't check length returned - clean up wmi descriptor check - increase severity of some failures - Do not match on descriptor GUID modalias - Label driver as handling notifications dell-*wmi*: - Relay failed initial probe to dependent drivers dell-wmi-descriptor: - check if memory was allocated - split WMI descriptor into it's own driver fujitsu-laptop: - Fix radio LED detection - Don't oops when FUJ02E3 is not presnt hp_accel: - Add quirk for HP ProBook 440 G4 hp-wmi: - Fix tablet mode detection for convertibles ideapad-laptop: - Add Lenovo Yoga 920-13IKB to no_hw_rfkill dmi list intel_cht_int33fe: - Update fusb302 type string, add properties - make a couple of local functions static - Work around BIOS bug on some devices intel-hid: - Power button suspend on Dell Latitude 7275 intel_ips: - Convert timers to use timer_setup() - Remove FSF address from GPL notice - Remove unneeded fields and label - Keep pointer to struct device - Use PCI_VDEVICE() macro - Switch to new PCI IRQ allocation API - Simplify error handling via devres API intel_pmc_ipc: - Revert Use MFD framework to create dependent devices - Use MFD framework to create dependent devices - Use spin_lock to protect GCR updates - Use devm_* calls in driver probe function intel_punit_ipc: - Fix resource ioremap warning intel_telemetry: - Remove useless default in Kconfig - Add needed inclusion - cleanup redundant headers - Fix typos - Fix load failure info intel_telemetry_debugfs: - Use standard ARRAY_SIZE() macro intel_turbo_max_3: - Add Skylake platform intel-wmi-thunderbolt: - Silence error cases mlx-platform: - make a couple of structures static peaq_wmi: - Fix missing terminating entry for peaq_dmi_table peaq-wmi: - Remove unnecessary checks from peaq_wmi_exit - Add DMI check before binding to the WMI interface - Revert Blacklist Lenovo ideapad 700-15ISK - Blacklist Lenovo ideapad 700-15ISK silead_dmi: - Add silead, home-button property to some tablets - Add entry for the Digma e200 tablet - Fix GP-electronic T701 entry - Add entry for the Chuwi Hi8 Pro tablet sony-laptop: - Drop variable assignment in sony_nc_setup_rfkill() - Fix error handling in sony_nc_setup_rfkill() thinkpad_acpi: - Implement tablet mode using GMMS method tools/wmi: - add a sample for dell smbios communication over WMI wmi: - release mutex on module acquistion failure - create userspace interface for drivers - Don't allow drivers to get each other's GUIDs - Add new method wmidev_evaluate_method - Destroy on cleanup rather than unregister - Cleanup exit routine in reverse order of init - Sort include list" * tag 'platform-drivers-x86-v4.15-1' of git://git.infradead.org/linux-platform-drivers-x86: (74 commits) platform/x86: silead_dmi: Add silead, home-button property to some tablets platform/x86: dell-laptop: Allocate buffer before rfkill use platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers platform/x86: dell-wmi-descriptor: check if memory was allocated platform/x86: Revert intel_pmc_ipc: Use MFD framework to create dependent devices platform/x86: dell-smbios-wmi: release mutex lock on WMI call failure platform/x86: wmi: release mutex on module acquistion failure platform/x86: dell-smbios: fix string overflow platform/x86: intel_pmc_ipc: Use MFD framework to create dependent devices platform/x86: intel_punit_ipc: Fix resource ioremap warning platform/x86: dell-smo8800: remove redundant assignments to byte_data platform/x86: hp-wmi: Fix tablet mode detection for convertibles platform/x86: intel_ips: Convert timers to use timer_setup() platform/x86: sony-laptop: Drop variable assignment in sony_nc_setup_rfkill() platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill() tools/wmi: add a sample for dell smbios communication over WMI platform/x86: dell-smbios-wmi: introduce userspace interface platform/x86: wmi: create userspace interface for drivers platform/x86: dell-smbios: Add filtering support platform/x86: dell-smbios-smm: test for WSMT ...
2017-10-31treewide: Fix function prototypes for module_param_call()Kees Cook1-1/+1
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-01platform/x86: thinkpad_acpi: Implement tablet mode using GMMS methodBenjamin Berg1-13/+119
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-08-18platform/x86: thinkpad_acpi: Fix warning about deprecated hwmon_device_registerStanislav Fomichev1-27/+11
Use hwmon_device_register_with_groups instead of deprecated hwmon_device_register and fix a dmesg warning. This patch however changes the userspace API. hwmon_device_register_with_groups takes `hwmon' name as an argument and creates a name file in the `hwmon' device, not in the `platform_device'. This allows us to remove custom `name' device attribute, but in order to make lm-sensors happy we also have to move fans and thermal attributes to the `hwmon' device. Even though this patch changes userspace API, it's still compatible with the lm-sensors. Starting with lm-sensors 3.0 (circa 2007), it looks at both hwmon and the backing device for the name and other attributes. before: $ cat /sys/devices/platform/thinkpad_hwmon/{name,fan1_input} thinkpad 2007 $ cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/{name,fan1_input} cat: /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/name: No such file or directory cat: /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/fan1_input: No such file or directory $ cat /sys/class/hwmon/hwmon1/{name,fan1_input} cat: /sys/class/hwmon/hwmon1/name: No such file or directory cat: /sys/class/hwmon/hwmon1/fan1_input: No such file or directory $ sensors thinkpad-isa-0000 Adapter: ISA adapter fan1: 3533 RPM after: $ cat /sys/devices/platform/thinkpad_hwmon/{name,fan1_input} cat: /sys/devices/platform/thinkpad_hwmon/name: No such file or directory cat: /sys/devices/platform/thinkpad_hwmon/fan1_input: No such file or directory $ cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon1/{name,fan1_input} thinkpad 3478 $ cat /sys/class/hwmon/hwmon1/{name,fan1_input} thinkpad 3478 $ sensors thinkpad-isa-0000 Adapter: ISA adapter fan1: 3489 RPM $ sensors -v sensors version 3.4.0 with libsensors version 3.4.0 Signed-off-by: Stanislav Fomichev <kernel@fomichev.me> [dvhart: cleaned up commit log, bumped version to 4.14 in the doc change] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-07-06Merge tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86Linus Torvalds1-117/+66
Pull x86 platform driver updates from Darren Hart: "Introduce new bus architecture for WMI and expose BMOF data through sysfs. Correct several assumptions about WMI instance number from 1 to 0. Further fujitsu-laptop cleanups, continuing to prepare for separation into two modules. Add support for several new ideapad laptops and silead-based tablets. Various minor fixes and const cleanups. Detail summary: sony-laptop: - constify attribute_group and input index array fujitsu-laptop: - rework debugging - do not evaluate ACPI _INI methods - do not update ACPI device power status - sanitize hotkey input device identification - use strcpy to set ACPI device names and classes - remove redundant safety checks - use device-specific data in remaining module code - use device-specific data in LED-related code - explicitly pass ACPI device to call_fext_func() - track the last instantiated FUJ02E3 ACPI device - allocate fujitsu_laptop in acpi_fujitsu_laptop_add() - use device-specific data in backlight code - allocate fujitsu_bl in acpi_fujitsu_bl_add() - distinguish current uses of device-specific data msi-laptop: - constify msipf*_attribute_group eeepc-laptop: - constify platform_attribute_group toshiba_haps: - constify haps_attr_group dell-wmi-led: - Adjust instance of wmi_evaluate_method calls to 0 alienware-wmi: - Adjust instance of wmi_evaluate_method calls to 0 intel_menlow: - Add const to thermal_cooling_device_ops structure acerhdf: - Add const to thermal_cooling_device_ops structure dell-laptop: - Fix bogus keyboard backlight sysfs interface acer-wmi: - Using zero as first WMI instance number - Detect RF Button capability ideapad-laptop: - Add Y720-15IKBN to no_hw_rfkill - Add Y520-15IKBN to no_hw_rfkill - constify rfkill_ops structure - Squelch ACPI event 1 - hide unused 'touchpad_store' - Switch touchpad attribute to be RO - Add sysfs interface for touchpad state silead_dmi: - Add touchscreen info for PoV mobii wintab p800w - Add touchscreen info for Pipo W2S tablet - Add touchscreen info for GP-electronic T701 dell-rbtn: - constify rfkill_ops structures - Improve explanation about DELLABC6 samsung-laptop: - constify rfkill_ops structures panasonic-laptop: - remove unused code samsung-laptop: - Initialize loca variable dell-wmi: - Convert to the WMI bus infrastructure - Add a better description for "stealth mode" - Add a comment explaining the 0xb2 magic number wmi-bmof: - New driver to expose embedded Binary WMI MOF metadata wmi*: - Fix printing info about WDG structure - Add recent copyright statements - Require query for data blocks, rename writable to setable - Add an interface for subdrivers to access sibling devices - Bind the platform device, not the ACPI node - Add a new interface to read block data - Incorporate acpi_install_notify_handler - Instantiate all devices before adding them - Probe data objects for read and write capabilities - Split devices into types and add basic sysfs attributes - Fix error handling when creating devices - Turn WMI into a bus driver - Track wmi devices per ACPI device - Clean up acpi_wmi_add - Pass the acpi_device through to parse_wdg - Drop "Mapper (un)loaded" messages intel_cht_int33fe: - Set supplied-from property on max17047 dev intel_pmc_ipc: - Mark ipc_data_readb() as __maybe_unused topstar-laptop: - Add new device id peaq-wmi: - Add new peaq-wmi driver thinkpad_acpi: - Add a comment about 0 in module_param_call() - Join string literals back toshiba_acpi: - use memdup_user_nul" * tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86: (67 commits) platform/x86: sony-laptop: constify attribute_group and input index array platform/x86: fujitsu-laptop: rework debugging platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods platform/x86: fujitsu-laptop: do not update ACPI device power status platform/x86: fujitsu-laptop: sanitize hotkey input device identification platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes platform/x86: fujitsu-laptop: remove redundant safety checks platform/x86: msi-laptop: constify msipf*_attribute_group platform/x86: eeepc-laptop: constify platform_attribute_group platform/x86: toshiba_haps: constify haps_attr_group platform/x86: dell-wmi-led: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0 platform/x86: intel_menlow: Add const to thermal_cooling_device_ops structure platform/x86: acerhdf: Add const to thermal_cooling_device_ops structure platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface platform/x86: acer-wmi: Using zero as first WMI instance number platform/x86: ideapad-laptop: Add Y720-15IKBN to no_hw_rfkill platform/x86: ideapad-laptop: Add Y520-15IKBN to no_hw_rfkill platform/x86: silead_dmi: Add touchscreen info for PoV mobii wintab p800w platform/x86: silead_dmi: Add touchscreen info for Pipo W2S tablet ...
2017-06-12platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RWGreg Kroah-Hartman1-63/+28
We are trying to get rid of DRIVER_ATTR(), and the thinkpad_acpi driver's attributes can be trivially changed to use DRIVER_ATTR_RO() and DRIVER_ATTR_RW(). Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Andy Shevchenko <andy@infradead.org> Cc: <ibm-acpi-devel@lists.sourceforge.net> Cc: <platform-driver-x86@vger.kernel.org> Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15platform/x86: thinkpad_acpi: Add a comment about 0 in module_param_call()Andy Shevchenko1-0/+1
As per discussion [1] there are only few users of module_param_call() in kernel which prevent to read module parameters back. It thinkpad_acpi driver there is even no method do so. Thus, for now, add just a comment to explain why 0 is used as permissions in module_param_call(). [1]: https://patchwork.ozlabs.org/patch/713245/ Cc: Richard Weinberger <richard.weinberger@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
2017-05-15platform/x86: thinkpad_acpi: Join string literals backAndy Shevchenko1-117/+65
There is no point to keep string literal split. It even makes slightly harder to maintain and debug. Join string literals back to be oneliners. While here, print negative error without changing a sign as it is a common pattern in the kernel. Other than above there were no functional changes intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
2017-03-14platform/x86: thinkpad_acpi: add mapping for new hotkeysChristian Kellner1-12/+79
The T470, X270 emits new hkey events in the 0x1311 - 0x1315 range. According to the user manual they should launch a user selected favorite application (star icon, 0x1311), snipping tool (0x1312, currently ignored), enable/disable bluetooth (0x1314) and open they keyboard settings (0x1315). The third nibble (0xf00) is used to differentiate between the original hotkeys, the adaptive keyboard codes and the new, additional ones. Signed-off-by: Christian Kellner <ckellner@redhat.com> Reviewed-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>
2017-03-14platform/x86: thinkpad_acpi: guard generic hotkey caseChristian Kellner1-5/+7
Currently when dispatching hotkeys we check if the scancode is in the range of 0 and TPACPI_HOTKEY_MAP_LEN, although the bottom 20 entries in the hotkey keymap are already adaptive keycodes. Therefore we introduce a TP_ACPI_HOTKEYSCAN_ADAPTIVE_START and ensure that we are in the range 0 and ADAPTIVE_START for the generic keycode case. Signed-off-by: Christian Kellner <ckellner@redhat.com> Reviewed-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>
2017-02-24platform/x86: thinkpad_acpi: Call led_classdev_notify_brightness_hw_changed on kbd brightness changeHans de Goede1-4/+38
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>
2017-02-24platform/x86: thinkpad_acpi: Use brightness_set_blocking callback for LEDsHans de Goede1-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>
2017-02-24platform/x86: thinkpad_acpi: Stop setting led_classdev brightness directlyHans de Goede1-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>
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds1-1/+1
This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-15platform/x86: thinkpad_acpi: Initialize local in_tablet_mode and typeDarren Hart1-2/+2
linux-next reported in_tablet_mode and type may be used uninitialized after: b31800283868 ("platform/x86: thinkpad_acpi: Move tablet detection into separate function") This turns out to be a false positive as the pr_info call cannot be reached if tp_features.hotkey_tablet (global scope) is 0, and in_tablet_mode and type are assigned in both places tp_features.hotkey_tablet is assigned. Regardless, to make it explicit and avoid further reports, initialize in_tablet_mode to 0 and type to NULL. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Lyude <lyude@redhat.com>
2016-12-13platform/x86: thinkpad_acpi: Fix old style declaration GCC warningTobias Klauser1-1/+1
Fix an [-Wold-style-declaration] GCC warning by moving the inline keyword before the return type. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13platform/x86: thinkpad_acpi: Adding new hotkey ID for Lenovo thinkpadHui Wang1-0/+2
Recently we met an issue on lots of Lenovo thinkpad laptops (those laptops are not released to market yet), the issue is that the thinkpad_acpi.ko can't be automatically loaded as before. Through debugging, we found the HKEY_HID is LEN0268 instead of LEN0068 on those machines, and the MHKV is 0x200 instead of 0x100. So adding the new ID into the driver. Signed-off-by: Hui Wang <hui.wang@canonical.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13platform/x86: thinkpad_acpi: Add support for X1 Yoga (2016) Tablet ModeLyude1-4/+35
For whatever reason, the X1 Yoga doesn't support the normal method of querying for tablet mode. Instead of providing the MHKG method under the hotkey handle, we're instead given the CMMD method under the EC handle. Values on this handle are either 0x1, laptop mode, or 0x6, tablet mode. Tested-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Lyude <lyude@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13platform/x86: thinkpad_acpi: Move tablet detection into separate functionLyude1-15/+37
The hotkey events and ACPI handles used for detecting tablet mode on a few of the newer thinkpad models (Yoga X1 and the Yoga 260 specifically) have been changed around, so unfortunately this means we're definitely going to need to probe for multiple types of tablet mode support. Since the hotkey_init() is already a lot larger than it should be, let's split up this detection into its own function to make things a little easier to read. As well, since we're going to have multiple types of tablet modes, make hotkey_tablet into an enum so we can also use it to indicate the type of tablet mode reporting the machine supports. Suggested by Daniel Martin <consume.noise@gmail.com> Signed-off-by: Lyude <lyude@redhat.com> Cc: Daniel Martin <consume.noise@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-12-13platform/x86: Use ACPI_FAILURE at appropriate placesAxel Lin1-1/+1
Use ACPI_FAILURE() to replace !ACPI_SUCCESS(), this avoid !! operations. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-06-08thinkpad_acpi: Add support for HKEY version 0x200Dennis Wassenberg1-24/+63
Lenovo Thinkpad devices T460, T460s, T460p, T560, X260 use HKEY version 0x200 without adaptive keyboard. HKEY version 0x200 has method MHKA with one parameter value. Passing parameter value 1 will get hotkey_all_mask (the same like HKEY version 0x100 without parameter). Passing parameter value 2 to MHKA method will retrieve hotkey_all_adaptive_mask. If 0 is returned in that case there is no adaptive keyboard available. Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Signed-off-by: Lyude <cpaul@redhat.com> Tested-by: Lyude <cpaul@redhat.com> Tested-by: Marco Trevisan <marco@ubuntu.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [dvhart: Keep MHKA error string on one line in new and existing pr_err calls] Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-05-27Merge tag 'platform-drivers-x86-v4.7-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86Linus Torvalds1-3/+40
Pull x86 platform driver updates from Darren Hart: "Mostly minor updates and cleanups. One new power management controller driver for Intel Core SoCs. platform/x86: - Add PMC Driver for Intel Core SoC dell-rbtn: - Ignore ACPI notifications if device is suspended thinkpad_acpi: - save kbdlight state on suspend and restore it on resume intel_menlow: - reduce code duplication asus-wmi: - provide access to ALS control ideapad-laptop: - add a new WMI string for ESC key surfacepro3_button: - Add a warning when switching to tablet mode sony-laptop: - Avoid oops on module unload for older laptops intel_telemetry: - Constify telemetry_core_ops structures fujitsu-laptop: - Use IS_ENABLED() instead of checking for built-in or module asus-laptop: - correct error handling in sysfs_acpi_set - remove redundant initializers - correct error handling in asus_read_brightness() fujitsu-laptop: - Support radio LED" * tag 'platform-drivers-x86-v4.7-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: platform/x86: Add PMC Driver for Intel Core SoC dell-rbtn: Ignore ACPI notifications if device is suspended thinkpad_acpi: save kbdlight state on suspend and restore it on resume intel_menlow: reduce code duplication asus-wmi: provide access to ALS control ideapad-laptop: add a new WMI string for ESC key surfacepro3_button: Add a warning when switching to tablet mode sony-laptop: Avoid oops on module unload for older laptops intel_telemetry: Constify telemetry_core_ops structures fujitsu-laptop: Use IS_ENABLED() instead of checking for built-in or module asus-laptop: correct error handling in sysfs_acpi_set asus-laptop: remove redundant initializers asus-laptop: correct error handling in asus_read_brightness() fujitsu-laptop: Support radio LED
2016-05-27thinkpad_acpi: save kbdlight state on suspend and restore it on resumeMarco Trevisan (Treviño)1-3/+40
Override default LED class suspend/resume handles, by keeping track of the brightness level before suspending so that it can be automatically restored on resume by calling default resume handler. Signed-off-by: Marco Trevisan (Treviño) <mail@3v1n0.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-04-15thinkpad_acpi: Silence an uninitialized variable warningDan Carpenter1-1/+3
If fan_get_status() fails then "s" is not initialized. Tweak the error handling a bit to silence this warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-03-23thinkpad_acpi: Remove ambiguous logging for "Unsupported brightness interface"Eric Curtin1-3/+1
"Unsupported brightness interface" message gets logged on machines that are well supported. Signed-off-by: Eric Curtin <ericcurtin17@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-01-20Merge tag 'pm+acpi-4.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds1-1/+1
Pull more power management and ACPI updates from Rafael Wysocki: "This includes fixes on top of the previous batch of PM+ACPI updates and some new material as well. From the new material perspective the most significant are the driver core changes that should allow USB devices to stay suspended over system suspend/resume cycles if they have been runtime-suspended already beforehand. Apart from that, ACPICA is updated to upstream revision 20160108 (cosmetic mostly, but including one fixup on top of the previous ACPICA update) and there are some devfreq updates the didn't make it before (due to timing). A few recent regressions are fixed, most importantly in the cpuidle menu governor and in the ACPI backlight driver and some x86 platform drivers depending on it. Some more bugs are fixed and cleanups are made on top of that. Specifics: - Modify the driver core and the USB subsystem to allow USB devices to stay suspended over system suspend/resume cycles if they have been runtime-suspended already beforehand and fix some bugs on top of these changes (Tomeu Vizoso, Rafael Wysocki). - Update ACPICA to upstream revision 20160108, including updates of the ACPICA's copyright notices, a code fixup resulting from a regression fix that was necessary in the upstream code only (the regression fixed by it has never been present in Linux) and a compiler warning fix (Bob Moore, Lv Zheng). - Fix a recent regression in the cpuidle menu governor that broke it on practically all architectures other than x86 and make a couple of optimizations on top of that fix (Rafael Wysocki). - Clean up the selection of cpuidle governors depending on whether or not the kernel is configured for tickless systems (Jean Delvare). - Revert a recent commit that introduced a regression in the ACPI backlight driver, address the problem it attempted to fix in a different way and revert one more cosmetic change depending on the problematic commit (Hans de Goede). - Add two more ACPI backlight quirks (Hans de Goede). - Fix a few minor problems in the core devfreq code, clean it up a bit and update the MAINTAINERS information related to it (Chanwoo Choi, MyungJoo Ham). - Improve an error message in the ACPI fan driver (Andy Lutomirski). - Fix a recent build regression in the cpupower tool (Shreyas Prabhu)" * tag 'pm+acpi-4.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) cpuidle: menu: Avoid pointless checks in menu_select() sched / idle: Drop default_idle_call() fallback from call_cpuidle() cpupower: Fix build error in cpufreq-info cpuidle: Don't enable all governors by default cpuidle: Default to ladder governor on ticking systems time: nohz: Expose tick_nohz_enabled ACPICA: Update version to 20160108 ACPICA: Silence a -Wbad-function-cast warning when acpi_uintptr_t is 'uintptr_t' ACPICA: Additional 2016 copyright changes ACPICA: Reduce regression fix divergence from upstream ACPICA ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Satellite R830 ACPI / video: Revert "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()" ACPI / video: Document acpi_video_handles_brightness_key_presses() a bit ACPI / video: Fix using an uninitialized mutex / list_head in acpi_video_handles_brightness_key_presses() ACPI / video: Revert "ACPI / video: driver must be registered before checking for keypresses" ACPI / fan: Improve acpi_device_update_power error message ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Portege R700 cpuidle: menu: Fix menu_select() for CPUIDLE_DRIVER_STATE_START == 0 MAINTAINERS: Add devfreq-event entry MAINTAINERS: Add missing git repository and directory for devfreq ...
2016-01-19Merge tag 'platform-drivers-x86-v4.5-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86Linus Torvalds1-0/+206
Pull x86 platform driver updates from Darren Hart: "Add intel punit and telemetry driver for APL SoCs. Add intel-hid driver for various laptop hotkey support. Add asus-wireless radio control driver. Keyboard backlight support/improvements for ThinkPads, Vaio, and Toshiba. Several hotkey related fixes and improvements for dell and toshiba. Fix oops on dual GPU Macs in apple-gmux. A few new device IDs and quirks. Various minor config related build issues and cleanups. surface pro 4: - fix compare_const_fl.cocci warnings - Add support for Surface Pro 4 Buttons platform/x86: - Add Intel Telemetry Debugfs interfaces - Add Intel telemetry platform device - Add Intel telemetry platform driver - Add Intel Telemetry Core Driver - add NULL check for input parameters - add Intel P-Unit mailbox IPC driver - update acpi resource structure for Punit thinkpad_acpi: - Add support for keyboard backlight dell-wmi: - Process only one event on devices with interface version 0 - Check if Dell WMI descriptor structure is valid - Improve unknown hotkey handling - Use a C99-style array for bios_to_linux_keycode tc1100-wmi: - fix build warning when CONFIG_PM not enabled asus-wireless: - Add ACPI HID ATK4001 - Add Asus Wireless Radio Control driver asus-wmi: - drop to_platform_driver macro intel-hid: - new hid event driver for hotkeys sony-laptop: - Keyboard backlight control for some Vaio Fit models ideapad-laptop: - Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list apple-gmux: - Assign apple_gmux_data before registering toshiba_acpi: - Add rfkill dependency to ACPI_TOSHIBA entry - Fix keyboard backlight sysfs entries not being updated - Add WWAN RFKill support - Add support for WWAN devices - Fix blank screen at boot if transflective backlight is supported - Propagate the hotkey value via genetlink toshiba_bluetooth: - Add missing newline in toshiba_bluetooth_present function" * tag 'platform-drivers-x86-v4.5-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (29 commits) surface pro 4: fix compare_const_fl.cocci warnings surface pro 4: Add support for Surface Pro 4 Buttons platform:x86: Add Intel Telemetry Debugfs interfaces platform:x86: Add Intel telemetry platform device platform:x86: Add Intel telemetry platform driver platform/x86: Add Intel Telemetry Core Driver intel_punit_ipc: add NULL check for input parameters thinkpad_acpi: Add support for keyboard backlight dell-wmi: Process only one event on devices with interface version 0 dell-wmi: Check if Dell WMI descriptor structure is valid tc1100-wmi: fix build warning when CONFIG_PM not enabled asus-wireless: Add ACPI HID ATK4001 platform/x86: Add Asus Wireless Radio Control driver asus-wmi: drop to_platform_driver macro intel-hid: new hid event driver for hotkeys Keyboard backlight control for some Vaio Fit models platform/x86: Add rfkill dependency to ACPI_TOSHIBA entry platform:x86: add Intel P-Unit mailbox IPC driver intel_pmc_ipc: update acpi resource structure for Punit ideapad-laptop: Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list ...
2016-01-19thinkpad_acpi: Add support for keyboard backlightPali Rohár1-0/+206
This patch adds support for controlling keyboard backlight via standard linux led class interface (::kbd_backlight). It uses ACPI HKEY device with MLCG and MLCS methods. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Fabio D'Urso <fabiodurso@hotmail.it> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-01-01thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()Hans de Goede1-1/+1
Use the new acpi_video_handles_brightness_key_presses function to check if we should report brightness key-presses. This makes the code both easier to read and makes it properly report key-presses when acpi-video is not reporting them for reasons other then the backlight type being vendor. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-06thinkpad_acpi: Don't yell on unsupported brightness interfacesDavid Herrmann1-2/+1
The thinkpad_acpi driver currently emits error messages on unsupported brightness interfaces, giving the impression that someone will implement those. However, this error is spit out on nearly every thinkpad in production since 2 years now. Furthermore, the backlight interfaces on those devices are supported by the i915 driver just fine. Downgrade the error message to a normal pr_info() and stop telling people to report it to IBM. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-28thinkpad_acpi: Remove side effects from vdbg_printk -> no_printk macroJoe Perches1-1/+1
vdbg_printk when not using CONFIG_THINKPAD_ACPI_DEBUG uses no_printk which produces no logging output but always evaluates arguments. Change the macro to surround the no_printk call with do { if (0) no_printk(...); } while (0) to avoid the unnecessary argument evaluations. $ size drivers/platform/x86/thinkpad_acpi.o* text data bss dec hex filename 60918 6184 824 67926 10956 drivers/platform/x86/thinkpad_acpi.o.new 60927 6184 824 67935 1095f drivers/platform/x86/thinkpad_acpi.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-06-19thinkpad-acpi: Port to new backlight interface selection APIHans de Goede1-2/+3
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-20thinkpad_acpi: Revert unintentional device attribute renamingBjørn Mork1-18/+19
The conversion to DEVICE_ATTR_* macros failed to fixup a few cases where the old attribute names didn't match the show/store function names. Instead of renaming the functions, the attributes were renamed. This caused an unintentional API change. The hwmon required 'name' attribute were among the renamed attribute, causing libsensors to fail to detect the hwmon device at all. Fix by using the DEVICE_ATTR macro for these attributes, allowing the show/store functions to keep their system specific prefixes. Fixes: b4dd04ac6ef8 ("thinkpad_acpi: use DEVICE_ATTR_* macros") Cc: Bastien Nocera <hadess@hadess.net> Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-05-05thinkpad_acpi: Fix warning for static not at beginningJean Delvare1-1/+1
Fix the following warning: warning: "static" is not at beginning of declaration void static hotkey_mask_warn_incomplete_mask(void) ^ Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Darren Hart <dvhart@infradead.org> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-03-14thinkpad_acpi: off by one in adaptive_keyboard_hotkey_notify_hotkey()Dan Carpenter1-2/+3
This should be >= instead of > because otherwise we read one element past the end of the hotkey_keycode_map[] array. The hotkey_keycode_map[] array has TPACPI_HOTKEY_MAP_LEN elements. Fixes: 6a68d8557084 ('thinkpad_acpi: Add support for more adaptive kbd buttons') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-By: Bastien Nocera <hadess@hadess.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-03-14thinkpad_acpi: signedness bugs getting current_modeDan Carpenter1-2/+2
This needs to be signed for the error handling to work. Valid modes are small positive integers. Fixes: b790ceeb0fd9 ('thinkpad_acpi: Add adaptive_kbd_mode sysfs attr') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-By: Bastien Nocera <hadess@hadess.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-03-03thinkpad_acpi: use DEVICE_ATTR_* macrosBastien Nocera1-52/+20
Use the DEVICE_ATTR_* macros to reduce boiler plate. Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-03-03thinkpad_acpi: Add support for more adaptive kbd buttonsBastien Nocera1-1/+79
This commit adds new elements to the ThinkPad keymaps, and will send key events for keys for which an input.h declaration exists. Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Henrique de Moraes Holschuh <hmh@hyymh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-03-03thinkpad_acpi: Add adaptive_kbd_mode sysfs attrBastien Nocera1-9/+60
Add a sysfs attribute to allow privileged users to change the keyboard mode. This could be used by desktop environments to change the keyboard mode depending on the application focused, as the Windows application does. Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-03-03thinkpad_acpi: Factor out get/set adaptive kbd modeBastien Nocera1-23/+38
Move the getting/setting of the adaptive keyboard mode to separate functions, so that we can reuse them later through sysfs attributes. Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-03-03thinkpad_acpi: Remember adaptive kbd presenceBastien Nocera1-19/+18
Rather than checking on each suspend and resume whether the laptop has an adaptive keyboard, check when the driver is initialised. Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-02-11thinkpad_acpi: support new BIOS version string patternAdam Lee1-3/+17
Latest ThinkPad models use a new string pattern of BIOS version, thinkpad_acpi won't be loaded automatically without this fix. Signed-off-by: Adam Lee <adam.lee@canonical.com> Intentatation cleanup. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-02-10thinkpad_acpi: unhandled hkey eventXavier Naveira1-0/+2
Pressing Fn+Esc in a Lenovo Thinkpad x240 to lock the Fn keys generates an unhandled hkey event Signed-off-by: Xavier Naveira <xnaveira@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-02-06thinkpad_acpi.c: Fix sparse warning (make undeclared var static)Lad, Prabhakar1-1/+1
Fix the following sparse warning: thinkpad_acpi.c:3459:11: warning: symbol 'adaptive_keyboard_modes' was not declared. Should it be static? Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-12-18Merge tag 'platform-drivers-x86-v3.19-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86Linus Torvalds1-10/+106
Pull x86 platform driver update from Darren Hart: - thinkpad-acpi: Switch to software mute, cleanups - acerhdf: Bang-bang thermal governor, new models, cleanups - dell-laptop: New keyboard backlight support and documentation - toshiba_acpi: Keyboard backlight updates, hotkey handling - dell-wmi: Keypress filtering, WMI event processing - eeepc-laptop: Multiple cleanups, improved error handling, documentation - hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails - misc: Code cleanups, quirks, various new IDs * tag 'platform-drivers-x86-v3.19-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (33 commits) platform/x86/acerhdf: Still depends on THERMAL Documentation: Add entry for dell-laptop sysfs interface acpi: Remove _OSI(Linux) for ThinkPads thinkpad-acpi: Try to use full software mute control acerhdf: minor clean up acerhdf: added critical trip point acerhdf: Use bang-bang thermal governor acerhdf: Adding support for new models acerhdf: Adding support for "manual mode" dell-smo8800: Add more ACPI ids and change description of driver platform: x86: dell-laptop: Add support for keyboard backlight toshiba_acpi: Add keyboard backlight mode change event toshiba_acpi: Change notify funtion to handle more events toshiba_acpi: Move hotkey enabling code to its own function dell-wmi: Don't report keypresses on keybord illumination change dell-wmi: Don't report keypresses for radio state changes hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails toshiba-acpi: Add missing ID (TOS6207) Sony-laptop: Deletion of an unnecessary check before the function call "pci_dev_put" platform: x86: Deletion of checks before backlight_device_unregister() ...