- 25 2月, 2017 3 次提交
-
-
由 Hans de Goede 提交于
platform/x86: thinkpad_acpi: Call led_classdev_notify_brightness_hw_changed 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: NHans de Goede <hdegoede@redhat.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NPavel Machek <pavel@ucw.cz>
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NPavel Machek <pavel@ucw.cz>
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NPavel Machek <pavel@ucw.cz>
-
- 25 12月, 2016 1 次提交
-
-
由 Linus Torvalds 提交于
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: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 16 12月, 2016 1 次提交
-
-
由 Darren Hart 提交于
linux-next reported in_tablet_mode and type may be used uninitialized after: b3180028 ("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: NDarren Hart <dvhart@linux.intel.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Lyude <lyude@redhat.com>
-
- 14 12月, 2016 5 次提交
-
-
由 Tobias Klauser 提交于
Fix an [-Wold-style-declaration] GCC warning by moving the inline keyword before the return type. Signed-off-by: NTobias Klauser <tklauser@distanz.ch> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Hui Wang 提交于
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: NHui Wang <hui.wang@canonical.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Lyude 提交于
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: NDaniel Martin <consume.noise@gmail.com> Signed-off-by: NLyude <lyude@redhat.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Lyude 提交于
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: NLyude <lyude@redhat.com> Cc: Daniel Martin <consume.noise@gmail.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Axel Lin 提交于
Use ACPI_FAILURE() to replace !ACPI_SUCCESS(), this avoid !! operations. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
- 09 6月, 2016 1 次提交
-
-
由 Dennis Wassenberg 提交于
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: NDennis Wassenberg <dennis.wassenberg@secunet.com> Signed-off-by: NLyude <cpaul@redhat.com> Tested-by: NLyude <cpaul@redhat.com> Tested-by: NMarco Trevisan <marco@ubuntu.com> Acked-by: NHenrique 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: NDarren Hart <dvhart@linux.intel.com>
-
- 28 5月, 2016 1 次提交
-
-
由 Marco Trevisan (Treviño) 提交于
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: NMarco Trevisan (Treviño) <mail@3v1n0.net> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 15 4月, 2016 1 次提交
-
-
由 Dan Carpenter 提交于
If fan_get_status() fails then "s" is not initialized. Tweak the error handling a bit to silence this warning. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 24 3月, 2016 1 次提交
-
-
由 Eric Curtin 提交于
"Unsupported brightness interface" message gets logged on machines that are well supported. Signed-off-by: NEric Curtin <ericcurtin17@gmail.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 20 1月, 2016 1 次提交
-
-
由 Pali Rohár 提交于
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: NPali Rohár <pali.rohar@gmail.com> Tested-by: NFabio D'Urso <fabiodurso@hotmail.it> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 16 1月, 2016 1 次提交
-
-
由 Hans de Goede 提交于
acpi_video_handles_brightness_key_presses()'s may return false if the i915 driver is not loaded yet when thinkpad_acpi loads, and then return true after the i915 driver has loaded. This means that thinkpad_acpi cannot use it as is since thinkpad_acpi caches the return value. This reverts commit 7714687a ("thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()"). Fixes: 7714687a "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()" Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NDarren Hart <dvhart@linux.intel.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 01 1月, 2016 1 次提交
-
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 07 11月, 2015 1 次提交
-
-
由 David Herrmann 提交于
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: NDavid Herrmann <dh.herrmann@gmail.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 29 8月, 2015 1 次提交
-
-
由 Joe Perches 提交于
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: NJoe Perches <joe@perches.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 19 6月, 2015 1 次提交
-
-
由 Hans de Goede 提交于
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: NDarren Hart <dvhart@linux.intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 20 5月, 2015 1 次提交
-
-
由 Bjørn Mork 提交于
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: b4dd04ac ("thinkpad_acpi: use DEVICE_ATTR_* macros") Cc: Bastien Nocera <hadess@hadess.net> Signed-off-by: NBjørn Mork <bjorn@mork.no> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 06 5月, 2015 1 次提交
-
-
由 Jean Delvare 提交于
Fix the following warning: warning: "static" is not at beginning of declaration void static hotkey_mask_warn_incomplete_mask(void) ^ Signed-off-by: NJean Delvare <jdelvare@suse.de> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Darren Hart <dvhart@infradead.org> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 15 3月, 2015 2 次提交
-
-
由 Dan Carpenter 提交于
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: 6a68d855 ('thinkpad_acpi: Add support for more adaptive kbd buttons') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-By: NBastien Nocera <hadess@hadess.net> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Dan Carpenter 提交于
This needs to be signed for the error handling to work. Valid modes are small positive integers. Fixes: b790ceeb ('thinkpad_acpi: Add adaptive_kbd_mode sysfs attr') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-By: NBastien Nocera <hadess@hadess.net> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 04 3月, 2015 5 次提交
-
-
由 Bastien Nocera 提交于
Use the DEVICE_ATTR_* macros to reduce boiler plate. Signed-off-by: NBastien Nocera <hadess@hadess.net> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Bastien Nocera 提交于
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: NBastien Nocera <hadess@hadess.net> Reviewed-by: NHenrique de Moraes Holschuh <hmh@hyymh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Bastien Nocera 提交于
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: NBastien Nocera <hadess@hadess.net> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Bastien Nocera 提交于
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: NBastien Nocera <hadess@hadess.net> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Bastien Nocera 提交于
Rather than checking on each suspend and resume whether the laptop has an adaptive keyboard, check when the driver is initialised. Signed-off-by: NBastien Nocera <hadess@hadess.net> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 12 2月, 2015 1 次提交
-
-
由 Adam Lee 提交于
Latest ThinkPad models use a new string pattern of BIOS version, thinkpad_acpi won't be loaded automatically without this fix. Signed-off-by: NAdam Lee <adam.lee@canonical.com> Intentatation cleanup. Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 11 2月, 2015 1 次提交
-
-
由 Xavier Naveira 提交于
Pressing Fn+Esc in a Lenovo Thinkpad x240 to lock the Fn keys generates an unhandled hkey event Signed-off-by: NXavier Naveira <xnaveira@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 07 2月, 2015 1 次提交
-
-
由 Lad, Prabhakar 提交于
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: NLad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 04 12月, 2014 1 次提交
-
-
由 Andy Lutomirski 提交于
ThinkPads have hardware volume controls and three buttons to control them. (These are separate from the standard mixer.) By default, the buttons are: - Mute: Mutes the hardware volume control and, on some models, generates KEY_MUTE. - Up: Unmutes, generates KEY_VOLUMEUP, and increases volume if applicable. (Newer thinkpads only have hardware mute/unmute.) - Down: Unmutes, generates KEY_VOLUMEDOWN, and decreases volume if applicable. This behavior is unfortunate, since modern userspace will also handle the hotkeys and change the other mixer. If the software mixer is muted and the hardware mixer is unmuted and you push mute, hilarity ensues as they both switch state. Rather than adding a lot of complex ALSA integration to fix this, just disable the special ThinkPad volume controls when possible. This turns the mute and volume buttons into regular buttons, and standard software controls will work as expected. ALSA already knows about the mute light on models with a mute light, so everything should just work. This should also allow us to remove _OSI(Linux) for all ThinkPads. For future reference: It turns out that we can ask ACPI for one of three behaviors directly on very new models. They are "latch" (the default), "none" (no automatic control), and "toggle" (mute unmutes when muted). All of the modes besides "none" seem to be a bit buggy, though, and there doesn't seem to be a consistent way to get any notification when the HW mute state is changed. Signed-off-by: NAndy Lutomirski <luto@mit.edu> Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 14 10月, 2014 1 次提交
-
-
由 Rasmus Villemoes 提交于
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Darren Hart <dvhart@infradead.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 18 9月, 2014 1 次提交
-
-
由 Jan van den Berg 提交于
Fixed 22 similar coding style issues: "ERROR: spaces required around that '?'" Signed-off-by: NJan van den Berg <janvdberg@gmail.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 16 8月, 2014 3 次提交
-
-
由 Mathias Krause 提交于
Mark volume_alsa_control_vol and volume_alsa_control_mute as __initdata, as snd_ctl_new1() will copy the relevant parts, so there is no need to keep the master copies around after initialization. Signed-off-by: NMathias Krause <minipli@googlemail.com> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
-
由 Andrey Utkin 提交于
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80231Reported-by: NDavid Binderman <dcb314@hotmail.com> Signed-off-by: NAndrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
-
由 Hans de Goede 提交于
The new keyboard found on the *40 models is also being sold as a standalone keyboard (with trackpoint): http://shop.lenovo.com/us/en/itemdetails/0B47189/460/60AC6A0372B14F5BA7B12F1FF88E33C7 This uses a standard HUT code for the F12 key with the 6 square boxes on it, which gets mapped to KEY_FILE by the kernel. Change the mapping done of identical laptop key done by thinkpad_acpi to also send KEY_FILE for consistency. Cc: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
-
- 11 6月, 2014 1 次提交
-
-
由 Hans de Goede 提交于
The T440s user guide says that when Fn-lock is not active, the *40s' F9 - F12 keys should be mapped to: control-panel, search, show-all-windows and Computer. These keys generate the sofar unused 28 - 31 hotkey scancodes. For the first 2 this nicely matches the icons on the keys, for the latter 2 the icons are somewhat creative, which is why I ended up looking them up in the user manual. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
-