From patchwork Mon Mar 15 08:05:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1453075 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=GQVAwVFN; 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 4DzTWT4zfsz9sWF; Mon, 15 Mar 2021 19:05:57 +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 1lLiEc-0007Vd-5M; Mon, 15 Mar 2021 08:05:54 +0000 Received: from mail-pl1-f169.google.com ([209.85.214.169]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lLiEa-0007V7-NJ for kernel-team@lists.ubuntu.com; Mon, 15 Mar 2021 08:05:52 +0000 Received: by mail-pl1-f169.google.com with SMTP id w7so11400885pll.8 for ; Mon, 15 Mar 2021 01:05:52 -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=/4fatlZ9pvwTZSRJFX2y6m8kngNgYZafVIFsOVFj2ys=; b=GQVAwVFNHG7NvImHdxTp60vHr7Kh4GtAu8IvX7feYiOXOT1dOFpdTinthzt+LwAd4Y /dK31YToKZxQidc21GJX4/ZrU8e2OGiKllH/TiEFsa7O4f6SS7C/WgENcrVR7qFqzZ7M 9vUMzHB3g1yTLEdtoBUXBsVe8j98tg1yqJnQVGIF0aukQkm0pUxRjbrmKqairfFKvx1p tZCQMZWVcU5Gm04N65ThBPeiPeApGTjOJzl/Rnr5FFA3TAZviD5kc2UI4+0t0RDAn4uo mi/az2iPEkhHMFDZP3v89ojVBRKCCibCp6f2UupvOxpyfBWD7Jf4cutb7dReZXchk9b3 R9gg== 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=/4fatlZ9pvwTZSRJFX2y6m8kngNgYZafVIFsOVFj2ys=; b=UNU/d32zsmHytIUgS5KhDf6iHsG1M1c3IBWhtppfk9BDcqo2adFFrXHBhv4CFhtNM8 iSuge+Oq59xX1Fw7CYsKcg4BK9HYuR50lq3ruZCZPcERygOKSsuY6NoE56I7xvId8lse 9ES2Mi2sNqUZpPCVIFqMe8uH24zCWmesSZyzJ+zU1SBfLs/OgwHkC5eQjMzmSuAsu26j AhXxWYtN7yu/+PyajFrcjsp51e5udvjskXrPNigdRBaaWxFiPUK8BSZeE6wTB8f0SbJx 16Ufk5AcB+XLQFhGXmRK4NvVCT+t7cjqcaZWTMfhUVImH8OFLVYnsoWCOjFreDL30Yyc jhZQ== X-Gm-Message-State: AOAM5331E4lu5DgeED5D8o+1q6OwlQfshM6K6KU3ba3DCa7x2392I47K UzBBhZAB8AzKmrpz4o5FzIgyiMXmgo0= X-Google-Smtp-Source: ABdhPJzDKHaBTn9OfA9pihbcLWVw1DGR/bHkbVU9Aqocsh8dazputQJlAo4TfXwvsXHmJbxrRp4B2w== X-Received: by 2002:a17:90a:4d07:: with SMTP id c7mr11689124pjg.104.1615795550258; Mon, 15 Mar 2021 01:05:50 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id i7sm11450223pgq.16.2021.03.15.01.05.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 01:05:49 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][F] UBUNTU: SAUCE: Input: i8042 - add dmi quirk Date: Mon, 15 Mar 2021 16:05:41 +0800 Message-Id: <20210315080541.62269-3-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.169; envelope-from=acelan@gmail.com; helo=mail-pl1-f169.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 85e449a91f52..b084a9ef0345 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -172,6 +173,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); @@ -1556,6 +1575,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)