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: 48059 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp164600wrn; Wed, 25 Jan 2023 00:36:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXudMlDsVh1YPUzorPXCE43kGci8xE3ZJUzI5i4/qGYbcMkAeqIi+8SMuSnyw4oI/V2250pT X-Received: by 2002:a17:90b:3eca:b0:22b:b89b:b9d0 with SMTP id rm10-20020a17090b3eca00b0022bb89bb9d0mr17737860pjb.22.1674635771372; Wed, 25 Jan 2023 00:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674635771; cv=none; d=google.com; s=arc-20160816; b=NUM//bLJ9R2klzTNsSPd9E+ZiPPzEXPZn0nSYfQci4HYbLPZcLaGF8eJRa50GiEkzh DYor8/Vy/UXVDP4FJpXjdNS6VPUgD8KrswBnqS3VQVtRuSD/PFY9tkHjzJM4QgyrFHRY 3ZLczdIiQ6KZINXW+h8dUX/HJz8eWuNPMUK6zo1ZQJlllh/xVvuHGOvGdvP38VsbbM8v 5QBaQIlj9Ey32A2zyEyJ6hCRyzQUI9JU0UZGpIn0NYRjxO+TYfVKXz3sbN9t/YbuY+LY QNhUPWFnI5ZD+5x6CR/pZvnO1Ius+9Y53qt66/JhxmBqd11lunEcA1wmTRfpZ5Kg67Gw nX3A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Nz8cIXhLQKYa93vDg4gntVAYXm7H7DwzGbURAEZehlU=; b=OhQtt9pAlDS8+4mz4fj5AN77Bqx6dvNECjRXT6k6OzJdkVnVL1PJ1ar/qqrG0qaV4X SqkizBNuPK0rwXZSKDv4lrVzIYNtDXkYLqfNPzAs+Uhn2coRi6IHxN5Eo9+bQTXtqOEC RxD/W+3Tpd7Gw1XZ6rXbuifkWaOQH0k5+11euJtd2fYsNTpRe3TLS5UWz92zPwutESEJ SdxLEBlyTF6CrQEJ/1giuncTuEx6Di7sDbgdKjnw1iczpaBe/PEkL1hlnBzO/uGNDoYl 11CxHGCv6cSxWAfjVvRzzHTQaryTVdomr+z1hqkFYDkvSH1mLSaYMeD+95L5LdofEqHW fhfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=UWHBaFOZ; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a637154000000b00439fb921f8fsi4914090pgn.460.2023.01.25.00.35.58; Wed, 25 Jan 2023 00:36:11 -0800 (PST) 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; dkim=pass header.i=@maquefel.me header.s=mail header.b=UWHBaFOZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235172AbjAYIco (ORCPT + 99 others); Wed, 25 Jan 2023 03:32:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235166AbjAYIcm (ORCPT ); Wed, 25 Jan 2023 03:32:42 -0500 X-Greylist: delayed 125 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 25 Jan 2023 00:32:38 PST Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE491632B; Wed, 25 Jan 2023 00:32:38 -0800 (PST) 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755982878206306784?= X-GMAIL-MSGID: =?utf-8?q?1755982878206306784?= 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);