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 X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51746C31E49 for ; Thu, 13 Jun 2019 16:49:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3469F2084D for ; Thu, 13 Jun 2019 16:49:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404250AbfFMQtG (ORCPT ); Thu, 13 Jun 2019 12:49:06 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:47152 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727666AbfFMEhV (ORCPT ); Thu, 13 Jun 2019 00:37:21 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hbHU5-0001Yz-Ai from Harish_Kandiga@mentor.com ; Wed, 12 Jun 2019 21:37:09 -0700 Received: from [10.0.3.15] (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 13 Jun 2019 05:37:01 +0100 Subject: Re: [PATCH] wlcore/wl18xx: Add invert-irq OF property for physically inverted IRQ To: Eugeniu Rosca , Marc Zyngier CC: Geert Uytterhoeven , Tony Lindgren , Kalle Valo , Eyal Reizer , Simon Horman , "David S. Miller" , Greg Kroah-Hartman , Randy Dunlap , Ulf Hansson , John Stultz , linux-wireless , netdev , Linux Kernel Mailing List , Spyridon Papageorgiou , Joshua Frkuska , "George G . Davis" , Andrey Gusakov , Linux-Renesas , Eugeniu Rosca , Thomas Gleixner , Jason Cooper , Linus Walleij References: <20190607172958.20745-1-erosca@de.adit-jv.com> <87tvcxncuq.fsf@codeaurora.org> <20190610083012.GV5447@atomide.com> <08bc4755-5f47-d792-8b5a-927b5fbe7619@arm.com> <20190612094538.GA16575@vmlxhi-102.adit-jv.com> <86d0jjglax.wl-marc.zyngier@arm.com> <20190612150644.GA22002@vmlxhi-102.adit-jv.com> From: Harish Jenny K N Message-ID: Date: Thu, 13 Jun 2019 10:06:45 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190612150644.GA22002@vmlxhi-102.adit-jv.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 12/06/19 8:36 PM, Eugeniu Rosca wrote: > Hi Marc, > > Thanks for your comment. > > On Wed, Jun 12, 2019 at 11:17:10AM +0100, Marc Zyngier wrote: >> Eugeniu Rosca wrote: >>> On Tue, Jun 11, 2019 at 10:00:41AM +0100, Marc Zyngier wrote: > [..] >>>> We already have plenty of that in the tree, the canonical example >>>> probably being drivers/irqchip/irq-mtk-sysirq.c. It should be pretty >>>> easy to turn this driver into something more generic. >>> I don't think drivers/irqchip/irq-mtk-sysirq.c can serve the >>> use-case/purpose of this patch. The MTK driver seems to be dealing with >>> the polarity inversion of on-SoC interrupts which are routed to GiC, >>> whereas in this patch we are talking about an off-chip interrupt >>> wired to R-Car GPIO controller. >> And how different is that? The location of the interrupt source is >> pretty irrelevant here. > The main difference which I sense is that a driver like irq-mtk-sysirq > mostly (if not exclusively) deals with internal kernel implementation > detail (tuned via DT) whilst adding an inverter for GPIO IRQs raises > a whole bunch of new questions (e.g. how to arbitrate between > kernel-space and user-space IRQ polarity configuration?). > >> The point is that there is already a general >> scheme to deal with these "signal altering widgets", and that we >> should try to reuse at least the concept, if not the code. > Since Harish Jenny K N might be working on a new driver doing GPIO IRQ > inversion, I have CC-ed him as well to avoid any overlapping work. Sorry I am not completely aware of the background discussion. But here is the link to my proposal for new consumer driver to provide a new virtual gpio controller to configure the polarity of the gpio pins used by the userspace. https://www.spinics.net/lists/linux-gpio/msg39681.html > >>> It looks to me that the nice DTS sketch shared by Linus Walleij in [5] >>> might come closer to the concept proposed by Geert? FWIW, the >>> infrastructure/implementation to make this possible is still not >>> ready. >> Which looks like what I'm suggesting. > Then we are on the same page. Thanks. > >> M. >> >> -- >> Jazz is not dead, it just smells funny.