public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Gadiyar, Anand" <gadiyar@ti.com>
Cc: "Gupta, Ajay Kumar" <ajay.gupta@ti.com>,
	"felipe.balbi@nokia.com" <felipe.balbi@nokia.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Aggarwal, Anuj" <anuj.aggarwal@ti.com>
Subject: Re: Query: Regulator framework in EHCI driver
Date: Wed, 4 Nov 2009 14:41:26 +0000	[thread overview]
Message-ID: <20091104144126.GA30644@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB030A67DE6A@dbde02.ent.ti.com>

On Wed, Nov 04, 2009 at 08:00:52PM +0530, Gadiyar, Anand wrote:
> Mark Brown wrote:
> > On Wed, Nov 04, 2009 at 06:02:48PM +0530, Gupta, Ajay Kumar wrote:

> > > I can do regulator_get() and regulator_enable() but where ? Are you referring to board file?

> > > I was thinking of doing it in a generic form within EHCI driver (ehci-omap.c).

> > Do it in the EHCI driver.  The EHCI driver should just unconditionally
> > use the regulators, the regulator API will be compiled out if support is
> > disabled in Kconfig.

> NAK to do it unconditionally in the driver. This is board specific.
> It just so happens that this is the regulator used on the beagleboard
> and EVM, but it could very easily be another one (like on the SDP).

Obviously the physical regulator hookup is board specific - please take
a look at how the regulator API operates here, none of this needs to be
handled by drivers using the API which was what the discussion above
(regarding regulator_get() and regulator_enable()) was about.

regulator_get() takes the struct device for the consumer (the EHCI
controller in this case) and a name for the supply both of which depend
only on the consumer.  The board drivers set up the mapping from these
to actual physical regulators during initialisation and the whole
process is completely transparent to the consumer drivers, they can just
ask for a fixed thing.

> How about a hook from the platform code in mach-omap2/usb-ehci.c instead?

If this is needed something is broken.

  reply	other threads:[~2009-11-04 14:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03 11:55 Query: Regulator framework in EHCI driver Gupta, Ajay Kumar
2009-11-03 15:30 ` Felipe Balbi
2009-11-04 12:32   ` Gupta, Ajay Kumar
2009-11-04 13:39     ` Mark Brown
2009-11-04 14:30       ` Gadiyar, Anand
2009-11-04 14:41         ` Mark Brown [this message]
2009-11-04 14:45           ` Gadiyar, Anand
2009-11-04 14:48             ` Mark Brown
2009-11-04 14:50               ` Gadiyar, Anand
2009-11-04 14:56                 ` Mark Brown
2009-11-05  3:24                 ` Gupta, Ajay Kumar
2009-11-05  9:36                   ` Mark Brown
2009-11-05  9:41                     ` Felipe Balbi
2009-11-05 10:31                       ` Gadiyar, Anand
2009-11-05 11:19                         ` Mark Brown
2009-11-05 11:25                           ` Gadiyar, Anand
2009-11-11 14:56                             ` Gupta, Ajay Kumar
2009-11-11 15:46                               ` Mark Brown
2009-11-12  3:41                                 ` Gupta, Ajay Kumar
2009-11-12  3:51                                   ` Gupta, Ajay Kumar
2009-11-12  6:21                                   ` Gadiyar, Anand
2009-11-12  6:48                                     ` Gupta, Ajay Kumar
2009-11-12 12:16                                   ` Mark Brown
2009-11-13  4:22                                     ` Gupta, Ajay Kumar
2009-11-13 12:55                                       ` Mark Brown
2009-11-15  7:29                                         ` Gupta, Ajay Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091104144126.GA30644@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=ajay.gupta@ti.com \
    --cc=anuj.aggarwal@ti.com \
    --cc=felipe.balbi@nokia.com \
    --cc=gadiyar@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox