From patchwork Mon Mar 15 08:05:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1453073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cLYoD6Zk; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DzTWR67z2z9sR4; Mon, 15 Mar 2021 19:05:54 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lLiEY-0007Ud-Uz; Mon, 15 Mar 2021 08:05:50 +0000 Received: from mail-pl1-f175.google.com ([209.85.214.175]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lLiEX-0007UE-OA for kernel-team@lists.ubuntu.com; Mon, 15 Mar 2021 08:05:49 +0000 Received: by mail-pl1-f175.google.com with SMTP id 30so10335258ple.4 for ; Mon, 15 Mar 2021 01:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EbqET1ZDfPsds2DiiwSCh8sUcc8G+/+sMW2f5fnW7tQ=; b=cLYoD6Zk6T4/VlzTzOoGENnMUWdOSBtBEgwcnXclvEKqDIFgFR4ZAap435WRHgom/k y99FKjpCd/mfZ/eLl/YRHLrkBjjbAK/zKfkzpvxFBg4btfpqySXvw/8bjiIs6/Gb9nCg 0jsQw1bddYculEeVfffnOWRnti5QaesjwLMthqAgG46r+fk+KaLYzLtkP4NwMDEHTSHn JZRUk15ZrWaj16fjPU2jTREFJoIKQmWNgPy65Qn12pM2nzC3C7PtYw+uCDeIh7g3t4pY 3HQDXZ+QShXNJrwWcVAGausoVqM1cE2ijPgUvwy7hoMSwi2Gr/XpeFqrSe9JSYq7tq2V C82Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EbqET1ZDfPsds2DiiwSCh8sUcc8G+/+sMW2f5fnW7tQ=; b=txoOCBNEPwDhc2NAeLdHw4UMohr//HHbXUj9osC/sxJdSbtTThUaicZMDmRx5Uu9Nl nOyaR/juDR70iW0QR/e8Hl++lLVh45FbecX6c6RM1ffaGIHd1GjUlw8i5YeyfZt4bRBh lAxO0vNDTJ85oL02ZUVwFzCOU34ofJY5WCH9v2Y2dcR4wmoPzzjvWFrIEKO8Me4aJuAk VMQtd4tJqodCVru4qtH/+GZ5la6Ah2G9drW1gwfLJwv0EdTZhNvwCpbLPie629i2Cs45 gbDkDXAfSyqo27lKrF4e8d8RJ7sJ/JrjveIS+U4NqiJPClWnf+HVdwRCNuM0IPgnY26h vFDQ== X-Gm-Message-State: AOAM530EAxDIZRU1hYo4bCbgFEXB/cvoBstYTzVXePFl2Jn0tEnxZjQp OY75pGblpa1wsjli9ViUDFeNZZsKb+g= X-Google-Smtp-Source: ABdhPJyyq7P0pCyaKgkO8oZyLONs6dBlTN6PDeQsxjrkEBC55Y8m174lMEGVekKu+1n9KmNwBH/8Jw== X-Received: by 2002:a17:902:6845:b029:e4:4d0f:c207 with SMTP id f5-20020a1709026845b02900e44d0fc207mr10386931pln.36.1615795546972; Mon, 15 Mar 2021 01:05:46 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id d19sm9632111pjs.55.2021.03.15.01.05.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 01:05:46 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][G][H][OEM-5.10] UBUNTU: SAUCE: Input: i8042 - add dmi quirk Date: Mon, 15 Mar 2021 16:05:40 +0800 Message-Id: <20210315080541.62269-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210315080541.62269-1-acelan.kao@canonical.com> References: <20210315080541.62269-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.175; envelope-from=acelan@gmail.com; helo=mail-pl1-f175.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Chia-Lin Kao (AceLan)" BugLink: https://bugs.launchpad.net/bugs/1919123 On some platforms, the EC doesn't support the register reading sequence for sentelic[1], and then make the EC can't respond commands for a while when probing. It leads to the keyboard non-responsive for around 10 seconds while waking up from s2idle. [ 44.304488] i8042: [9804] d4 -> i8042 (command) [ 44.304634] i8042: [9804] f3 -> i8042 (parameter) [ 44.304787] i8042: [9804] fa <- i8042 (interrupt, 1, 12) [ 44.304855] i8042: [9804] d4 -> i8042 (command) [ 44.304938] i8042: [9804] 66 -> i8042 (parameter) [ 44.337698] i8042: [9813] d4 -> i8042 (command) [ 44.905695] i8042: [9942] 88 -> i8042 (parameter) [ 45.497478] i8042: [10102] d4 -> i8042 (command) [ 46.098041] i8042: [10253] f3 -> i8042 (parameter) [ 46.098070] i8042: [10253] fe <- i8042 (interrupt, 1, 12) [ 46.718154] i8042: [10386] d4 -> i8042 (command) [ 47.309915] i8042: [10386] f4 -> i8042 (parameter) [ 47.918961] i8042: [10556] d4 -> i8042 (command) [ 48.402624] i8042: [10556] f6 -> i8042 (parameter) A DMI quirk to mark this platform doesn't have aux device could avoid those commands to be sent. And the system could still using i2c interface to communicate with the touchpad. 1. https://www.kernel.org/doc/html/v5.11/input/devices/sentelic.html#programming-sequence-for-register-reading-writing Signed-off-by: Chia-Lin Kao (AceLan) (cherry picked from https://lkml.org/lkml/2021/3/15/126) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/input/serio/i8042.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index dbe1810e6242..3d778c9616dc 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -174,6 +175,24 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id); static bool (*i8042_platform_filter)(unsigned char data, unsigned char str, struct serio *serio); +static int __init i8042_set_noaux(const struct dmi_system_id *dmi) +{ + i8042_noaux = true; + return 1; +} + +static const struct dmi_system_id i8042_quirks[] __initconst = { + { + .callback = i8042_set_noaux, + .ident = "Dell laptop", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Precision 5550"), + }, + }, + {}, +}; + void i8042_lock_chip(void) { mutex_lock(&i8042_mutex); @@ -1559,6 +1578,8 @@ static int __init i8042_probe(struct platform_device *dev) i8042_dritek_enable(); #endif + dmi_check_system(i8042_quirks); + if (!i8042_noaux) { error = i8042_setup_aux(); if (error && error != -ENODEV && error != -EBUSY)