Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755483AbcCQUBC (ORCPT ); Thu, 17 Mar 2016 16:01:02 -0400 Received: from mail.kernel.org ([198.145.29.136]:50308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbcCQUBA (ORCPT ); Thu, 17 Mar 2016 16:01:00 -0400 Date: Thu, 17 Mar 2016 15:00:54 -0500 From: Rob Herring To: Stefan Agner Cc: shawnguo@kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org, kernel@pengutronix.de, sergeimir@emcraft.com, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCH 14/18] gpio: vf610: add support for WKPU unit Message-ID: <20160317200054.GA3799@rob-hp-laptop> References: <1457576219-7971-1-git-send-email-stefan@agner.ch> <1457576219-7971-15-git-send-email-stefan@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457576219-7971-15-git-send-email-stefan@agner.ch> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1890 Lines: 52 On Wed, Mar 09, 2016 at 06:16:55PM -0800, Stefan Agner wrote: > WKPU unit support within the VF610 GPIO driver. The WKPU unit allows > some GPIO to be the wakeup source from lowest power modes LPSTOPx. > The relationship between the GPIO banks and the WKPU GPIO numbering > can be derived from the device tree property fsl,gpio-wakeup. > > Signed-off-by: Stefan Agner > --- > .../devicetree/bindings/gpio/gpio-vf610.txt | 6 + > drivers/gpio/gpio-vf610.c | 151 +++++++++++++++++++++ > 2 files changed, 157 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.txt b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt > index 436cc99..985ddfd 100644 > --- a/Documentation/devicetree/bindings/gpio/gpio-vf610.txt > +++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt > @@ -22,6 +22,12 @@ Required properties for GPIO node: > 4 = active high level-sensitive. > 8 = active low level-sensitive. > > +Option properties: Optional > +- fsl,gpio-wakeup : map GPIOs to WKPU unit, 3 argument cells per phandle phandle to what? > + cell 1: First GPIO (relative to the GPIO block) > + cell 2: First GPIO of the WKPU unit > + cell 3: Number of consecutive GPIO's An interrupt-map could work here instead even though I'm guessing you don't make the WKPU an interrupt parent. Your table would look something like this: GPIO#> > + > Note: Each GPIO port should have an alias correctly numbered in "aliases" > node. > > diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c > index 1a022be..650a41a 100644 > --- a/drivers/gpio/gpio-vf610.c > +++ b/drivers/gpio/gpio-vf610.c The WKPU seems to purely be an interrupt controller. Perhaps you should use stacked irq domain here. Then it would not be tied into the GPIO controller at all. Rob