aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArvid Norlander <[email protected]>2022-08-21 22:08:21 +0200
committerHans de Goede <[email protected]>2022-08-26 12:57:29 +0200
commit4058ea22d7ce26d3d71698768e636274d08e9ccd (patch)
tree6c8faf4d644ae15b1727b5ce0ca47e68b129883a
parent23657a437ea2fbccc715fce2dac74e3c923540cf (diff)
platform/x86: toshiba_acpi: Fix ECO LED control on Toshiba Z830
The toshiba_acpi driver checks for TOS_INPUT_DATA_ERROR and tries a different format. On the Z830 the error returned is TOS_NOT_SUPPORTED though the different format still works. Allow either error. Signed-off-by: Arvid Norlander <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r--drivers/platform/x86/toshiba_acpi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 0fc9e8b8827b..6cc617b2940e 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -675,12 +675,15 @@ static void toshiba_eco_mode_available(struct toshiba_acpi_dev *dev)
return;
}
- if (out[0] == TOS_INPUT_DATA_ERROR) {
+ if (out[0] == TOS_INPUT_DATA_ERROR || out[0] == TOS_NOT_SUPPORTED) {
/*
* If we receive 0x8300 (Input Data Error), it means that the
* LED device is present, but that we just screwed the input
* parameters.
*
+ * On some laptops 0x8000 (Not supported) is also returned in
+ * this case, so we need to allow for that as well.
+ *
* Let's query the status of the LED to see if we really have a
* success response, indicating the actual presense of the LED,
* bail out otherwise.