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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E67EC433EF for ; Thu, 30 Sep 2021 14:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0804A60FC0 for ; Thu, 30 Sep 2021 14:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351849AbhI3ONT (ORCPT ); Thu, 30 Sep 2021 10:13:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:57016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351826AbhI3ONR (ORCPT ); Thu, 30 Sep 2021 10:13:17 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1791560FC0; Thu, 30 Sep 2021 14:11:35 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mVwmb-00E0In-58; Thu, 30 Sep 2021 15:11:33 +0100 Date: Thu, 30 Sep 2021 15:11:32 +0100 Message-ID: <87y27erw4r.wl-maz@kernel.org> From: Marc Zyngier To: Daniel Palmer Cc: Linus Walleij , DTML , Rob Herring , Thomas Gleixner , linux-arm-kernel , Romain Perier Subject: Re: [PATCH 2/3] irqchip: SigmaStar SSD20xD gpi In-Reply-To: References: <20210914100415.1549208-1-daniel@0x0f.com> <20210914100415.1549208-3-daniel@0x0f.com> <87zgs7vavl.wl-maz@kernel.org> <87wnnbv6ac.wl-maz@kernel.org> <87lf3quydn.wl-maz@kernel.org> <874ka2tdqe.wl-maz@kernel.org> <871r56tbir.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: daniel@0x0f.com, linus.walleij@linaro.org, devicetree@vger.kernel.org, robh+dt@kernel.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, romain.perier@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, 30 Sep 2021 14:59:24 +0100, Daniel Palmer wrote: > > Hi Marc, > > On Thu, 30 Sept 2021 at 22:53, Marc Zyngier wrote: > > Somehow, the handler for this interrupt is set to handle_bad_irq(), > > which probably isn't what you want. You'll have to find out who sets > > this (there is a comment about that in gpiolib.c, but I haven't had a > > chance to find where this is coming from). > > > > Do you happen to set it in your driver? > > The gpio driver (gpio-msc313.c) sets it during probe: > > gpioirqchip = &gpiochip->irq; > gpioirqchip->chip = &msc313_gpio_irqchip; > gpioirqchip->fwnode = of_node_to_fwnode(dev->of_node); > gpioirqchip->parent_domain = parent_domain; > gpioirqchip->child_to_parent_hwirq = match_data->child_to_parent_hwirq; > gpioirqchip->populate_parent_alloc_arg = match_data->populate_parent_fwspec; > gpioirqchip->handler = handle_bad_irq; > gpioirqchip->default_type = IRQ_TYPE_NONE; Right. I have no idea why this is a requirement, and I would normally set it to whatever is the normal flow handler on this HW, but this looks like the GPIO subsystem has some expectations here. I'll let Linus comment on it. M. -- Without deviation from the norm, progress is not possible.