Re: [PATCH 2/8] ARM: OMAP3: Initialize regulators for Beagle and Overo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 28, 2009 at 07:00:13PM +0100, Mark Brown wrote:
> On Thu, May 28, 2009 at 10:33:20AM -0700, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> [090528 09:20]:
> 
> > > I really hate it when I see this kind of initialization after registration.
> > > It feels totally wrong and fragile.
> 
> > > At one point, I had clkdev matching using struct device pointer as well,
> > > but it was realised that was far too limiting - you couldn't declare
> > > clock entries without first having all devices setup, and then you run
> > > into problems with ordering.
> 
> > > It looks like the regulator stuff is suffering this same problem - it
> > > wants to match by struct device pointer.  That's fine if all your
> > > struct device's are statically allocated, but as soon as you start
> > > having dynamic ones, it gets _much_ harder to cope with.
> 
> > Yeah. I believe Mark is working on sorting out the regulator fwk issues
> > regarding this.
> 
> Eh, no, not really.  It's the same as the clock API in this regard - if
> you want the struct device can be NULL and you can do a name based
> lookup only but then you have to pass the name around in platform data
> to support configurability.  If the clock API implements some other
> solutions we'll probably follow them but I'm not aware of any.

That's not quite what we're talking about.  With clkdev, you specify
device name itself, rather than address-of-struct-device.  Using the
device name gives you independence from the initialization or creation
of the struct device (if indeed the struct device is created at all.)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux