From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751281AbeAWLRX (ORCPT ); Tue, 23 Jan 2018 06:17:23 -0500 Received: from broccolo.seppia.net ([185.61.148.186]:59044 "EHLO broccolo.seppia.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbeAWLRV (ORCPT ); Tue, 23 Jan 2018 06:17:21 -0500 DKIM-Filter: OpenDKIM Filter v2.10.3 mail.seppia.net BFDDE1E261F From: "Salvatore Bellizzi" To: , , Cc: Subject: [PATCH] platform/chrome: cros_ec_lpc: Add support for Google devices using custom coreboot firmware Content-Type: text/plain; charset=UTF-8 Message-ID: Date: Tue, 23 Jan 2018 12:07:30 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds generic device information to the DMI table of the cros_ec_lpc driver, needed for Chromebooks/boxes using a custom coreboot firmware. The DMI info would not contain "Google_*" as BIOS version string, instead the system vendor string would still be "GOOGLE", so that seems to be a reasonable match for every Chromebook/box running a custom firmware. Signed-off-by: Salvatore Bellizzi Signed-off-by: Vittorio Gambaletta --- drivers/platform/chrome/cros_ec_lpc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c index af89e82eecd2..c8450ae3cd60 100644 --- a/drivers/platform/chrome/cros_ec_lpc.c +++ b/drivers/platform/chrome/cros_ec_lpc.c @@ -341,6 +341,18 @@ static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = { DMI_MATCH(DMI_BIOS_VERSION, "Google_"), }, }, + { + /* + * If the box is running custom coreboot firmware then the + * DMI BIOS version string will not be matched by "Google_", + * but the system vendor string will still be matched by + * "GOOGLE". + */ + .matches = { + DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"), + DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), + }, + }, { /* x86-link, the Chromebook Pixel. */ .matches = { -- 2.15.1