Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6932489rwr; Tue, 25 Apr 2023 06:06:00 -0700 (PDT) X-Google-Smtp-Source: AKy350ZgBsR7uwZhwYpL8NyjEk+M4Lj+dDXsdyYN34mO7JmBL1MH2PK1fOT/21KYO8e+V0Q1r0Vg X-Received: by 2002:a81:6c50:0:b0:544:5816:b93 with SMTP id h77-20020a816c50000000b0054458160b93mr11055674ywc.10.1682427960437; Tue, 25 Apr 2023 06:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682427960; cv=none; d=google.com; s=arc-20160816; b=Ld+cLrU6tYbwhvH+PxgX2qKQpv4Z82n9MPRp/7lTC/iZ3w1SYsdw/YKAnG/fWIkl2z Ou6OHzHpDq3tQdb0tla4KlBdTHYZbOJiyYh1VO6UQcCmUN5HNddHaqZgyq82nZ6kxMwe n6XJWfgQW1aLjrHdvSHmoZXV7pEi3NJJnVwqjkjQ+byu2cvDc7FiaA2AyzNeDf/mlyl0 Ve1Q6zYrwzBgZ+hzUqhwKUh0heW+TWrwKVqos1/65zWDs+sxqrrpcIZbca0c57RMk28p +DwnYy8iGoQ5vAhM7Q+eDoTcYeGZD4j5bRZ8CE7nFckzBD0qxK9EmzSKF/thugan0/6j kDSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=dLJQkpu62M7pfyjaXkqFL91MHw/1hB1ryipCGrSnA7A=; b=RbtjwaZe8qRD10G0KJlxh9NPczOyKL/B6wiU9BGpDqeDZPC0xWEMzvo79lQ35BRgVe ZzL9NnHuPT1Ugm7bU/xWLtTkW7zEATL5B/+M5x6Oaux4fQhxoWCqfXIwSfIEgvI2aLAs ZmE8G+C6jUSd63Y/ctS5T0P0+sAHCwlom5GPaV42qDjh5S2DOC7bw4hQwkF7QdG/DDoQ X5mps04tqJtdG1O3MB/ikqPpiurlLFRpOY7a2l9c8lH1KTlD48+QYp0u6OCte+FR/6XG hokzxMcoJMvnJAmcr1eFko+TlIAikTLo4kP18VCfb8BufrJclIZqjIlFhy8xU8khkrQ1 9aGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m188-20020a0dfcc5000000b00552e4ac7de1si8477425ywf.537.2023.04.25.06.05.38; Tue, 25 Apr 2023 06:06:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234195AbjDYNBw (ORCPT + 99 others); Tue, 25 Apr 2023 09:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234201AbjDYNBk (ORCPT ); Tue, 25 Apr 2023 09:01:40 -0400 Received: from harvie.cz (harvie.cz [77.87.242.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 594D912C9B for ; Tue, 25 Apr 2023 06:01:30 -0700 (PDT) Received: from anemophobia.amit.cz (unknown [31.30.84.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by harvie.cz (Postfix) with ESMTPSA id D52B61800F6; Tue, 25 Apr 2023 15:01:27 +0200 (CEST) From: Tomas Mudrunka Cc: Tomas Mudrunka , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Fix freeze in lm8333 i2c keyboard driver Date: Tue, 25 Apr 2023 15:00:53 +0200 Message-Id: <20230425130054.591007-1-tomas.mudrunka@gmail.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS, SPF_SOFTFAIL,SPOOFED_FREEMAIL,SPOOF_GMAIL_MID,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LM8333 uses gpio interrupt line which is active-low. When interrupt is set to FALLING edge and button is pressed before driver loads, driver will miss the edge and never respond. To fix this we handle ONESHOT LOW interrupt rather than edge. Signed-off-by: Tomas Mudrunka --- drivers/input/keyboard/lm8333.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c index 7457c3220..c5770ebb2 100644 --- a/drivers/input/keyboard/lm8333.c +++ b/drivers/input/keyboard/lm8333.c @@ -179,7 +179,7 @@ static int lm8333_probe(struct i2c_client *client) } err = request_threaded_irq(client->irq, NULL, lm8333_irq_thread, - IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + IRQF_TRIGGER_LOW | IRQF_ONESHOT, "lm8333", lm8333); if (err) goto free_mem; -- 2.40.0