From: Arvid Norlander <lkml@vorpal.se>
To: platform-driver-x86@vger.kernel.org
Cc: Azael Avalos <coproscefalo@gmail.com>, Arvid Norlander <lkml@vorpal.se>
Subject: [PATCH 1/2] platform/x86: Fix ECO LED control on Toshiba Z830
Date: Sun, 21 Aug 2022 22:08:21 +0200 [thread overview]
Message-ID: <20220821200821.1837460-2-lkml@vorpal.se> (raw)
In-Reply-To: <20220821200821.1837460-1-lkml@vorpal.se>
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 <lkml@vorpal.se>
---
drivers/platform/x86/toshiba_acpi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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.
--
2.37.2
next prev parent reply other threads:[~2022-08-21 20:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-21 20:08 [PATCH 0/2] [RFC] platform/x86: Fixes for Toshiba Z830 Arvid Norlander
2022-08-21 20:08 ` Arvid Norlander [this message]
2022-08-26 10:58 ` [PATCH 1/2] platform/x86: Fix ECO LED control on " Hans de Goede
2022-08-21 20:08 ` [PATCH 2/2] platform/x86: Battery charge mode in toshiba_acpi Arvid Norlander
2022-08-24 8:48 ` Hans de Goede
2022-08-22 11:39 ` [PATCH 0/2] [RFC] platform/x86: Fixes for Toshiba Z830 Hans de Goede
2022-08-24 12:31 ` Arvid Norlander
2022-08-25 17:00 ` Azael Avalos
2022-08-27 11:51 ` Arvid Norlander
2022-08-27 20:05 ` Azael Avalos
2022-08-26 12:07 ` Hans de Goede
2022-08-27 11:42 ` Arvid Norlander
2022-08-29 14:16 ` Hans de Goede
-- strict thread matches above, loose matches on Subject: below --
2022-08-21 19:49 lkml
2022-08-21 19:49 ` [PATCH 1/2] platform/x86: Fix ECO LED control on " lkml
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220821200821.1837460-2-lkml@vorpal.se \
--to=lkml@vorpal.se \
--cc=coproscefalo@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).