- 14 4月, 2017 9 次提交
-
-
由 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>
-
- 24 3月, 2017 6 次提交
-
-
由 Michał Kępień 提交于
Both struct fujitsu_bl and struct fujitsu_laptop have a pf_device field. Up until now the latter has been redundant, which is logically incorrect because the primary function of the platform device created by fujitsu-laptop is to provide laptop-related (not brightness-related) attributes to userspace. Remove the pf_device field from struct fujitsu_bl and make all module code use the pf_device field of struct fujitsu_laptop instead. Suggested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
The platform device registered by fujitsu-laptop is registered unconditionally while sysfs attributes attached to it depend on the FUJ02E3 ACPI device being present. Fix this by moving platform device creation and removal to acpi_fujitsu_laptop_add() and acpi_fujitsu_laptop_remove(), respectively. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Platform device handling adds a lot of complexity to fujitsu_init(), which hinders its readability. Extract code responsible for adding and removing the platform device to separate functions. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Use the DEVICE_ATTR_RO() macro to get rid of ignore_store() and shorten attribute definitions. Adjust whitespace to make checkpatch happy. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Michał Kępień 提交于
Setting backlight level using a vendor-specific interface should only be possible when using the latter is either explicitly requested by the user or automatically selected by the kernel. fujitsu-laptop violates that premise by unconditionally attaching three backlight-related attributes to the platform device it registers. Remove the offending attributes from the platform device. Update module comments to reflect this change. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Tested-by: NJonathan Woithe <jwoithe@just42.net> Reviewed-by: NJonathan Woithe <jwoithe@just42.net> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
由 Pau Espin Pedrol 提交于
Otherwise those are printed several times when (un)plugging the AC connector. Signed-off-by: NPau Espin Pedrol <pespin.shar@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
-
- 15 3月, 2017 25 次提交
-
-
由 Michał Kępień 提交于
devm_input_allocate_device() already causes the supplied struct device to be set as the parent of the input device, so doing it again is redundant. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NAlex Hung <alex.hung@canonical.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces acpi_pcc_destroy_input() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces msi_laptop_input_destroy() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces dell_wmi_input_destroy() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Michał Kępień 提交于
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Darren Hart 提交于
Merge branch 'ib/4.10-sparse-keymap-managed' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input into testing
-
由 Michał Kępień 提交于
Error labels currently used in fujitsu_init() are really hard to follow: some (fail_laptop) indicate which operation has failed, others (fail_sysfs_group) indicate where unrolling should start and the rest (fail_platform_driver) is simply confusing. Change them to follow the pattern used throughout the rest of the module, i.e. make every label indicate the first unrolling operation it leads to. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NJonathan Woithe <jwoithe@just42.net>
-
由 Michał Kępień 提交于
As the backlight device registered by fujitsu-laptop relies on the FUJ02B1 ACPI device being present, only register the backlight device once that ACPI device is detected. Suggested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NJonathan Woithe <jwoithe@just42.net>
-
由 Michał Kępień 提交于
Registering an ACPI driver does not mean the device it handles has to exist. As the code which syncs backlight power status uses call_fext_func(), it needs the FUJ02E3 ACPI device to be present, so ensure that code is only run once the FUJ02E3 device is detected. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NJonathan Woithe <jwoithe@just42.net>
-
由 Michał Kępień 提交于
Move code responsible for backlight device registration to a separate function in order to simplify error handling and decrease indentation. Simplify initialization of struct backlight_properties. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NJonathan Woithe <jwoithe@just42.net>
-
由 Michał Kępień 提交于
Returning early when there is no brightness change allows removal of a duplicate code block, makes the purpose of the following code clearer and allows the condition surrounding key event generation to be removed. Local integer variables can also be declared in a single line. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NJonathan Woithe <jwoithe@just42.net>
-
由 Michał Kępień 提交于
acpi_fujitsu_bl_notify() is pretty deeply nested, which hurts readability. Strip off one level of indentation by returning early when the event code supplied as argument is not ACPI_FUJITSU_NOTIFY_CODE1. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-and-tested-by: NJonathan Woithe <jwoithe@just42.net>
-
由 Sven Rebhan 提交于
Like other Lenovo models the IdeaPad 310-15IKB does not have an hw rfkill switch. This results in hard-blocked radios after boot, resulting in always blocked radios rendering them unusable. Add the IdeaPad 310-15IKB to the no_hw_rfkill DMI list and allows using the built-in radios. Signed-off-by: NSven Rebhan <Sven.Rebhan@googlemail.com> [andy: massaged commit message] Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Christian Kellner 提交于
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: NChristian Kellner <ckellner@redhat.com> Reviewed-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>
-
由 Christian Kellner 提交于
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: NChristian Kellner <ckellner@redhat.com> Reviewed-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>
-