From patchwork Wed Mar 22 12:15:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Werner Sembach X-Patchwork-Id: 666232 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 C02F4C6FD1C for ; Wed, 22 Mar 2023 12:16:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229747AbjCVMQ0 (ORCPT ); Wed, 22 Mar 2023 08:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbjCVMQ0 (ORCPT ); Wed, 22 Mar 2023 08:16:26 -0400 Received: from srv6.fidu.org (srv6.fidu.org [IPv6:2a01:4f8:231:de0::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9594D3BC7B; Wed, 22 Mar 2023 05:16:23 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by srv6.fidu.org (Postfix) with ESMTP id 549E9C80099; Wed, 22 Mar 2023 13:16:21 +0100 (CET) Authentication-Results: srv6.fidu.org (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=tuxedocomputers.com 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=1679487381; x=1681301782; bh=IRZoqkpa2JHwbYME4Oy9ZTuc 3HU99D7pCB2zpCPss9g=; b=HUiSPVimsdwzqqgpGNVkAxhU9SSw36QmXd9dGOEG U2+4Ld2RN/fvLQwxZ0nYzMfI5kG0syWimHSDYd73jGaB0/NftgLME0861khpxFVE eJH2MpZDwyNiTLUMpSXD6Vyz/tYTFu4HwVGac4U9ZplWoEKoJQyEsBCbInhGXdDZ +9w= 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 iWhx4iGhRRD5; Wed, 22 Mar 2023 13:16:21 +0100 (CET) Received: from wsembach-tuxedo.fritz.box (host-212-18-30-247.customer.m-online.net [212.18.30.247]) (Authenticated sender: wse@tuxedocomputers.com) by srv6.fidu.org (Postfix) with ESMTPA id B7372C80091; Wed, 22 Mar 2023 13:16:20 +0100 (CET) From: Werner Sembach To: Mika Westerberg , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski Cc: Werner Sembach , 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 NL5xNU Date: Wed, 22 Mar 2023 13:15:47 +0100 Message-Id: <20230322121547.14997-1-wse@tuxedocomputers.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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 NL5xNU there is a mistake in the ACPI tables that the TP_ATTN# signal connected to GPIO 9 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 9. This patch is analoge to a very similar patch for NL5xRU, just the DMI string changed. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org --- drivers/gpio/gpiolib-acpi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 34ff048e70d0e..055013f959b25 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1624,6 +1624,19 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = { .ignore_interrupt = "AMDI0030:00@18", }, }, + { + /* + * Spurious wakeups from TP_ATTN# pin + * Found in BIOS 1.7.8 + * https://gitlab.freedesktop.org/drm/amd/-/issues/1722#note_1720627 + */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"), + }, + .driver_data = &(struct acpi_gpiolib_dmi_quirk) { + .ignore_wake = "ELAN0415:00@9", + }, + }, { /* * Spurious wakeups from TP_ATTN# pin