From patchwork Fri Feb 10 16:46:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Werner Sembach X-Patchwork-Id: 652541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE42DC636D4 for ; Fri, 10 Feb 2023 16:55:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232933AbjBJQzZ (ORCPT ); Fri, 10 Feb 2023 11:55:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232921AbjBJQzW (ORCPT ); Fri, 10 Feb 2023 11:55:22 -0500 X-Greylist: delayed 516 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 10 Feb 2023 08:55:19 PST Received: from srv6.fidu.org (srv6.fidu.org [159.69.62.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B3CC795DF for ; Fri, 10 Feb 2023 08:55:19 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by srv6.fidu.org (Postfix) with ESMTP id D4885C800A2; Fri, 10 Feb 2023 17:46:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= tuxedocomputers.com; h=content-transfer-encoding:mime-version :x-mailer:message-id:date:date:subject:subject:from:from; s= default; t=1676047600; x=1677862001; bh=lj97MTYeLUXW3JItQJS6lNK9 mm2JV8JsthYXirBOGx8=; b=JuM4kqBvklfLXluBBfWLjKv1niL1TfQWHYfbihPU UJz3nZfg6xwJE8ow7Fz2sDabohr6Cnyyn4kkEEzVeUIrd08Kms7rgt/Hgcgv+nnp oCAstjE93qjfoXMGpf8S0PBe2F9c0qODJws5uxzuqGalkWkP21EEXWmL4hTkHhGv ZFw= X-Virus-Scanned: Debian amavisd-new at srv6.fidu.org Received: from srv6.fidu.org ([127.0.0.1]) by localhost (srv6.fidu.org [127.0.0.1]) (amavisd-new, port 10026) with LMTP id 7xQoZMhkBKNk; Fri, 10 Feb 2023 17:46:40 +0100 (CET) Received: from wsembach-tuxedo.fritz.box (host-88-217-226-44.customer.m-online.net [88.217.226.44]) (Authenticated sender: wse@tuxedocomputers.com) by srv6.fidu.org (Postfix) with ESMTPA id 18BC0C8009D; Fri, 10 Feb 2023 17:46:40 +0100 (CET) From: Werner Sembach To: mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpiolib: acpi: Add a ignore wakeup quirk for Clevo NH5xAx Date: Fri, 10 Feb 2023 17:46:36 +0100 Message-Id: <20230210164636.628462-1-wse@tuxedocomputers.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") changed the policy such that I2C touchpads may be able to wake up the system by default if the system is configured as such. However on Clevo NH5xAx/TUXEDO XA15 Gen10 there is a mistake in the ACPI tables that the TP_ATTN# signal connected to GPIO 10 is configured as ActiveLow and level triggered but connected to a pull up. As soon as the system suspends the touchpad loses power and then the system wakes up. To avoid this problem, introduce a quirk for this model that will prevent the wakeup capability for being set for GPIO 10. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org # v6.1+ --- drivers/gpio/gpiolib-acpi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index e2ab4d5253bea..82e8e43582eba 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1612,6 +1612,18 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = { .ignore_wake = "ELAN0415:00@9", }, }, + { + /* + * Spurious wakeups from TP_ATTN# pin + * Found in BIOS 1.7.7 + */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"), + }, + .driver_data = &(struct acpi_gpiolib_dmi_quirk) { + .ignore_wake = "SYNA1202:00@16", + }, + }, {} /* Terminating entry */ };