Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9322865ybl; Fri, 17 Jan 2020 09:58:38 -0800 (PST) X-Google-Smtp-Source: APXvYqwlWP6+bAQ7g9l/gkw6iPCH2tEKDULsFl8dOf2G0D8djl1xDZRstLuvQcBA3K8Wj9Jh1aCY X-Received: by 2002:aca:d544:: with SMTP id m65mr4349939oig.177.1579283917903; Fri, 17 Jan 2020 09:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579283917; cv=none; d=google.com; s=arc-20160816; b=NG+a6vfNZakCKgaBtipRxZPaP0JEFu054joc9WbrIcs5toHlA6VhU5cEAm5ETt7Pvf Qibz3PZp80TOMzBFdoAzWAFxI4D9Yc9paW8HMLveVMwciXHgH1kvqDHp7iO9/yPxr6lU toit/jLPIm2MzhPpeFBzx6/qkxCmzmpP78H4P9nipyvJqoYJH4dCR2HsAPIdTYfNzbDj dFpWgsYMLhGECW/Y2hyhj3bHdG5VdP03Gmg8NAhbXiEAg3p1+mGiNzMaCsDxlPy8Zz3a q/xzUH2qEPFQ2almWcExjphSKKYqm0b9K9P8ab27J5Is5hrm+jHxyiRsE/VWyHLgTtSd E7fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=W2Hj6F8hwwSE2DPzhKpWLcJnfdvoHYJQfWWtm52SghE=; b=lBD2o88VIT3aiLxSO3aHiQrRF9EDlfmeHw4HsMKz3WYEaxUD5d14pQy8OJ8gePfkNO 5HeH3dLBndLjTqJq55Jsm+kYC+o/t7B7AWyfc0WLQ1YUByEgxgQ8X7qj2pRasWk5Bi3+ 7hQpuKhAe3ua/QF4cKSH28amCc7bIImgbc9SI/ilXPQ5kx8+crEH2f6PfgeUT/lO0qcq oXZK6Q9rd/AkNxX8h4dly7cWlg8mXC3amFcLyArenYk5KQpV2hkEI0rFylhwtK0T8WHo iA18Rwa1/p58O4kZFPgb/z8hZx5bQf7I0YDkW3RD0ku5C94vvCfVZIXB9P+80YDdL/mM hxYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si15436525ota.71.2020.01.17.09.58.26; Fri, 17 Jan 2020 09:58:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729153AbgAQR4f (ORCPT + 99 others); Fri, 17 Jan 2020 12:56:35 -0500 Received: from mga11.intel.com ([192.55.52.93]:62787 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbgAQR4c (ORCPT ); Fri, 17 Jan 2020 12:56:32 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2020 09:56:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,331,1574150400"; d="scan'208";a="243739495" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 17 Jan 2020 09:56:27 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 144BC1B4; Fri, 17 Jan 2020 19:56:27 +0200 (EET) From: Andy Shevchenko To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org, "Guilherme G . Piccoli" , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH v1 5/8] x86/quirks: Add a DMI quirk for Microsoft Surface 3 Date: Fri, 17 Jan 2020 19:56:23 +0200 Message-Id: <20200117175626.56358-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117175626.56358-1-andriy.shevchenko@linux.intel.com> References: <20200117175626.56358-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 16 ++++++++++++++++ include/linux/platform_data/x86/machine.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index 447d4fba8516..9574ef7eaa66 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c @@ -673,6 +673,15 @@ static int apple_machine_cb(const struct dmi_system_id *id) return 1; } +bool x86_microsoft_surface_3_machine; +EXPORT_SYMBOL(x86_microsoft_surface_3_machine); + +static int microsoft_surface_3_machine_cb(const struct dmi_system_id *id) +{ + x86_microsoft_surface_3_machine = true; + return 1; +} + static const struct dmi_system_id x86_machine_table[] = { { .ident = "x86 Apple Macintosh", @@ -688,6 +697,13 @@ static const struct dmi_system_id x86_machine_table[] = { }, .callback = apple_machine_cb, }, + { + .ident = "Microsoft Surface 3", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), + }, + .callback = microsoft_surface_3_machine_cb, + }, {} }; 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 */ -- 2.24.1