Received: by 10.223.185.116 with SMTP id b49csp5444640wrg; Wed, 7 Mar 2018 11:52:59 -0800 (PST) X-Google-Smtp-Source: AG47ELsgkfxI98N1lGqIBVAYodFPos+WJb7ocym/4D+gN+8+F9jGqxRD4pfm0gsaqa1LVauJogbP X-Received: by 2002:a17:902:183:: with SMTP id b3-v6mr21309293plb.80.1520452379367; Wed, 07 Mar 2018 11:52:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520452379; cv=none; d=google.com; s=arc-20160816; b=IwXQ++RcWYog1QpfS2H46ARIh6NoPjFSqARmhMT7LdAQsAwhzFghHTCTnrd36qIho4 gxz57bTssh2IFgRLqTVi8lCb78gvxndjtoqvZvZ6olbIyvTTjbu/KbJJyTXVfpjPdlrX 0H/JypjhH9kz/u3oQIZvq/iu8b0TXYjwm2rS+1EpH0fk4q7nhtX8FwiJehiRIoZaokYh 0LaGyeNMJXyKduCxZVVleFgfEklStQIEm+sNM/SZXS8m/OzANn9uQJNppfJ1d78dbgyn urjTZvho33j8A3vt/sXkMvt+LY+kcndG1bElNWaaPpSlA3FYUKigUA/V5HIuMAohCPTK 0Qag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sPiW7dTGv9tbOoYCUqA4UG388W7pim6bHKOZEUj3I9c=; b=le6Me9Q+XwXYTvOec8hkft4ld1/oUfDdfl8uPoKC7el0ikmqAEqfCvVn/HFZ10I5/d 5FKE2e3DJJIIdfd07wgxI1pPmko+8YqBJTZFWpoRv+YT4TCUJ8UrAo1KNp5e6kMgqXCv tBgHbBfE3UhWVRniGBLyPMiR2dYIcDyXsycDGZIf3+1uaQtm0ZXFX4fO2MIKOtTb4xml D9mUC9F5p6Tl6Wn+QRIw8d9JunRYsnv5YwKBg4SZuFNbZVODJ8sI0NgDp05zOC9yWe2O HlQPE/xMngZfetuDFPlFL2gXfJD6Jit8t6a1iM4sMMH3tGS3jSuIBrw+fm9VgzMPNFWc IUDw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2-v6si7122198plm.3.2018.03.07.11.52.45; Wed, 07 Mar 2018 11:52:59 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965891AbeCGTsK (ORCPT + 99 others); Wed, 7 Mar 2018 14:48:10 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45292 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965178AbeCGTsI (ORCPT ); Wed, 7 Mar 2018 14:48:08 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5107D112F; Wed, 7 Mar 2018 19:48:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai-Heng Feng , "Rafael J. Wysocki" Subject: [PATCH 4.14 106/110] ACPI / bus: Parse tables as term_list for Dell XPS 9570 and Precision M5530 Date: Wed, 7 Mar 2018 11:39:29 -0800 Message-Id: <20180307191053.550476543@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191039.748351103@linuxfoundation.org> References: <20180307191039.748351103@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kai Heng Feng commit 36904703aeeeb6cd31993f1353c8325006229f9a upstream. The i2c touchpad on Dell XPS 9570 and Precision M5530 doesn't work out of box. The touchpad relies on its _INI method to update its _HID value from XXXX0000 to SYNA2393. Also, the _STA relies on value of I2CN to report correct status. Set acpi_gbl_parse_table_as_term_list so the value of I2CN can be correctly set up, and _INI can get run. The ACPI table in this machine is designed to get parsed this way. Also, change the quirk table to a more generic name. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198515 Signed-off-by: Kai-Heng Feng Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/bus.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -66,10 +66,37 @@ static int set_copy_dsdt(const struct dm return 0; } #endif +static int set_gbl_term_list(const struct dmi_system_id *id) +{ + acpi_gbl_parse_table_as_term_list = 1; + return 0; +} -static const struct dmi_system_id dsdt_dmi_table[] __initconst = { +static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = { + /* + * Touchpad on Dell XPS 9570/Precision M5530 doesn't work under I2C + * mode. + * https://bugzilla.kernel.org/show_bug.cgi?id=198515 + */ + { + .callback = set_gbl_term_list, + .ident = "Dell Precision M5530", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Precision M5530"), + }, + }, + { + .callback = set_gbl_term_list, + .ident = "Dell XPS 15 9570", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9570"), + }, + }, /* * Invoke DSDT corruption work-around on all Toshiba Satellite. + * DSDT will be copied to memory. * https://bugzilla.kernel.org/show_bug.cgi?id=14679 */ { @@ -83,7 +110,7 @@ static const struct dmi_system_id dsdt_d {} }; #else -static const struct dmi_system_id dsdt_dmi_table[] __initconst = { +static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = { {} }; #endif @@ -1001,11 +1028,8 @@ void __init acpi_early_init(void) acpi_permanent_mmap = true; - /* - * If the machine falls into the DMI check table, - * DSDT will be copied to memory - */ - dmi_check_system(dsdt_dmi_table); + /* Check machine-specific quirks */ + dmi_check_system(acpi_quirks_dmi_table); status = acpi_reallocate_root_table(); if (ACPI_FAILURE(status)) {