From patchwork Sat Aug 12 07:44:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 9896931 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 16E9660236 for ; Sat, 12 Aug 2017 07:46:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B43528B40 for ; Sat, 12 Aug 2017 07:46:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0022228BBC; Sat, 12 Aug 2017 07:46:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 795EC28B40 for ; Sat, 12 Aug 2017 07:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbdHLHpq (ORCPT ); Sat, 12 Aug 2017 03:45:46 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35521 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbdHLHpo (ORCPT ); Sat, 12 Aug 2017 03:45:44 -0400 Received: by mail-wr0-f193.google.com with SMTP id c22so222703wrb.2; Sat, 12 Aug 2017 00:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OF2hVs9Q0OnD1qdtEczMg/bBcbuJ6Gilk8cUKUsyMAg=; b=c7iUNmqyuB8+Uey6jMsf2119XtbfPoqBli6dXyVTpmFtEGZWd4Y68Bpi+uDwJSkwHi NOpKgHKaQJzzIbrT486A9h3LK2IcwlDh1qEE3a684p2yQ694cZsgdlqVKg/55MRdQbPw 93jOM1FZISmhM4qQLT2UWWwU5uAe6N74Wi4DDYz46VTXQhGcJpMd4WVU5lsRPOnoFz4J nIx5Mk0ihZQCbt6IDCpkl/zHeU+DdsCRsKFDInj8QS/zaHm16KU9/p/zN0WV3yk+rLw0 BhG1N3SW5h+jjKb1lG0a9qqyNJ5sQ4XTfKi36PxYIeRSIanY0oIuuSCOcUBxjtRdNBz/ uqkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OF2hVs9Q0OnD1qdtEczMg/bBcbuJ6Gilk8cUKUsyMAg=; b=rJiJoPxAhyOG+Q9tqyjF/W/MDsKKNryfjZ5w/BSVTHlSF4KJ/7dOajw48zfvOf4gU+ IEaQaO3rKIfv6seDF7Fe/T8Ga5mAOjgqtTlF1TnpjLTwZPk8VawFAY6E17AmbOy97YEA +sfylF2ZJsTpocKtVBGSID/N5ay9bilKWO5dTc7QhcEvr+QxQeR6sGMv2RwKtc8qnGsr cncaHehLH0NB7sJi5Unmd9Cr79bFu2s6Y6b7SP0DywKI/H1BGr7ndzTB6GDzQufLpg/d Zo2y724+VYN+dNGuKxG8X+SaMsBadbqnDe9tmtqowNGApRHPKA03AxWN4bXN3doalcMT CoEw== X-Gm-Message-State: AHYfb5ivcEnsXDXnONOsNPUMmoUL7DaIZxCuq4zeLcbA/E4xdXhizcim 0JL0Y4x4EwAVkXZ2 X-Received: by 10.223.146.164 with SMTP id 33mr12923329wrn.134.1502523943142; Sat, 12 Aug 2017 00:45:43 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id d200sm651526wmd.32.2017.08.12.00.45.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2017 00:45:42 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Corentin Chary , Darren Hart , Andy Shevchenko Cc: acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 1/4] platform/x86: mxm-wmi: Evaluate wmi method with instance number 0x0 Date: Sat, 12 Aug 2017 09:44:15 +0200 Message-Id: <1502523858-25716-2-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1502523858-25716-1-git-send-email-pali.rohar@gmail.com> References: <1502523858-25716-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to MXM 2.1 specification, there is the only one instance of the WMI GUID F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0 and so it is instance 0x0. MXM 2.1 specification: https://lekensteyn.nl/files/docs/mxm-2.1-software-spec.pdf _WDG dump: // Methods GUID {F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0} 0x3C, 0x5C, 0xCB, 0xF6, 0xAE, 0x9C, 0xBD, 0x4E, 0xB5, 0x77, 0x93, 0x1E, 0xA3, 0x2A, 0x2C, 0xC0, 0x4D, 0x58, // Object ID "MX" = method "WMMX" 1, // Instance Count 0x02, // Flags (WMIACPI_REGFLAG_METHOD) Signed-off-by: Pali Rohár --- drivers/platform/x86/mxm-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/mxm-wmi.c b/drivers/platform/x86/mxm-wmi.c index f4bad83..35d8b9a 100644 --- a/drivers/platform/x86/mxm-wmi.c +++ b/drivers/platform/x86/mxm-wmi.c @@ -53,7 +53,7 @@ int mxm_wmi_call_mxds(int adapter) printk("calling mux switch %d\n", adapter); - status = wmi_evaluate_method(MXM_WMMX_GUID, 0x1, adapter, &input, + status = wmi_evaluate_method(MXM_WMMX_GUID, 0x0, adapter, &input, &output); if (ACPI_FAILURE(status)) @@ -78,7 +78,7 @@ int mxm_wmi_call_mxmx(int adapter) printk("calling mux switch %d\n", adapter); - status = wmi_evaluate_method(MXM_WMMX_GUID, 0x1, adapter, &input, + status = wmi_evaluate_method(MXM_WMMX_GUID, 0x0, adapter, &input, &output); if (ACPI_FAILURE(status))