From: Armin Wolf <W_Armin@gmx.de>
To: jithu.joseph@intel.com, hdegoede@redhat.com,
markgross@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: Dell.Client.Kernel@dell.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/4] platform/x86/intel/wmi: thunderbolt: Use bus-based WMI interface
Date: Fri, 3 Nov 2023 19:25:26 +0100 [thread overview]
Message-ID: <20231103182526.3524-4-W_Armin@gmx.de> (raw)
In-Reply-To: <20231103182526.3524-1-W_Armin@gmx.de>
Currently, the driver still uses the legacy GUID-based interface
to invoke WMI methods. Use the modern bus-based interface instead.
Tested on a Lenovo E51-80.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
Changes in v2:
- fix spelling issue
---
drivers/platform/x86/intel/wmi/thunderbolt.c | 3 +--
drivers/platform/x86/wmi.c | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel/wmi/thunderbolt.c b/drivers/platform/x86/intel/wmi/thunderbolt.c
index fc333ff82d1e..e2ad3f46f356 100644
--- a/drivers/platform/x86/intel/wmi/thunderbolt.c
+++ b/drivers/platform/x86/intel/wmi/thunderbolt.c
@@ -32,8 +32,7 @@ static ssize_t force_power_store(struct device *dev,
mode = hex_to_bin(buf[0]);
dev_dbg(dev, "force_power: storing %#x\n", mode);
if (mode == 0 || mode == 1) {
- status = wmi_evaluate_method(INTEL_WMI_THUNDERBOLT_GUID, 0, 1,
- &input, NULL);
+ status = wmidev_evaluate_method(to_wmi_device(dev), 0, 1, &input, NULL);
if (ACPI_FAILURE(status)) {
dev_dbg(dev, "force_power: failed to evaluate ACPI method\n");
return -ENODEV;
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 4c4effc883ae..cb7e74f2b009 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -107,6 +107,7 @@ static const char * const allow_duplicates[] = {
"05901221-D566-11D1-B2F0-00A0C9062910", /* wmi-bmof */
"8A42EA14-4F2A-FD45-6422-0087F7A7E608", /* dell-wmi-ddv */
"44FADEB1-B204-40F2-8581-394BBDC1B651", /* intel-wmi-sbl-fw-update */
+ "86CCFD48-205E-4A77-9C48-2021CBEDE341", /* intel-wmi-thunderbolt */
NULL
};
--
2.39.2
next prev parent reply other threads:[~2023-11-03 18:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 18:25 [PATCH v2 1/4] platform/x86: wmi: Add wmidev_block_set() Armin Wolf
2023-11-03 18:25 ` [PATCH v2 2/4] platform/x86: wmi: Add to_wmi_device() helper macro Armin Wolf
2023-11-03 18:25 ` [PATCH v2 3/4] platform/x86: intel-wmi-sbl-fw-update: Use bus-based WMI interface Armin Wolf
2023-11-03 18:25 ` Armin Wolf [this message]
2023-11-16 13:38 ` [PATCH v2 4/4] platform/x86/intel/wmi: thunderbolt: " Ilpo Järvinen
2023-11-13 19:57 ` [PATCH v2 1/4] platform/x86: wmi: Add wmidev_block_set() Armin Wolf
2023-11-20 12:00 ` Hans de Goede
2023-11-20 21:29 ` Armin Wolf
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=20231103182526.3524-4-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--cc=Dell.Client.Kernel@dell.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jithu.joseph@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--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
all inboxes | Powered by JetHome®