From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: Re: [PATCHv2] Input: omap4-keypad: Add pinctrl support Date: Tue, 23 Oct 2012 13:11:56 +0200 Message-ID: <20121023131156.13e2d0ae@skate> References: <1350911580-20307-1-git-send-email-sourav.poddar@ti.com> <20121022155028.GA13791@core.coreip.homeip.net> <508664CA.7000601@ti.com> <20121023100333.GA24418@arwen.pp.htv.fi> <20121023122312.56b23e1c@skate> <20121023102903.GA24820@arwen.pp.htv.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-omap-owner@vger.kernel.org To: Linus Walleij Cc: balbi@ti.com, "Rafael J. Wysocki" , Magnus Damm , Paul Mundt , Benoit Cousson , tony@atomide.com, devicetree-discuss@lists.ozlabs.org, Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Sourav Poddar , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Amit Kucheria , Stephen Warren List-Id: linux-input@vger.kernel.org On Tue, 23 Oct 2012 12:45:33 +0200, Linus Walleij wrote: > Hm so I have had this idea of runtime PM core helping out > with pins, so I could add something like > > pm_pins_fetch() > pm_pins_default() > pm_pins_idle() > pm_pins_sleep() > > So if one is using the pin states defined in > then the PM core can help out in > keeping track of the pins and states, and the driver will just tell > the PM core what to do and when. > > Would this fit the bill for everyone's code consolidation needs? > It would sure work for us... That surely would work but is kind of non-obvious when reading a driver's code: that's the problem with bus notifier, they do things a bit "behind your back" without you noticing. Having the driver request its own pinctrl state, and switch between states upon suspend/resume is a lot more explicit, IMO. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com