From patchwork Mon Jan 20 16:07:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11342461 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40E036C1 for ; Mon, 20 Jan 2020 16:09:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB5D621D7E for ; Mon, 20 Jan 2020 16:09:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="QZr91/Sq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB5D621D7E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F09F21666; Mon, 20 Jan 2020 17:08:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F09F21666 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1579536554; bh=8oTWAByt+EUedYtemGiJSYRFmrg1f8u4+IS3Lz0aW2M=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QZr91/SqqVAs8xaHMuqRO+sm2PJW1DmfTwzaUyUfZsxboYJsNgMBdScrmCACLJ6ZM GU5EHNw3H60q5YoQ8KDhoFTYUXPVvClkA/VniwTO2dX3mt4SDv6h98IACCJ1MnAUB2 QFatB/3qS2Izlrkt5vLm452jHyKtu3WPiR4103o8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 79DCFF8012F; Mon, 20 Jan 2020 17:08:26 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1C17F80217; Mon, 20 Jan 2020 17:08:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 486C1F801D8 for ; Mon, 20 Jan 2020 17:08:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 486C1F801D8 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jan 2020 08:08:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,342,1574150400"; d="scan'208";a="275072731" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 20 Jan 2020 08:08:16 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1F505494; Mon, 20 Jan 2020 18:08:13 +0200 (EET) From: Andy Shevchenko To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Mark Brown , linux-kernel@vger.kernel.org Date: Mon, 20 Jan 2020 18:07:58 +0200 Message-Id: <20200120160801.53089-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200120160801.53089-1-andriy.shevchenko@linux.intel.com> References: <20200120160801.53089-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , alsa-devel@alsa-project.org, Jie Yang , Pierre-Louis Bossart , Liam Girdwood , Andy Shevchenko Subject: [alsa-devel] [PATCH v2 6/9] x86/quirks: Add a DMI quirk for Microsoft Surface 3 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add a DMI quirk for Microsoft Surface 3 which will be utilized by few drivers. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Andy Shevchenko --- arch/x86/kernel/quirks.c | 10 ++++++++++ include/linux/platform_data/x86/machine.h | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index 78846a8dc88b..501fbcd16282 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c @@ -658,6 +658,9 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2083, quirk_intel_purley_xeon_ras bool x86_apple_machine; EXPORT_SYMBOL(x86_apple_machine); +bool x86_microsoft_surface_3_machine; +EXPORT_SYMBOL(x86_microsoft_surface_3_machine); + static const struct dmi_system_id x86_machine_table[] __initconst = { { .ident = "x86 Apple Macintosh", @@ -673,6 +676,13 @@ static const struct dmi_system_id x86_machine_table[] __initconst = { }, .driver_data = &x86_apple_machine, }, + { + .ident = "Microsoft Surface 3", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), + }, + .driver_data = &x86_microsoft_surface_3_machine, + }, {} }; diff --git a/include/linux/platform_data/x86/machine.h b/include/linux/platform_data/x86/machine.h index b1e7a560a046..9bdf5a06b490 100644 --- a/include/linux/platform_data/x86/machine.h +++ b/include/linux/platform_data/x86/machine.h @@ -8,8 +8,13 @@ * x86_apple_machine - whether the machine is an x86 Apple Macintosh */ extern bool x86_apple_machine; +/** + * x86_microsoft_surface_3_machine - whether the machine is Microsoft Surface 3 + */ +extern bool x86_microsoft_surface_3_machine; #else #define x86_apple_machine false +#define x86_microsoft_surface_3_machine false #endif #endif /* PLATFORM_DATA_X86_MACHINE_H */