From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [PATCH v4] gpio: Add support for Intel SoC PMIC (Crystal Cove) Date: Fri, 30 May 2014 11:25:03 +0300 Message-ID: <20140530082503.GA1645@lahna.fi.intel.com> References: <1400810423-14067-1-git-send-email-lejun.zhu@linux.intel.com> <538459E8.6010701@ti.com> <20140527084615.GC1801@lahna.fi.intel.com> <53847F39.2010503@ti.com> <20140529150058.GB6263@lahna.fi.intel.com> <53875A4B.2060604@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga11.intel.com ([192.55.52.93]:18399 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbaE3IZJ (ORCPT ); Fri, 30 May 2014 04:25:09 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Linus Walleij Cc: Grygorii Strashko , Alexandre Courbot , "Zhu, Lejun" , Mathias Nyman , "linux-gpio@vger.kernel.org" , Linux Kernel Mailing List , jacob.jun.pan@linux.intel.com, bin.yang@intel.com On Thu, May 29, 2014 at 05:22:05PM +0200, Linus Walleij wrote: > On Thu, May 29, 2014 at 6:03 PM, Grygorii Strashko > wrote: > > > Also, I'd like to note that GPIO IRQs can be accessible not only > > when GPIO chips is added, but also when IRQ domain is registered > > (at least it's valid for DT cases). In these cases gpiod_to_irq() > > might be not used at all. > > Yes. We concluded some time back that gpio_chip:s and > irq_chip:s are orthogonal abstractions: you should be able > to use one of them without paying any respect to the other. > > We only added the ability to flag GPIO lines as used for > IRQs so they would not be set to output by mistake... > (Straightening up the semantics.) > > The only real semantic dependence that really makes sense > is .to_irq() which leads to this semantic registration ordering. acpi_gpiochip_request_interrupts() depends on ->to_irq() to be set before acpi_gpiochip_add() is called. Since the ordering changes this won't work anymore. I'm thinking that could we solve this so that we call acpi_gpiochip_request_interrupts() at the end of gpiochip_irqchip_add() and convert both pinctrl-baytrail and gpio-lynxpoint to use gpiochip_irqchip_add()?