summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/toshiba_acpi.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-07platform/x86: toshiba_acpi: Drop duplicate check for led_classdev_unregister()Andy Shevchenko1-20/+6
led_classdev_unregister() already has the similar check, so, drop a duplicate in the driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-02-04proc: convert everything to "struct proc_ops"Alexey Dobriyan1-32/+28
The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in seq_file.h. Conversion rule is: llseek => proc_lseek unlocked_ioctl => proc_ioctl xxx => proc_xxx delete ".owner = THIS_MODULE" line [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c] [sfr@canb.auug.org.au: fix kernel/sched/psi.c] Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-05-21treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7Thomas Gleixner1-13/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details the full gnu general public license is included in this distribution in the file called copying extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 9 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154041.244154651@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21platform/x86: toshiba_acpi: Fix defined but not used build warningsRandy Dunlap1-1/+2
Fix a build warning in toshiba_acpi.c when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused. ../drivers/platform/x86/toshiba_acpi.c:1685:12: warning: 'version_proc_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Azael Avalos <coproscefalo@gmail.com> Cc: platform-driver-x86@vger.kernel.org Cc: Andy Shevchenko <andy@infradead.org> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2018-06-26platform/x86: toshiba_acpi: Update KBD backlight LED on second gen laptopsAzael Avalos1-8/+22
Second generation keyboard backlight (type 2) laptops can switch on the keyboard LED on their own via hardware/firmware, but the LED subsystem is unaware of such change since the LED interface was only being created on first generation keyboard backlight (type 1) laptops. This patch creates the LED interface for second gen keyboards and calls the *_hw_changed API whenever userspace changes the state of the keyboard backlight LED. While we are at it, remove an unneeded asignment to the acpi_dev struct under *_kbd_bl_work, and also update the kbd_event_generated variable in the main toshiba struct instead of the global struct. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> [dvhart: correct int* and int compare with dev->kbd_mode] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2018-05-16proc: introduce proc_create_single{,_data}Christoph Hellwig1-15/+2
Variants of proc_create{,_data} that directly take a seq_file show callback and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <hch@lst.de>
2017-08-22platform/x86: toshiba_acpi: drop assignment of iio_info.driver_moduleJonathan Cameron1-1/+0
This is now handled by use of a macro for device registration. The field in iio_info will be going away shortly as it is no longer used. Cc: <platform-driver-x86@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Azael Avalos <coproscefalo@gmail.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
2017-07-11platform/x86: toshiba_acpi: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 26360 1072 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o File size After adding 'const': text data bss dec hex filename 26424 1008 24 27456 6b40 drivers/platform/x86/toshiba_acpi.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-05-15platform/x86: toshiba_acpi: use memdup_user_nulGeliang Tang1-8/+3
Use memdup_user_nul() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-03-14platform/x86: toshiba_acpi: remove sparse_keymap_free() callsMichał Kępień1-6/+2
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: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2016-08-31platform/x86: toshiba_acpi: Fix typo in *_cooling_method_set functionAzael Avalos1-1/+1
This patch simply fixes a typo in the error string printed in the *_cooling_method_set function. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-08-31platform/x86: toshiba_acpi: Change error checking logic from TCI functionsAzael Avalos1-88/+138
Currently the success/error checking logic is intermixed, making the code a bit cumbersome to understand. This patch changes the affected functions to first check for errors and take appropriate actions, then check for the supported features. This patch also separates the error check from the acpi_status and the tci_raw function call error check, as those two are completely unrelated and were nested in if/else statements. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-08-31platform/x86: toshiba_acpi: Clean up variable declarationAzael Avalos1-16/+13
This patch moves all the multiple line variable declaration to a single line declaration (except variables being initialized) following the reverse tree order, to conform to the practices of the kernel. [dvhart: corrected a couple minor inconsistencies in declaration ordering] Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-06-28toshiba_acpi: Bump driver version and update copyright yearAzael Avalos1-2/+2
After several fixes, and added support for more features (WWAN, Cooling Method and IIO accelometer axis data), bump the driver version to 0.24. Also update the copyright year. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-06-28toshiba_acpi: Remove the position sysfs entryAzael Avalos1-25/+0
Now that we have proper support for the acceleromeer under the IIO subsystem, the _position_ sysfs file is now deprecated. This patch removes all code related to the position sysfs entry. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-06-28toshiba_acpi: Add IIO interface for accelerometer axis dataAzael Avalos1-0/+107
This patch adds the accelerometer axis data to the IIO subsystem. Currently reporting the X, Y and Z values, as no other data can be queried given the fact that the accelerometer chip itself is hidden behind the Toshiba proprietary interface. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-04-25toshiba_acpi: Fix regression caused by hotkey enabling valueAzael Avalos1-1/+1
Commit 52cbae0127ad ("toshiba_acpi: Change default Hotkey enabling value") changed the hotkeys enabling value, as it was the same value Windows uses, however, it turns out that the value tells the EC that the driver will now take care of the hardware events like the physical RFKill switch or the pointing device toggle button. This patch reverts such commit by changing the default hotkey enabling value to 0x09, which enables hotkey events only, making the hardware buttons working again. Fixes bugs 113331 and 114941. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-03-23toshiba_acpi: Add a module parameter to disable hotkeys registrationAzael Avalos1-0/+10
Some laptop models have working hotkeys without the need of the driver to activate them. This patch adds a module parameter to tell the driver not to register the hotkeys. The new parameter is useful in DE less installations or where the DE does not handle the hotkeys (see bug 99501). Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-03-23toshiba_acpi: Add sysfs entries for the Cooling Method featureAzael Avalos1-0/+51
This patch adds the sysfs entry Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-03-23toshiba_acpi: Add support for cooling method featureAzael Avalos1-0/+54
This patch adds support to query and set the "Cooling Method" feature, which basically changes how the system fan behaves, depending on the supported cooling methods. Depending on the laptop model, these are the (so far...) available cooling methods: - Maximum Performance - Performance - Battery Optimized Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2016-01-19toshiba_acpi: Fix keyboard backlight sysfs entries not being updatedAzael Avalos1-4/+43
Certain Toshiba models with the second generation keyboard backlight (type 2) do not generate the keyboard backlight changed event (0x92), and thus, the sysfs entries are never being updated. This patch adds a workquee and a global boolean variable to address the issue. For those models that do generate the event, the sysfs entries are being updated via the *notify function and the boolean is set to true to avoid a second call to update the entries. For those models that do not generate the event, the workquee is used to update the sysfs entries and also to emulate the event via netlink, to make userspace aware of such change. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-23toshiba_acpi: Add WWAN RFKill supportAzael Avalos1-3/+76
A previuos patch added WWAN support to the driver, allowing to query and set the device status. This patch adds RFKill support for the recently introduced WWAN device, making use of the WWAN and *wireless_status functions to query the killswitch and (de)activate the device accordingly to its status. Signed-off-by: Fabian Koester <fabian.koester@bringnow.com> Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-23toshiba_acpi: Add support for WWAN devicesAzael Avalos1-0/+109
Toshiba laptops with WWAN devices installed cannot use the device unless it is attached and powered, similar to how Toshiba Bluetooth devices work. This patch adds support to WWAN devices, introducing three functions, one to query the overall status of the wireless devices (RFKill, WLAN, BT, WWAN), the second queries WWAN support, and finally the third (de)activates the device. Signed-off-by: Fabian Koester <fabian.koester@bringnow.com> Signed-off-by: Azael Avalos <coproscefalo@gmail.com>ZZ Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-20toshiba_acpi: Fix blank screen at boot if transflective backlight is supportedAzael Avalos1-0/+8
If transflective backlight is supported and the brightness is zero (lowest brightness level), the set_lcd_brightness function will activate the transflective backlight, making the LCD appear to be turned off. This patch fixes the issue by incrementing the brightness level, and by doing so, avoiding the activation of the tranflective backlight. Cc: <stable@vger.kernel.org> # 4.3+ Reported-and-tested-by: Fabian Koester <fabian.koester@bringnow.com> Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-20toshiba_acpi: Propagate the hotkey value via genetlinkAzael Avalos1-1/+2
The driver uses genetlink to inform userspace of events generated by the system, but the data passed is always zero as there is no data to pass, except for the hotkey event. This patch propagates the hotkey value via genetlink so userspace can make use of it. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-11-05toshiba_acpi: Initialize hotkey_event_type variableAzael Avalos1-0/+1
Commit 53147b6cabee5e8d1997b5682fcc0c3b72ddf9c2 ("toshiba_acpi: Fix hotkeys registration on some toshiba models") fixed an issue on some laptops regarding hotkeys registration, however, if failed to address the initialization of the hotkey_event_type variable, and thus, it can lead to potential unwanted effects as the variable is being checked. This patch initializes such variable to avoid such unwanted effects. Cc: <stable@vger.kernel.org> # 4.1+ Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Remove unneeded u32 variables from *setup_keyboardAzael Avalos1-13/+7
The function toshiba_acpi_setup_keyboard currently has two u32 variables used to store the Hotkey Event Type and the result of the HCI_SYSTEM_EVENT query. This patch removes those two variables, as we already have a global variable named "hotkey_event_type" and the result of the HCI_SYSTEM_EVENT query can be checked directly from the function. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Add 0x prefix to available_kbd_modes_show functionAzael Avalos1-2/+2
This patch adds the 0x prefix to the values printed by such function, the values are already being printed in hex, but without the prefix, causing confusion, even though the file under Documentation/ABI clearly states that hey are hex values. Simply add the 0x prefix to avoid such confusion. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Change default Hotkey enabling valueAzael Avalos1-1/+1
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> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-10-03toshiba_acpi: Unify hotkey enabling functionsAzael Avalos1-24/+12
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> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-10toshiba_acpi: Fix hotkeys registration on some toshiba modelsAzael Avalos1-5/+3
Commit a2b3471b5b13 ("toshiba_acpi: Use the Hotkey Event Type function for keymap choosing") changed the *setup_keyboard function to query for the Hotkey Event Type to help choose the correct keymap, but turns out that here are certain Toshiba models out there not implementing this feature, and thus, failing to continue the input device registration and leaving such laptops without hotkey support. This patch changes such check, and instead of returning an error if the Hotkey Event Type is not present, we simply inform userspace about it, changing the message printed from err to notice, making the function responsible for registering the input device to continue. This issue was found on a Toshiba Portege Z30-B, but there might be some other models out there affected by this regression as well. Cc: <stable@vger.kernel.org> # 4.1+ Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-09-10toshiba_acpi: Fix USB Sleep and Music always disabledAzael Avalos1-1/+1
Commit e1a949c1b988 ("toshiba_acpi: Refactor *{get, set} functions return value") made changes on the return type of the HCI/SCI functions, but a typo on the USB Sleep and Music code is always reporting non existent support for such feature. This patch corrects the typo, changing an assignment to a comparison, making the laptops with actual support for such feature to work again. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Bump driver version to 0.23Azael Avalos1-1/+1
Given that some features were added (/dev/toshiba_acpi device), some clean-ups and minor (cosmetic) changes all over the driver code, bump the driver version to 0.23 to reflect these overall changes. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Remove unnecessary checks and returns in HCI/SCI functionsAzael Avalos1-125/+44
A previous patch added explicit feature checks for support, *SUCCESS* and *FAILURE to the HCI/SCI *{get, set} functions. This patch removes some unnedded checks to the driver HCI/SCI functions given that the default error return value is now set to -EIO, there is no need to check for other error values other than the ones currently checking for. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Refactor *{get, set} functions return valueAzael Avalos1-73/+104
This patch refactors the return value of the driver *{get, set} functions, since the driver default error value is -EIO. All the functions now check for TOS_FAILURE, TOS_NOT_SUPPORTED and TOS_SUCCESS. On TOS_FAILURE a pr_err message is printed informing the user of the error (no change was made to this, except the check was added to the functions not checking for this). On TOS_NOT_SUPPORTED we now return -ENODEV immediately (some functions were returning -EIO and some other were not checking) On TOS_SUCCESS* we now return 0 (as a side effect, a new success value was added, since some functions return one instead of zero to indicate success). As a special case, the LED functions now check for *FAILURE on *set, and check for TOS_FAILURE and TOS_SUCCESS on *get with their "default" return value set to LED_OFF. Also the {lcd, video}_proc* functions were adapted to reflect these changes to their parent HCI functions. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Remove "*not supported" feature printsAzael Avalos1-26/+46
Currently the driver prints "*not supported" if any of the features queried are in fact not supported, let us print the available features instead. This patch removes all instances pr_info printing "*not supported", and add a new function called "print_supported_features", which will print the available laptop features. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-08-05toshiba_acpi: Change *available functions return typeAzael Avalos1-67/+62
This patch changes the *available functions return type from int to void. The checks for support of their respective features are done inside such functions and there was no need to return anything as we can flag the queried feature as supported inside these functions. The code was adapted accordingly to these changes and two new variables were created and another was changed from uint to bool. Also, the function toshiba_acceleremoter_supported was renamed to toshiba_accelerometer_available to maintain the naming consistency on the driver. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-28toshiba_acpi: Add set_fan_status functionAzael Avalos1-26/+40
This patch adds a new function named "set_fan_status" to complement its get* counterpart, as well as to avoid code duplication between "fan_proc_write" and "fan_store". Also, both functions (get*, set*) are now checking for TOS_FAILURE, TOS_NOT_SUPPORTED and TOS_SUCCESS (to be on par with the rest of the HCI/SCI functions), printing an error message, returning -ENODEV and zero respectively. The proc and sysfs functions were updated to reflect these changes as well, returning -EIO for proc, and propagating the error value on the sysfs functions. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-24toshiba_acpi: Change some variables to avoid warnings from ninja-checkAzael Avalos1-6/+9
This patch changes some variables to avoid warnings from ninja-check. We are basically moving some variables inside the conditionals where such variables are being used, and we are checking the returned values of some others. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-24toshiba_acpi: Reorder toshiba_acpi_alt_keymap entriesAzael Avalos1-3/+3
This patch simply reorders the entries found in the new keymap by ascending order, this is simply a cosmetic change, no functionality was modified. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-24toshiba_acpi: Remove unused wireless definesAzael Avalos1-5/+0
Commit 2b74103547b4 ("toshiba_acpi: Remove bluetooth rfkill code") removed bluetooth related code, however, the wireless defines were not removed and are unused. This patch simply removes those defines as there is no code using them. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-24toshiba_acpi: Transflective backlight updatesAzael Avalos1-19/+11
This patch changes the tr function second parameter from bool to u32, to be on par with the rest of the TCI functions of the driver, and the code was updated accordingly. Also, the check for translective support was moved to the *add function, as the {__get, set}_lcd_brightness functions make use of it. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-24toshiba_acpi: Avoid registering input device on WMI event laptopsAzael Avalos1-8/+13
Commit f11f999e9890 ("toshiba_acpi: Refuse to load on machines with buggy INFO implementations") denied loading on laptops with a WMI Event GUID given that such laptops manage the hotkeys via that interface, however, such laptops have a working Toshiba Configuration Interface (TCI), and thus, such commit denied several supported features. This patch avoids registering the input device and ignores all hotkey events on laptops with such WMI Event GUID, making the supported features found in those laptops to work. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-24toshiba_acpi: Add /dev/toshiba_acpi deviceAzael Avalos1-0/+91
There were previous attempts to "merge" the toshiba SMM module to the toshiba_acpi one, they were trying to imitate what the old toshiba module does, however, some models (TOS1900 devices) come with a "crippled" implementation and do not provide all the "features" a "genuine" Toshiba BIOS does. This patch adds a new device called toshiba_acpi, which aim is to enable userspace to access the SMM on Toshiba laptops via ACPI calls. Creating a new convenience _IOWR command to access the SCI functions by opening/closing the SCI internally to avoid buggy BIOS, while at the same time providing backwards compatibility. Older programs (and new) who wish to access the SMM on newer models can do it by pointing their path to /dev/toshiba_acpi (instead of /dev/toshiba) as the toshiba.h header was modified to reflect these changes as well as adds all the toshiba_acpi paths and command, however, it is strongly recommended to use the new IOCTL for any SCI command to avoid any buggy BIOS. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-24toshiba_acpi: Adapt /proc/acpi/toshiba/keys to TOS1900 devicesAzael Avalos1-36/+20
Since the introduction of TOS1900 devices support to the driver, the "keys" entry under the proc directory was broken, given that it only handled TOS620X devices accordingly. This patch adapts the code to show the hotkey values of TOS1900 devices too, and in case some programs are still using that interface, hotkeys reporting should now work on these devices. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-07-01Merge tag 'platform-drivers-x86-v4.2-1' of ↵Linus Torvalds1-196/+50
git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Fairly routine update for platform-drivers-x86. Mostly fixes and cleanups, with a significant refactoring of toshiba* drivers. Includes the addition of the dell-rbtn driver. Details: asus-wmi: - fan control dell*: - add Dell airplane mode switch driver ideapad-laptop: - platform rfkill fixes, and regression fix pvpanic: - handle missing _STA correctly toshiba*: - rafactor bluetooth support - haps documentation - driver cleanup other: - Use acpi_video_unregister_backlight instead of acpi_video_unregister in serveral drivers. - Orphan msi-wmi. * tag 'platform-drivers-x86-v4.2-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (24 commits) MAINTAINERS: Orphan x86 driver msi-wmi ideapad: fix software rfkill setting dell-laptop: Use dell-rbtn instead i8042 filter when possible dell-rbtn: Export notifier for other kernel modules dell-rbtn: Dell Airplane Mode Switch driver samsung-laptop: Use acpi_video_unregister_backlight instead of acpi_video_unregister asus-wmi: Use acpi_video_unregister_backlight instead of acpi_video_unregister apple_gmux: Use acpi_video_unregister_backlight instead of acpi_video_unregister pvpanic: handle missing _STA correctly ideapad_laptop: Lenovo G50-30 fix rfkill reports wireless blocked asus-wmi: add fan control Documentation/ABI: Add file describing the sysfs entries for toshiba_haps toshiba_haps: Make use of DEVICE_ATTR_{RW, WO} macros toshiba_haps: Replace sscanf with kstrtoint toshiba_acpi: Bump driver version to 0.22 toshiba_acpi: Remove TOS_FAILURE check from some functions toshiba_acpi: Comments cleanup toshiba_acpi: Rename hci_{read, write}1 functions toshiba_acpi: Remove no longer needed hci_{read, write}2 functions toshiba_bluetooth: Change BT status message to debug ...
2015-06-19toshiba-acpi: Port to new backlight interface selection APIHans de Goede1-5/+2
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Azael Avalos <coproscefalo@gmail.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-11toshiba_acpi: Bump driver version to 0.22Azael Avalos1-1/+1
This patch simply bumps the driver version to 0.22, as significant changes were made to the driver, such as cleanups, updated events, keymap handling, fixes and the bluetooth rfkill code removal. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-05-11toshiba_acpi: Remove TOS_FAILURE check from some functionsAzael Avalos1-10/+10
This patch removes the check for TOS_FAILURE whenever we are using the tci_raw function call, as that code is only returned by the {hci, sci}_{read, write} functions and never by the tci_raw, and thus making that check irrelevant. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-05-11toshiba_acpi: Comments cleanupAzael Avalos1-7/+10
This patch simply does some misc cleanup to comments, mainly capitalizes some left over comments from a previous clean up and adds some comments at the beginning of some feature function calls, as well as some misc changes to some comments. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>