Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp778971ybb; Wed, 1 Apr 2020 09:27:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vthaMF8SMpEX43xOMbqHw0Jb71r7F4D2zRXNzbasE4dqL3hu1sxFHSbXLxuWKpoM6X+UBhu X-Received: by 2002:a9d:3a45:: with SMTP id j63mr16259194otc.71.1585758455602; Wed, 01 Apr 2020 09:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585758455; cv=none; d=google.com; s=arc-20160816; b=KuT3YcFGusWFEKEX8NA07CZVpvY5+GW+8uooIahn6zwNRNitgWxhsUT8fIQhG0KYFB K5SKgp3RHGD25jdhmik0JKxt1odKriaDYm1jBzHOksUovXlxXddxd9PFwAJiQ3VaUEJa q8TIH+TZQjWad4Y8t9z5VxsE1/fkqHMOECXKaBkANvWxgASwNMEv+Uhv5FRJB9k4ri7Z MXwj1xsStI5kmfgqG1Ko97votd2XCU+cvnU+uZxUNtMJzKmiMz+69ZOadST2oCkpojMv sMtlnNQ090nO337uHyYpcqYsa4PT0ejAxT+QP8vrMqDWQ37L7TmQJdUylXZpJWqe5RQW yhPQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pdmJGHgxnxJw/P11S3rLPO+ztXnw3/vi9fVnhUCt4a4=; b=DLnXtrCh1sM8boDB2pvmdhwr6q4wiYl+NX7m5yKeQOKnXJfUsOehGSLsoGk2nEFzRg 6P2VjcbttoK2gUP9xmarj+BD8zj7FGo7u/SFzuR6osEh3JtKu2eYE0L7GlL9vMMnAc0c AUj53BqTTdVeffo/rFJn86GNzvzm9NpNHdCt4NhbJAHdL0dCiyKCYfdsQhIuBuDSypFP T/M0dJ/bFu1Cs6XH7Bj0MXZX5HoO4+qsZ8H9YdcT5GG9D+VULXDGTy9yMRqqUVvWrou8 mrsXjEl1pyqwwl9p5+l+xTj42xxNTtwsADsmyMWKpJ+itwl8tjZsTjRnkvH1h7nUiEB0 Tlnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Tro3+YgJ; 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 a19si1202138otk.60.2020.04.01.09.27.23; Wed, 01 Apr 2020 09:27:35 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Tro3+YgJ; 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 S2387582AbgDAQZn (ORCPT + 99 others); Wed, 1 Apr 2020 12:25:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:50020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387447AbgDAQZl (ORCPT ); Wed, 1 Apr 2020 12:25:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB57820BED; Wed, 1 Apr 2020 16:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758340; bh=ok2/8NJSWUu4X9e1M4vYeide9GdcckmZsFccmMIamaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tro3+YgJHwTro9W8gDV9L4A4Dt+eBqTzcZN20PCquTDGsxCJtSCsJDIMkrbajdBOS 3XvEeb7EeMRJsVr7HR1ErHzXmDksoJTOgGQNKHdtMY/oS3gjCwrmjnAwUpFQclYNgA eDAU0KMj5q8PS8FwY892k3AGPH8SCCi9OoQcRoYI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Mika Westerberg , Linus Walleij Subject: [PATCH 4.19 060/116] gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk Date: Wed, 1 Apr 2020 18:17:16 +0200 Message-Id: <20200401161550.716241766@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161542.669484650@linuxfoundation.org> References: <20200401161542.669484650@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede commit efaa87fa0947d525cf7c075316adde4e3ac7720b upstream. Commit aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") added a quirk for some models of the HP x2 10 series. There are 2 issues with the comment describing the quirk: 1) The comment claims the DMI quirk applies to all Cherry Trail based HP x2 10 models. In the mean time I have learned that there are at least 3 models of the HP x2 10 models: Bay Trail SoC + AXP288 PMIC Cherry Trail SoC + AXP288 PMIC Cherry Trail SoC + TI PMIC And this quirk's DMI matches only match the Cherry Trail SoC + TI PMIC SoC, which is good because we want a slightly different quirk for the others. This commit updates the comment to make it clear that the quirk is only for the Cherry Trail SoC + TI PMIC models. 2) The comment says that it is ok to disable wakeup on all ACPI GPIO event handlers, because there is only the one for the embedded-controller events. This is not true, there also is a handler for the special INT0002 device which is related to USB wakeups. We need to also disable wakeups on that one because the device turns of the USB-keyboard built into the dock when closing the lid. The XHCI controller takes a while to notice this, so it only notices it when already suspended, causing a spurious wakeup because of this. So disabling wakeup on all handlers is the right thing to do, but not because there only is the one handler for the EC events. This commit updates the comment to correctly reflect this. Fixes: aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200302111225.6641-1-hdegoede@redhat.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpiolib-acpi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1299,12 +1299,14 @@ static const struct dmi_system_id gpioli }, { /* - * Various HP X2 10 Cherry Trail models use an external - * embedded-controller connected via I2C + an ACPI GPIO - * event handler. The embedded controller generates various - * spurious wakeup events when suspended. So disable wakeup - * for its handler (it uses the only ACPI GPIO event handler). - * This breaks wakeup when opening the lid, the user needs + * HP X2 10 models with Cherry Trail SoC + TI PMIC use an + * external embedded-controller connected via I2C + an ACPI GPIO + * event handler on INT33FF:01 pin 0, causing spurious wakeups. + * When suspending by closing the LID, the power to the USB + * keyboard is turned off, causing INT0002 ACPI events to + * trigger once the XHCI controller notices the keyboard is + * gone. So INT0002 events cause spurious wakeups too. Ignoring + * EC wakes breaks wakeup when opening the lid, the user needs * to press the power-button to wakeup the system. The * alternative is suspend simply not working, which is worse. */