From patchwork Wed Jan 25 08:30:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 13115122 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 043C4C27C76 for ; Wed, 25 Jan 2023 08:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZWq2W5uiP6vqL7cWfcUa7eMXubo4Qcw5mkHO9Xsz7LQ=; b=AesvAFPPKHxthP U92F96Gpk7DdRtUkg8xNz77l3vWsqh4ob+i5zLJV/6PcgDhoSMI4mNvjvjtV6GNZhZ+Hu07FCIbYk pwcekEiO5Jwq693zQ1Rm/rrzrUhlAV5bf4tj5seEij+yvedl+f9MqKRID+b3vYVt7PIxx/iXErhTQ /WsvSf3079SJmbsrZ/682CVsSzv9a9JaBdZTKMTttJAfW+E3q3XpvRlZJHO6jIKt48u5CHHTlKFP1 vnLqjc0gM/MDQOdQlwdiFkzlZPYCcZuDtHVxshxzPXrP7YyaagKIG2e0CBi5IIP10GEToOO7KhrYj h012WZ/87NzXD9Cck76Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKbB8-006Qrz-M3; Wed, 25 Jan 2023 08:30:46 +0000 Received: from forward100o.mail.yandex.net ([37.140.190.180]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKbB2-006QmZ-P3 for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 08:30:43 +0000 Received: from sas2-ffeb92823cb1.qloud-c.yandex.net (sas2-ffeb92823cb1.qloud-c.yandex.net [IPv6:2a02:6b8:c08:6803:0:640:ffeb:9282]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 6DF8D52ABE00; Wed, 25 Jan 2023 11:30:33 +0300 (MSK) Received: by sas2-ffeb92823cb1.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id UUKCeP8ZA4Y1-yKFqrCCN; Wed, 25 Jan 2023 11:30:32 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1674635432; bh=Nz8cIXhLQKYa93vDg4gntVAYXm7H7DwzGbURAEZehlU=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=UWHBaFOZTq3hXwc0tLeo/xSevHCIOs9mduVrPSLe14feKTPGG8uWUY3Y97D6pT3yV V0wId8eFERmNTBhFLFsdE17jxCK9L5X3hCCELp98GVayBX6aNPwI8etpr+Pr9f9JkO IXIVymJ39fnt8hdydAoSvyqsx4O3QihvKKeULbcQ= Authentication-Results: sas2-ffeb92823cb1.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin To: linux-gpio@vger.kernel.org Cc: Nikita Shubin , Hartley Sweeten , Alexander Sverdlin , Russell King , Lukasz Majewski , Linus Walleij , Bartosz Golaszewski , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/3] gpio: ep93xx: Fix port F hwirq numbers in handler Date: Wed, 25 Jan 2023 11:30:24 +0300 Message-Id: <20230125083026.5399-2-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230125083026.5399-1-nikita.shubin@maquefel.me> References: <20230117100845.16708-1-nikita.shubin@maquefel.me> <20230125083026.5399-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_003041_609835_53F070D8 X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix wrong translation of irq numbers in port F handler, as ep93xx hwirqs increased by 1, we should simply decrease them by 1 in translation. Fixes: 482c27273f52 ("ARM: ep93xx: renumber interrupts") Signed-off-by: Nikita Shubin Acked-by: Arnd Bergmann --- drivers/gpio/gpio-ep93xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c index 2e1779709113..7edcdc575080 100644 --- a/drivers/gpio/gpio-ep93xx.c +++ b/drivers/gpio/gpio-ep93xx.c @@ -148,7 +148,7 @@ static void ep93xx_gpio_f_irq_handler(struct irq_desc *desc) */ struct irq_chip *irqchip = irq_desc_get_chip(desc); unsigned int irq = irq_desc_get_irq(desc); - int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */ + int port_f_idx = (irq & 7) ^ 4; /* {20..23,48..51} -> {0..7} */ int gpio_irq = EP93XX_GPIO_F_IRQ_BASE + port_f_idx; chained_irq_enter(irqchip, desc);