From mboxrd@z Thu Jan 1 00:00:00 1970 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 07D60C77B61 for ; Tue, 25 Apr 2023 13:10:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233862AbjDYNKF (ORCPT ); Tue, 25 Apr 2023 09:10:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233322AbjDYNKC (ORCPT ); Tue, 25 Apr 2023 09:10:02 -0400 X-Greylist: delayed 510 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 25 Apr 2023 06:10:00 PDT Received: from harvie.cz (harvie.cz [77.87.242.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B4C7913C1C for ; Tue, 25 Apr 2023 06:10:00 -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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-input@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