* [PATCH 0/2] toshiba_acpi: Hotkey updates @ 2015-09-09 17:28 Azael Avalos 2015-09-09 17:28 ` [PATCH 1/2] toshiba_acpi: Unify hotkey enabling functions Azael Avalos 2015-09-09 17:28 ` [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value Azael Avalos 0 siblings, 2 replies; 8+ messages in thread From: Azael Avalos @ 2015-09-09 17:28 UTC (permalink / raw) To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Azael Avalos These two patches make some changes to the hotkeys code, the first patch unify the hotkey enabling code, and the second changes the default hotkey enabling parameter. Azael Avalos (2): toshiba_acpi: Unify hotkey enabling functions toshiba_acpi: Change default Hotkey enabling value drivers/platform/x86/toshiba_acpi.c | 38 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 25 deletions(-) -- 2.5.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] toshiba_acpi: Unify hotkey enabling functions 2015-09-09 17:28 [PATCH 0/2] toshiba_acpi: Hotkey updates Azael Avalos @ 2015-09-09 17:28 ` Azael Avalos 2015-09-18 21:36 ` Darren Hart 2015-09-09 17:28 ` [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value Azael Avalos 1 sibling, 1 reply; 8+ messages in thread From: Azael Avalos @ 2015-09-09 17:28 UTC (permalink / raw) To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Azael Avalos Currently the driver has two functions enabling hotkeys support, but these two functions can be merged into one. This patch merges these two functions, moving some checks to the *enable_hotkeys function, simplifying code in the process. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> --- drivers/platform/x86/toshiba_acpi.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index f2372f4..5510d3f 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -198,6 +198,7 @@ struct toshiba_acpi_dev { unsigned int panel_power_on_supported:1; unsigned int usb_three_supported:1; unsigned int sysfs_created:1; + unsigned int special_functions; bool kbd_led_registered; bool illumination_led_registered; @@ -2253,7 +2254,16 @@ static int toshiba_acpi_enable_hotkeys(struct toshiba_acpi_dev *dev) if (ACPI_FAILURE(status)) return -ENODEV; - result = hci_write(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE); + /* + * Enable the "Special Functions" mode only if they are + * supported and if they are activated. + */ + if (dev->kbd_function_keys_supported && dev->special_functions) + result = hci_write(dev, HCI_HOTKEY_EVENT, + HCI_HOTKEY_SPECIAL_FUNCTIONS); + else + result = hci_write(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE); + if (result == TOS_FAILURE) return -EIO; else if (result == TOS_NOT_SUPPORTED) @@ -2262,20 +2272,6 @@ static int toshiba_acpi_enable_hotkeys(struct toshiba_acpi_dev *dev) return 0; } -static void toshiba_acpi_enable_special_functions(struct toshiba_acpi_dev *dev) -{ - u32 result; - - /* - * Re-activate the hotkeys, but this time, we are using the - * "Special Functions" mode. - */ - result = hci_write(dev, HCI_HOTKEY_EVENT, - HCI_HOTKEY_SPECIAL_FUNCTIONS); - if (result != TOS_SUCCESS) - pr_err("Could not enable the Special Function mode\n"); -} - static bool toshiba_acpi_i8042_filter(unsigned char data, unsigned char str, struct serio *port) { @@ -2631,7 +2627,6 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev) { struct toshiba_acpi_dev *dev; const char *hci_method; - u32 special_functions; u32 dummy; int ret = 0; @@ -2673,7 +2668,7 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev) * with the new keyboard layout, query for its presence to help * determine the keymap layout to use. */ - ret = toshiba_function_keys_get(dev, &special_functions); + ret = toshiba_function_keys_get(dev, &dev->special_functions); dev->kbd_function_keys_supported = !ret; if (toshiba_acpi_setup_keyboard(dev)) @@ -2748,13 +2743,6 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev) print_supported_features(dev); - /* - * Enable the "Special Functions" mode only if they are - * supported and if they are activated. - */ - if (dev->kbd_function_keys_supported && special_functions) - toshiba_acpi_enable_special_functions(dev); - ret = sysfs_create_group(&dev->acpi_dev->dev.kobj, &toshiba_attr_group); if (ret) { -- 2.5.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] toshiba_acpi: Unify hotkey enabling functions 2015-09-09 17:28 ` [PATCH 1/2] toshiba_acpi: Unify hotkey enabling functions Azael Avalos @ 2015-09-18 21:36 ` Darren Hart 0 siblings, 0 replies; 8+ messages in thread From: Darren Hart @ 2015-09-18 21:36 UTC (permalink / raw) To: Azael Avalos; +Cc: platform-driver-x86, linux-kernel On Wed, Sep 09, 2015 at 11:28:19AM -0600, Azael Avalos wrote: > Currently the driver has two functions enabling hotkeys support, > but these two functions can be merged into one. > > This patch merges these two functions, moving some checks to the > *enable_hotkeys function, simplifying code in the process. > > Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Queued to testing for 4.4. Thanks Azael. -- Darren Hart Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value 2015-09-09 17:28 [PATCH 0/2] toshiba_acpi: Hotkey updates Azael Avalos 2015-09-09 17:28 ` [PATCH 1/2] toshiba_acpi: Unify hotkey enabling functions Azael Avalos @ 2015-09-09 17:28 ` Azael Avalos 2015-09-18 21:37 ` Darren Hart 1 sibling, 1 reply; 8+ messages in thread From: Azael Avalos @ 2015-09-09 17:28 UTC (permalink / raw) To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Azael Avalos The driver currently uses the hotkey enabling value of 0x09 to enable hotkey events, but windows uses a different value (0x01). All Toshiba laptops accept the following "hotkey" parameters: 0x01 - Enable hotkey and system events. 0x03 - Enable system events only. 0x09 - Enable hotkey events only. 0x0b - Disable (hotkey and system) events. This patch changes the default hotkey enabling value from 0x09 to 0x01, enabling both the hotkey and system events. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> --- drivers/platform/x86/toshiba_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 5510d3f..803e967 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -131,7 +131,7 @@ MODULE_LICENSE("GPL"); /* Field definitions */ #define HCI_ACCEL_MASK 0x7fff #define HCI_HOTKEY_DISABLE 0x0b -#define HCI_HOTKEY_ENABLE 0x09 +#define HCI_HOTKEY_ENABLE 0x01 #define HCI_HOTKEY_SPECIAL_FUNCTIONS 0x10 #define HCI_LCD_BRIGHTNESS_BITS 3 #define HCI_LCD_BRIGHTNESS_SHIFT (16-HCI_LCD_BRIGHTNESS_BITS) -- 2.5.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value 2015-09-09 17:28 ` [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value Azael Avalos @ 2015-09-18 21:37 ` Darren Hart 2015-09-18 21:45 ` Azael Avalos 0 siblings, 1 reply; 8+ messages in thread From: Darren Hart @ 2015-09-18 21:37 UTC (permalink / raw) To: Azael Avalos; +Cc: platform-driver-x86, linux-kernel On Wed, Sep 09, 2015 at 11:28:20AM -0600, Azael Avalos wrote: > The driver currently uses the hotkey enabling value of 0x09 to enable > hotkey events, but windows uses a different value (0x01). > > All Toshiba laptops accept the following "hotkey" parameters: > 0x01 - Enable hotkey and system events. > 0x03 - Enable system events only. > 0x09 - Enable hotkey events only. > 0x0b - Disable (hotkey and system) events. > > This patch changes the default hotkey enabling value from 0x09 to 0x01, > enabling both the hotkey and system events. > > Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Queued to testing for 4.4. Let me know if you were expecting 4.3.... -- Darren Hart Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value 2015-09-18 21:37 ` Darren Hart @ 2015-09-18 21:45 ` Azael Avalos 2015-09-18 22:14 ` Darren Hart 0 siblings, 1 reply; 8+ messages in thread From: Azael Avalos @ 2015-09-18 21:45 UTC (permalink / raw) To: Darren Hart; +Cc: platform-driver-x86, linux-kernel Hi Darren, 2015-09-18 15:37 GMT-06:00 Darren Hart <dvhart@infradead.org>: > On Wed, Sep 09, 2015 at 11:28:20AM -0600, Azael Avalos wrote: >> The driver currently uses the hotkey enabling value of 0x09 to enable >> hotkey events, but windows uses a different value (0x01). >> >> All Toshiba laptops accept the following "hotkey" parameters: >> 0x01 - Enable hotkey and system events. >> 0x03 - Enable system events only. >> 0x09 - Enable hotkey events only. >> 0x0b - Disable (hotkey and system) events. >> >> This patch changes the default hotkey enabling value from 0x09 to 0x01, >> enabling both the hotkey and system events. >> >> Signed-off-by: Azael Avalos <coproscefalo@gmail.com> > > Queued to testing for 4.4. > > Let me know if you were expecting 4.3.... Nope, just the first two fixes were meant for 4.3, the rest is 4.4 material, I just wanted to send them early. > > -- > Darren Hart > Intel Open Source Technology Center Cheers Azael -- -- El mundo apesta y vosotros apestais tambien -- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value 2015-09-18 21:45 ` Azael Avalos @ 2015-09-18 22:14 ` Darren Hart 2015-09-18 22:18 ` Azael Avalos 0 siblings, 1 reply; 8+ messages in thread From: Darren Hart @ 2015-09-18 22:14 UTC (permalink / raw) To: Azael Avalos; +Cc: platform-driver-x86, linux-kernel On Fri, Sep 18, 2015 at 03:45:05PM -0600, Azael Avalos wrote: > Hi Darren, > > 2015-09-18 15:37 GMT-06:00 Darren Hart <dvhart@infradead.org>: > > On Wed, Sep 09, 2015 at 11:28:20AM -0600, Azael Avalos wrote: > >> The driver currently uses the hotkey enabling value of 0x09 to enable > >> hotkey events, but windows uses a different value (0x01). > >> > >> All Toshiba laptops accept the following "hotkey" parameters: > >> 0x01 - Enable hotkey and system events. > >> 0x03 - Enable system events only. > >> 0x09 - Enable hotkey events only. > >> 0x0b - Disable (hotkey and system) events. > >> > >> This patch changes the default hotkey enabling value from 0x09 to 0x01, > >> enabling both the hotkey and system events. > >> > >> Signed-off-by: Azael Avalos <coproscefalo@gmail.com> > > > > Queued to testing for 4.4. > > > > Let me know if you were expecting 4.3.... > > Nope, just the first two fixes were meant for 4.3, the rest > is 4.4 material, I just wanted to send them early. OK, check mainline please, everything I plan to push for 4.3 is now there. Please confirm it has all you expected. -- Darren Hart Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value 2015-09-18 22:14 ` Darren Hart @ 2015-09-18 22:18 ` Azael Avalos 0 siblings, 0 replies; 8+ messages in thread From: Azael Avalos @ 2015-09-18 22:18 UTC (permalink / raw) To: Darren Hart; +Cc: platform-driver-x86, linux-kernel Hi Darren, 2015-09-18 16:14 GMT-06:00 Darren Hart <dvhart@infradead.org>: > On Fri, Sep 18, 2015 at 03:45:05PM -0600, Azael Avalos wrote: >> Hi Darren, >> >> 2015-09-18 15:37 GMT-06:00 Darren Hart <dvhart@infradead.org>: >> > On Wed, Sep 09, 2015 at 11:28:20AM -0600, Azael Avalos wrote: >> >> The driver currently uses the hotkey enabling value of 0x09 to enable >> >> hotkey events, but windows uses a different value (0x01). >> >> >> >> All Toshiba laptops accept the following "hotkey" parameters: >> >> 0x01 - Enable hotkey and system events. >> >> 0x03 - Enable system events only. >> >> 0x09 - Enable hotkey events only. >> >> 0x0b - Disable (hotkey and system) events. >> >> >> >> This patch changes the default hotkey enabling value from 0x09 to 0x01, >> >> enabling both the hotkey and system events. >> >> >> >> Signed-off-by: Azael Avalos <coproscefalo@gmail.com> >> > >> > Queued to testing for 4.4. >> > >> > Let me know if you were expecting 4.3.... >> >> Nope, just the first two fixes were meant for 4.3, the rest >> is 4.4 material, I just wanted to send them early. > > OK, check mainline please, everything I plan to push for 4.3 is now there. > Please confirm it has all you expected. Yup, everything is in there, thanks. -- -- El mundo apesta y vosotros apestais tambien -- ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-18 22:18 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-09-09 17:28 [PATCH 0/2] toshiba_acpi: Hotkey updates Azael Avalos 2015-09-09 17:28 ` [PATCH 1/2] toshiba_acpi: Unify hotkey enabling functions Azael Avalos 2015-09-18 21:36 ` Darren Hart 2015-09-09 17:28 ` [PATCH 2/2] toshiba_acpi: Change default Hotkey enabling value Azael Avalos 2015-09-18 21:37 ` Darren Hart 2015-09-18 21:45 ` Azael Avalos 2015-09-18 22:14 ` Darren Hart 2015-09-18 22:18 ` Azael Avalos
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).