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 8C404C61DA4 for ; Fri, 3 Feb 2023 10:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233668AbjBCK0m (ORCPT ); Fri, 3 Feb 2023 05:26:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233527AbjBCK0K (ORCPT ); Fri, 3 Feb 2023 05:26:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0B89A1454 for ; Fri, 3 Feb 2023 02:25:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 556FDB82A64 for ; Fri, 3 Feb 2023 10:25:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93E27C433EF; Fri, 3 Feb 2023 10:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1675419953; bh=f56znlzjrdcwOMryZQoMnkauanbKTnSKyumII1QUjUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JJeueYI6jdeNc7yQ0x6XCvQiXHZQ+XB5qpHAbEZ4eNIyP/Y4BeU29M8t9vfw5MkSK FM7Dv9oXlQ4Z6GsGO5Yd+uxeEtaGmeK3zhOKzpKarvOvx+Xl1BWgl3TTSYDRQ6A8kn Db797exUJcmA6q0nMRzSHsbwdFjoS/p6O8nJnewk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Linus Walleij , Marek Vasut , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.4 024/134] gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode Date: Fri, 3 Feb 2023 11:12:09 +0100 Message-Id: <20230203101024.929920879@linuxfoundation.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230203101023.832083974@linuxfoundation.org> References: <20230203101023.832083974@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Vasut [ Upstream commit 8e88a0feebb241cab0253698b2f7358b6ebec802 ] Always configure GPIO pins which are used as interrupt source as INPUTs. In case the default pin configuration is OUTPUT, or the prior stage does configure the pins as OUTPUT, then Linux will not reconfigure the pin as INPUT and no interrupts are received. Always configure the interrupt source GPIO pin as input to fix the above case. Reviewed-by: Linus Walleij Fixes: 07bd1a6cc7cbb ("MXC arch: Add gpio support for the whole platform") Signed-off-by: Marek Vasut Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpio-mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index c77d474185f3..2e4b6b176875 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c @@ -229,7 +229,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type) writel(1 << gpio_idx, port->base + GPIO_ISR); - return 0; + return port->gc.direction_input(&port->gc, gpio_idx); } static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio) -- 2.39.0