- 14 4月, 2017 40 次提交
-
-
由 Alex Hung 提交于
The airplane mode button on Xiaomi's new laptops are the same as HP laptops. This is tested on Xiaomi Notebook Air 13. Signed-off-by: NAlex Hung <alex.hung@canonical.com> [dvhart: Dropped module init/exit info messages] Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Add touchscreen info for the Trekstor Surftab Wintron 7.0 ST70416-6 tablet. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
The dev field of struct fujitsu_bl is assigned in acpi_fujitsu_bl_add(), but never used afterwards. brightness_changed is set in get_lcd_level() and then its value is only printed in a debug message, so it does not influence execution flow. Remove both fields as they are redundant. Update the aforementioned debug message. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
The comment for the get_brightness backlight device callback in include/linux/backlight.h states that it should "return the current backlight brightness (accounting for power, fb_blank etc.)". fujitsu-laptop violates that premise by simply returning the value to which ACPI function GBLL evaluates to. Make sure 0 is returned when backlight power is turned off. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Any set_lcd_level() call can fail for one of two reasons: either requested brightness is outside the allowed range or the ACPI method used for setting brightness level is not available. For bl_update_status(), the first case is handled by backlight core, which means bl_update_status() will not even be called if requested brightness is outside the allowed range. The second case will be logged anyway by set_lcd_level() itself, so there is no point in generating another message in bl_update_status(). Remove the superfluous debug message along with a local variable that is now redundant. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Not all Fujitsu laptops support controlling backlight power through the FUJ02E3 ACPI device. Remove the debug message informing about a failed attempt to set backlight power as it may be confusing and the return value of call_fext_func() is logged anyway. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Due to the way the disable_brightness_adjust module parameter is currently handled in acpi_fujitsu_bl_add(), it can only be set to either 0 or 1, which effectively makes it a boolean. Emphasize that by changing module parameter type to bool. Do not announce parameter value in a debug message as it can be dynamically changed via sysfs and its current value can also be read from there. Clean up module parameter description. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
The value of each module parameter can be changed on the fly via sysfs. However, the current way of handling use_alt_lcd_levels prevents the user from dynamically switching from a value of 0 or 1 back to autodetection as the latter is only performed upon ACPI device instantiation. Fix this by moving autodetection (in a simplified form) to set_lcd_level() and changing module parameter type to int. Do not announce autodetection results in a debug message as current value of use_alt_lcd_levels can simply be read from sysfs. Clarify module parameter description. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
When using brightness keys and backlight device's sysfs interface alternately, an incorrect input event might be generated for a brightness key press. Consider the following sequence of events: 1. Set backlight brightness to 6 using brightness keys. 2. Write 4 to /sys/class/backlight/fujitsu-laptop/brightness. 3. Press the "brightness up" key. The input event generated in this scenario would be KEY_BRIGHTNESSDOWN, because before step 3 brightness_level would still be at 6. As the new brightness level is established using GBLL, it would evaluate to 5 (SBLL/SBL2 sets it to 4 in step 2 and pressing the "brightness up" key increases it by 1). This in turn would cause acpi_fujitsu_bl_notify() to observe a 6 -> 5 change, i.e. a decrease in brightness, while screen brightness would in fact be increased. Fix this by updating brightness_level in set_lcd_level. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
acpi_execute_simple_method() takes a method parameter which tells it to look for the given method underneath the given handle, so calling acpi_get_handle() beforehand is redundant. Replace the call to acpi_get_handle() with a call to acpi_execute_simple_method(), thus eliminating the need for a local variable storing the handle. Update debug message to reflect this change. Also do not assign a default value to status as it has no influence on execution flow. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Depending on the value of the use_alt_lcd_levels module parameter, one of two functions is used for setting LCD brightness level. These functions are almost identical and only differ in the name of the ACPI method they call. Instead of checking the value of use_alt_lcd_levels at each call site, move that check to set_lcd_level() and get rid of set_lcd_level_alt(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Use a managed backlight device to get rid of acpi_fujitsu_bl_remove(). Change the parent of the backlight device from NULL to the FUJ02B1 ACPI device as the latter is required for the backlight device to work. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
The backlight part of fujitsu-laptop is only used by laptops which are incapable of using the standard ACPI video interface for handling brightness changes. Conversely, on laptops which are capable of using the latter, no vendor-specific ACPI calls should be made unless explicitly requested by the user. Bail out immediately from acpi_fujitsu_bl_add() unless using the vendor-specific interface was either explicitly requested by the user or automatically selected by the kernel. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Update debug message logged when the acpi_evaluate_integer() call inside call_fext_func() fails so that it covers a broader set of possible errors. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Andy Shevchenko 提交于
A new call to SCU intel_scu_ipc_raw_command() writes SPTR and DPTR registers before sending a command. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
For better maintainability and readability introduce a macro for device ID table. No functional change intended. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
The driver is bound to the devices based on their PCI IDs. There is no need to do an additional check. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Device pointer is used as a flag that everything is prepared. Nevertheless the assignment happened quite before and there is a window when a caller can get weird results or even crashes since not all fields are initialized yet. Rearrange initialization sequence in ->probe() to prepare everything before use. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Fail ->probe() if there is no platform data supplied. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Dmitry Torokhov 提交于
There is no point in registering I2C bus notifier if DMI data does not match. Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> [andy: updated due to previous patch changed] Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Dmitry Torokhov 提交于
I2C bus has both i2c clients and adapter devices, so we must be careful in notifier code and verify that we are actually dealing with an i2c client before using it as such. Fixes: cef9dd85 ("platform/x86: add support for devices with Silead...") Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> [andy: simplified silead_ts_dmi_add_props() change] Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Santeri Toivonen 提交于
Asus laptop X302UA starts up with Wi-Fi disabled, without a way to enable it. Set wapf=4 to fix the problem. Signed-off-by: NSanteri Toivonen <santeri.toivonen@vatsul.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Rename call_fext_func() arguments so that each argument's name signifies its role: - cmd -> func: sub-function to call (flags, buttons etc.), - arg0 -> op: operation to perform (get, set, get capabilities etc.), - arg1 -> feature: feature to act on (e.g. which LED), if relevant, - arg2 -> state: state to set (e.g. LED on or off), if relevant. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
acpi_evaluate_integer() takes a pathname parameter which contains the name of the entity to evaluate underneath the given handle, so calling acpi_get_handle() beforehand is redundant. Replace the call to acpi_get_handle() with a call to acpi_evaluate_integer(), thus eliminating the need for a local variable storing the handle. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Set values of FUNC call parameters in a designated initializer. Do not initialize status and handle variables as the values these are initialized to have no influence on execution flow. Use an array variable instead of the address of the first element of that array. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Remove the keycode[1-5] fields from struct fujitsu_bl as they are not needed any more as a result of the sparse keymap migration. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Some laptop models need to have different keycodes assigned to hotkey scancodes. Change the sparse keymap upon a DMI match, before the hotkey input device is setup. Instead of using three different callbacks in the DMI match table, simplify code by using the driver_data field of struct dmi_system_id to supply the requested keymap to a common callback. Also merge keymaps for S6410 and S6420 as they are identical. Rename fujitsu_dmi_table to fujitsu_laptop_dmi_table to emphasize it is no longer used by the backlight part of fujitsu-laptop. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify hotkey event generation by using a sparse keymap. As sparse keymap operates on scancodes instead of keycodes, adjust variable names and debug messages accordingly. This patch only handles the default keymap for clarity. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> [dvhart: correct flag passed to call_fext_func in acpi_fujitsu_laptop_notify] Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Use a managed input device for hotkey events in order to simplify two error paths and one cleanup function while also reducing the number of local variables required. Remove double assignment to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify error handling in acpi_fujitsu_laptop_add() by moving code responsible for setting up the input device to a separate function. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify brightness key event generation by using a sparse keymap. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Use a managed input device for brightness events in order to simplify two error paths and one cleanup function while also reducing the number of local variables required. Remove double assignment to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Simplify error handling in acpi_fujitsu_bl_add() by moving code responsible for setting up the input device to a separate function. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Darren Hart 提交于
Merge branch 'dell-laptop-changes-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git to avoid linux-next merge conflict with dell-laptop.c. Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Add an entry providing the necessary info to make the touchscreen work on various tablets based on the Insyde 7W whitebox tablet. This has been tested on a DEXP Ursus 7W tablet. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Now that device_add_properties takes a const property_entry * rather then a non-const one we can constify the properties arrays. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Make dell-wmi notify on hotkey kbd brightness changes, listen for this in dell-laptop and call led_classdev_notify_brightness_hw_changed. 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: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
The kbd led code has multiple entry points each of which modifies the kbd_state by reading it, modifying a copy, writing the copy and on error setting the modified copy writing back the original state. This is racy, so add a mutex protection the read-modify-write cycle on each of the entry points. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
Return -EINVAL immediately on invalid input, rather then doing the straight path in an if block and returning -EINVAL at the end of the function. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Hans de Goede 提交于
There are several cases where events handled in one of the dell-* drivers need to be propagated to another dell-* driver. This commit adds 3 generic functions: dell_laptop_register_notifier() dell_laptop_unregister_notifier() dell_laptop_call_notifier() It currently only defines 1 action: DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED Which is intended to propagate kbd_backlight_brightness_changed wmi events from dell-wmi to dell-laptop (which contains the actual kbd backlight driver). These functions are put in dell-smbios as both dell-wmi and dell-laptop use smbios functions and I do not want to put the notifier head in either driver, as that will make the 2 drivers depend on each other. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-