Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933282AbdC3Q5f (ORCPT ); Thu, 30 Mar 2017 12:57:35 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:47985 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932582AbdC3Q5d (ORCPT ); Thu, 30 Mar 2017 12:57:33 -0400 From: Gregory CLEMENT To: Linus Walleij Cc: "linux-gpio\@vger.kernel.org" , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Thomas Petazzoni , "linux-arm-kernel\@lists.infradead.org" , Rob Herring , "devicetree\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" , Nadav Haklai , Victor Gu , Marcin Wojtas , Wilson Ding , Hua Jing , Neta Zur Hershkovits Subject: Re: [PATCH v2 5/7] pinctrl: aramda-37xx: Add irqchip support References: <0e60fccd7913b83ee53d2921ce8f297927e8b6f3.1490120798.git-series.gregory.clement@free-electrons.com> <87vaqtadry.fsf@free-electrons.com> <87mvc5a3hh.fsf@free-electrons.com> Date: Thu, 30 Mar 2017 18:57:30 +0200 In-Reply-To: (Linus Walleij's message of "Wed, 29 Mar 2017 04:18:19 +0200") Message-ID: <874lya8zyd.fsf@free-electrons.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 32 Hi Linus, On mer., mars 29 2017, Linus Walleij wrote: >>> It has irq_create_mapping(gpiochip->irqdomain, offset); that get >>> called for every IRQ, and that will eventually call irq_of_parse_and_map() >>> if the IRQs are defined in the device tree. (IIRC) >> >> When I followed the functions called I never find a call to >> irq_of_parse_and_map(), the closer things related to device tree I found >> was: >> "virq = irq_domain_alloc_descs(-1, 1, hwirq, of_node_to_nid(of_node), >> NULL);" >> http://elixir.free-electrons.com/source/kernel/irq/irqdomain.c?v=4.11-rc4#L507 > > I don't know if I'm rambling or what. I'm pretty sure it gets called, maybe > even earlier, like when the DT is parsed for the platform. We have so many > drivers not seemingly needing this, but if your driver needs it, all others > may need to be fixed too. > > Can you put a print in irq_of_parse_and_map() and see what happens? So if I don't call it explicitly in my driver, then this function is never called for the gpio. Gregory -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com