From patchwork Mon Feb 27 18:59:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Werner Sembach X-Patchwork-Id: 13154112 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 20B11C64ED8 for ; Mon, 27 Feb 2023 18:59:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbjB0S7W (ORCPT ); Mon, 27 Feb 2023 13:59:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjB0S7T (ORCPT ); Mon, 27 Feb 2023 13:59:19 -0500 Received: from srv6.fidu.org (srv6.fidu.org [IPv6:2a01:4f8:231:de0::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59C78B75B; Mon, 27 Feb 2023 10:59:17 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by srv6.fidu.org (Postfix) with ESMTP id EB8EEC800A2; Mon, 27 Feb 2023 19:59:13 +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 :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from; s=default; t=1677524353; x=1679338754; bh=nv PHU13DiB2jn0kJ1y/JEV9BlTwfA0upugNB7OXnblo=; b=OgMuXssREfliICSyiB prBefGRyr62UtnB0RjgBqDfLWrfIRL5PInwEehlFKG69umjxVIMUqCDP5kW1nQRQ XiAvhJcNKKtJLGLkZd0pnrQTMw2s5BWhNDHkz7wsPI8Aie8yJ5skbCsZMLzVMKxV EmclK4V0J8ySWdcZHximXZEIk= 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 UNjbz8pMYp71; Mon, 27 Feb 2023 19:59:13 +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 47DD8C800A1; Mon, 27 Feb 2023 19:59:13 +0100 (CET) From: Werner Sembach To: dmitry.torokhov@gmail.com, wse@tuxedocomputers.com, swboyd@chromium.org, gregkh@linuxfoundation.org, hdegoede@redhat.com, mkorpershoek@baylibre.com, chenhuacai@kernel.org, wsa+renesas@sang-engineering.com, tiwai@suse.de, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] Input: i8042 - add 2 more TUXEDO devices to i8042 and atkbd quirk tables Date: Mon, 27 Feb 2023 19:59:07 +0100 Message-Id: <20230227185907.569154-3-wse@tuxedocomputers.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227185907.569154-1-wse@tuxedocomputers.com> References: <20230227185907.569154-1-wse@tuxedocomputers.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org A lot of modern Clevo barebones have touchpad and/or keyboard issues after suspend fixable with nomux + reset + noloop + nopnp. Luckily, none of them have an external PS/2 port so this can safely be set for all of them. I'm not entirely sure if every device listed really needs all four quirks, but after testing and production use. No negative effects could be observed when setting all four. Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes the keyboard very laggy for ~5 seconds after boot and sometimes also after resume. To fix this atkbd_reset_fixup is also applied for this device via a quirk, which fixes it again. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org --- drivers/input/keyboard/atkbd.c | 24 ++++++++++++++++++++++++ drivers/input/serio/i8042-acpipnpio.h | 26 ++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index ef65c46c4efe..e89918347357 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -1886,6 +1886,30 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { }, .callback = atkbd_deactivate_fixup, }, + /* + * Some Clevo devices need this reset, otherwise they keyboard may + * be laggy after boot and/or resume for ~5 seconds. + */ + { + /* + * Clevo device, DMI_BOARD_VENDOR and DMI_SYSTEM_VENDOR + * differ between resellers. + */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "N150CU"), + }, + .callback = atkbd_reset_fixup, + }, + { + /* + * Clevo device, DMI_BOARD_VENDOR and DMI_SYSTEM_VENDOR + * differ between resellers. + */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NHxxRZQ"), + }, + .callback = atkbd_reset_fixup, + }, { } }; diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h index efc61736099b..6ed1044b4ba5 100644 --- a/drivers/input/serio/i8042-acpipnpio.h +++ b/drivers/input/serio/i8042-acpipnpio.h @@ -1116,6 +1116,19 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + /* + * Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes the + * keyboard very laggy for ~5 seconds after boot and sometimes also + * after resume. To fix this atkbd_reset_fixup is also applied for + * this device via a quirk, which fixes it again. + */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "N150CU"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"), @@ -1123,6 +1136,19 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + /* + * Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes the + * keyboard very laggy for ~5 seconds after boot and sometimes also + * after resume. To fix this atkbd_reset_fixup is also applied for + * this device via a quirk, which fixes it again. + */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NHxxRZQ"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),