Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2442379pxt; Mon, 9 Aug 2021 00:07:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdIihJA/hnxdSxQ5F6rYxifqEZlYxrecLc9IsvpnEkNVWEcUEAxvSJRFFHEo+gWwbc0jZ8 X-Received: by 2002:a50:f699:: with SMTP id d25mr5314680edn.323.1628492844179; Mon, 09 Aug 2021 00:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628492844; cv=none; d=google.com; s=arc-20160816; b=p/2MXZADHM4TdEqGP2rvELhiP15acslrN9oSASieIIMg2Av96nQ0r/cAbvOaHDkqKe /uphB0Sy/LeLdMiXHfmimtP2RmCAo+5+6aNCDUTqcf9b1ZDHF0KPtf3xKARZ7PDkWWvt lkV1dVARFK62jqxtW1Zpw/ooyXJbQikjixt1nWUpdEET9iAmwn83Hgty3BtuMwc2yqvD b9xqZ+hdWDj4cZ0C/wV1SVTxJ6UEIFETrp4S21trraBMW+WQqRkpkcGc5bm6q3Oc73w1 0ZoBaBvvj9pZiJVOs80opuT5622aPbC/AB+4q/mXk/aKPAlhayahSuaCk5F22ncOeEv5 Yi/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=80wlNqNIK3rm/8+pkiE58zByD6Mf+pJ36D0ZNxRacZE=; b=vJrWVjNV8ylxp43g344HmBENvfQXgcSVxj/4eFtexbX29ZT3Ul/dezlGEkJpE1sKP5 WGysLJz6Xny9H7Iu/8sJtZc8TBZzTI0bEW1zdNlgDiJatch+PhMMZ/6bmyqoa+n3lpQo RHZgIcsF3lFJCaljWKIUXrNuvkP+LxyxybyEQVNj0CrSXDiX+KRzKl/K/+8NWTB2u8O6 9OjINL9uB9jqPV6M4I+x37HYv62HIZGamMYV/W1HaR1NV2wTrk9qvMDbj2n1SHeOvwUB GZqTO8hilvQOPC/izHDOhIgUhvTA8gS+gXzj53EMzewgT8WrVCh4bxfK5M9XliY1CVZ1 GSUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cI069qXx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si2892780ejl.353.2021.08.09.00.06.59; Mon, 09 Aug 2021 00:07:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cI069qXx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232979AbhHIG5Z (ORCPT + 99 others); Mon, 9 Aug 2021 02:57:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231675AbhHIG5Y (ORCPT ); Mon, 9 Aug 2021 02:57:24 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CA6BC0613CF; Sun, 8 Aug 2021 23:57:04 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id a8so26371971pjk.4; Sun, 08 Aug 2021 23:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=80wlNqNIK3rm/8+pkiE58zByD6Mf+pJ36D0ZNxRacZE=; b=cI069qXxprc/9WM9pCWg33P6EJug9d0txqoro94MkeVa7iNilR7p6MkZXZuelotYw2 e9ce2biMwTTNYYrRa6PPDpscr6CXyM0xnUgS1PjFu76YfI2sBqb31LdYYP+GT668FKC9 5u2FDqlDUMBiOzjuM3AiQ0Sc8bs3X9pNb6+7u6YLphuMpHB8h20ZMfAowpFeCDFEW4uM v3g9xxf8nSgZQJgHm1Z3vL7Wpl+bg/yQUL26N4wbUjUxX2iHdni2K6POB6ez8gtpDZeu hrGLR4np5qY1nDXoZz4FWSkTcXR7wvkqQWuCX8WV8Gk6Lna2vtM9oglRhDCqj0OcYPQF oOtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=80wlNqNIK3rm/8+pkiE58zByD6Mf+pJ36D0ZNxRacZE=; b=MFn0Mmlsp7lp34aErucgsu1itARHzKlYQoyELy6nm6crjJq4kdCcuar3BiXVMko4Pv I2SqQJvOX4QV51dOrYpGNAyGQmZ5g78Apv3FM+2fzZwde6XKb0fc91DBSCthyhssmxu0 wbWy/CUVcakoTWPTydaV1BVjG77yW64Rb+QMcymOD/UI1DTHwUGyoFco6/c12uNwNlA1 TB7/h+Aq5wx6R3ptdt+/RiuqG19jjSNJ6XhZn9kHfBEpsrOn9gyHmUkRovMbSTiepxm1 ghkQno0iziMWDy3LcLwIAbLFaIzfMiwNpbcwh3oO9YaGNzmyxdBr3aNqtQM8DkeL9Dw9 mJKg== X-Gm-Message-State: AOAM532flX0DiqK/frEF27gi08N0/D1fYeEULUsBdhaBo/GvaZ6Cpaz1 TJt8KYqKXe/jx2S8D8QuUHQ= X-Received: by 2002:a17:902:ed82:b029:ef:48c8:128e with SMTP id e2-20020a170902ed82b02900ef48c8128emr19169945plj.72.1628492223950; Sun, 08 Aug 2021 23:57:03 -0700 (PDT) Received: from curtis.lan ([2601:602:9400:21ed:bb7a:44:1dde:b064]) by smtp.gmail.com with ESMTPSA id b10sm18654597pfi.122.2021.08.08.23.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Aug 2021 23:57:03 -0700 (PDT) From: Jim Broadus To: jikos@kernel.org, benjamin.tissoires@redhat.com Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, johnny.chuang.emc@gmail.com, kai.heng.feng@canonical.com, Jim Broadus Subject: [PATCH] HID: i2c-hid: Fix Elan touchpad regression Date: Sun, 8 Aug 2021 23:55:05 -0700 Message-Id: <20210809065505.6823-1-jbroadus@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A quirk was recently added for Elan devices that has same device match as an entry earlier in the list. The i2c_hid_lookup_quirk function will always return the last match in the list, so the new entry shadows the old entry. The quirk in the previous entry, I2C_HID_QUIRK_BOGUS_IRQ, silenced a flood of messages which have reappeared in the 5.13 kernel. This change moves the two quirk flags into the same entry. Fixes: ca66a6770bd9 (HID: i2c-hid: Skip ELAN power-on command after reset) Signed-off-by: Jim Broadus --- drivers/hid/i2c-hid/i2c-hid-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c index 46474612e73c..517141138b00 100644 --- a/drivers/hid/i2c-hid/i2c-hid-core.c +++ b/drivers/hid/i2c-hid/i2c-hid-core.c @@ -171,8 +171,6 @@ static const struct i2c_hid_quirks { I2C_HID_QUIRK_NO_IRQ_AFTER_RESET }, { I2C_VENDOR_ID_RAYDIUM, I2C_PRODUCT_ID_RAYDIUM_3118, I2C_HID_QUIRK_NO_IRQ_AFTER_RESET }, - { USB_VENDOR_ID_ELAN, HID_ANY_ID, - I2C_HID_QUIRK_BOGUS_IRQ }, { USB_VENDOR_ID_ALPS_JP, HID_ANY_ID, I2C_HID_QUIRK_RESET_ON_RESUME }, { I2C_VENDOR_ID_SYNAPTICS, I2C_PRODUCT_ID_SYNAPTICS_SYNA2393, @@ -183,7 +181,8 @@ static const struct i2c_hid_quirks { * Sending the wakeup after reset actually break ELAN touchscreen controller */ { USB_VENDOR_ID_ELAN, HID_ANY_ID, - I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET }, + I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET | + I2C_HID_QUIRK_BOGUS_IRQ }, { 0, 0 } }; -- 2.31.1