From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 1/4] pinctrl: single: Prepare for supporting SoC specific features Date: Mon, 29 Jul 2013 01:57:34 -0700 Message-ID: <20130729085731.GW7656@atomide.com> References: <20130607203936.16513.57494.stgit@localhost> <20130607205037.16513.84242.stgit@localhost> <20130608152732.GR3331@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org To: Linus Walleij Cc: Haojian Zhuang , "devicetree-discuss@lists.ozlabs.org" , Peter Ujfalusi , Linux-OMAP , "linux-arm-kernel@lists.infradead.org" , Roger Quadros List-Id: devicetree@vger.kernel.org * Linus Walleij [130722 14:22]: > On Sat, Jun 8, 2013 at 5:27 PM, Tony Lindgren wrote: > > > Subject: [PATCH] pinctrl: single: Prepare for supporting SoC specific features > > > > Let's replace is_pinconf with flags and add struct pcs_soc so we > > can support also other features like pin wake-up events. Let's > > export the probe so the SoC specific modules can pass their > > SoC specific data to pinctrl-single if needed. > > I don't quite understand this motivation. Can this be more verbose and > include a bit about the mechanics? > > - Why is this necessary? For example, pinctrl-single already supports > generic pinconf, and we can surely add a PIN_CONFIG_WAKEUP > to include/linux/pinctrl/pinconf-generic.h. OK I'll take a look. I like the irqchip idea, let's see what all is missing after that. > - Also: how does this cooperate with irq_set_wake()? If a pin is > set to GPIO it is often backed by a GPIO driver (which is calling > pinctrl_request_gpio() etc), maybe we should just add a > pinctrl_set_wake() then that the irqchip portions of the GPIO drivers > can call down to so the pinctrl driver sets this bit if need be? Yes currently we're missing the mapping between GPIO registers and pinctrl registers. But your idea of using irqchip + pinctrl_set_wake() might sort that issue. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 From: tony@atomide.com (Tony Lindgren) Date: Mon, 29 Jul 2013 01:57:34 -0700 Subject: [PATCH 1/4] pinctrl: single: Prepare for supporting SoC specific features In-Reply-To: References: <20130607203936.16513.57494.stgit@localhost> <20130607205037.16513.84242.stgit@localhost> <20130608152732.GR3331@atomide.com> Message-ID: <20130729085731.GW7656@atomide.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org * Linus Walleij [130722 14:22]: > On Sat, Jun 8, 2013 at 5:27 PM, Tony Lindgren wrote: > > > Subject: [PATCH] pinctrl: single: Prepare for supporting SoC specific features > > > > Let's replace is_pinconf with flags and add struct pcs_soc so we > > can support also other features like pin wake-up events. Let's > > export the probe so the SoC specific modules can pass their > > SoC specific data to pinctrl-single if needed. > > I don't quite understand this motivation. Can this be more verbose and > include a bit about the mechanics? > > - Why is this necessary? For example, pinctrl-single already supports > generic pinconf, and we can surely add a PIN_CONFIG_WAKEUP > to include/linux/pinctrl/pinconf-generic.h. OK I'll take a look. I like the irqchip idea, let's see what all is missing after that. > - Also: how does this cooperate with irq_set_wake()? If a pin is > set to GPIO it is often backed by a GPIO driver (which is calling > pinctrl_request_gpio() etc), maybe we should just add a > pinctrl_set_wake() then that the irqchip portions of the GPIO drivers > can call down to so the pinctrl driver sets this bit if need be? Yes currently we're missing the mapping between GPIO registers and pinctrl registers. But your idea of using irqchip + pinctrl_set_wake() might sort that issue. Regards, Tony