aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAzael Avalos <coproscefalo@gmail.com>2015-01-18 21:17:12 -0500
committerDarren Hart <dvhart@linux.intel.com>2015-01-29 00:55:01 -0500
commitfa465739d4dad4c04715f1e8f1416d86b5b71b64 (patch)
tree8f2f80cbd833b4d9b4126f4903d9ec593cbfe063 /drivers/platform
parented52ccbce7ffdde51f116e2cc9de00251f1ff7c5 (diff)
toshiba_acpi: Add a check for TOS_NOT_SUPPORTED in the sci_open function
This was "toshiba_acpi: Change sci_open function return value" Some Toshiba laptops have "poorly implemented" SCI calls on their BIOSes and are not checking for sci_{open, close} calls, therefore, the sci_open function is failing and making some of the supported features unavailable (kbd backlight, touchpad, illumination, etc.). This patch checks whether we receive TOS_NOT_SUPPORTED and returns 1, making the supported features work on such laptops. In the case that some laptops really do not support the SCI, all the SCI dependent functions check for TOS_NOT_SUPPORTED, and thus, not registering support for the queried feature. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/toshiba_acpi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 446ddc1fa3c2..48c79b257178 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -404,6 +404,19 @@ static int sci_open(struct toshiba_acpi_dev *dev)
404 } else if (out[0] == TOS_ALREADY_OPEN) { 404 } else if (out[0] == TOS_ALREADY_OPEN) {
405 pr_info("Toshiba SCI already opened\n"); 405 pr_info("Toshiba SCI already opened\n");
406 return 1; 406 return 1;
407 } else if (out[0] == TOS_NOT_SUPPORTED) {
408 /* Some BIOSes do not have the SCI open/close functions
409 * implemented and return 0x8000 (Not Supported), failing to
410 * register some supported features.
411 *
412 * Simply return 1 if we hit those affected laptops to make the
413 * supported features work.
414 *
415 * In the case that some laptops really do not support the SCI,
416 * all the SCI dependent functions check for TOS_NOT_SUPPORTED,
417 * and thus, not registering support for the queried feature.
418 */
419 return 1;
407 } else if (out[0] == TOS_NOT_PRESENT) { 420 } else if (out[0] == TOS_NOT_PRESENT) {
408 pr_info("Toshiba SCI is not present\n"); 421 pr_info("Toshiba SCI is not present\n");
409 } 422 }