From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH v2 06/10] mmc: omap_hsmmc: add support for pbias configuration in dt Date: Thu, 13 Jun 2013 09:29:38 -0700 Message-ID: <20130613162937.GK8164@atomide.com> References: <20130523184045.GD13507@atomide.com> <1370546059-24181-1-git-send-email-balajitk@ti.com> <1370546059-24181-7-git-send-email-balajitk@ti.com> <20130613095353.GX8164@atomide.com> <51B9DA30.1090308@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Linus Walleij Cc: Ulf Hansson , Laurent Pinchart , Balaji T K , "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , "linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Mark Brown , Chris Ball , Linux-OMAP , Lee Jones List-Id: linux-mmc@vger.kernel.org * Linus Walleij [130613 08:35]: > On Thu, Jun 13, 2013 at 4:41 PM, Balaji T K wrote: > > > You mean regulator via pinctrl APIs, I think It will just move the code > > from omap_hsmmc to a new regulator file with it own init data for pinctrl. > > No I'm not saying you should use pinctrl as a "back-end" for this. > I mean you shall instantiate a regulator and let the callback ops > vtable for that regulator poke these bits. The interface to omap_hsmmc.c should be the regulator framework. This is because it allows us to clean up all the messed up before and after functions that really implement various GPIO regulators etc. > > It thought pinctrl-single,bits in pinctrl-single.c is introduced > > precisely for such misc control register which has bit configuration > > affecting different module i/o pads. > > No. If we go down that road *anything* that is connected to a > pad becomes part of the pinctrl subsystem, then pinctrl-single > becomes some kind of hardware abstraction or BIOS, and that > is *not* the intent. It is only supposed to deal with the bits > there that are 100% related to what pinctrl does, nothing else. Sounds like the way to go is to do a standalone regulator driver that optionally uses pinctrl-single,bits. But only for the bits in the PBIAS register that are 100% related to pinctrl. In any case the PBIAS regulator driver should be a separate driver as it may need to be a child of the SCM driver for PM needs in the future. Regards, Tony