Re: [PATCH 6/6] ARM: OMAP3: Initialize more devices for LDP

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

 



On Mon, May 25, 2009 at 01:59:20PM +0100, Russell King - ARM Linux wrote:
> On Fri, May 22, 2009 at 03:45:41PM -0700, Tony Lindgren wrote:

> > +	/* link regulators to MMC adapters */
> > +	ldp_vmmc1_supply.dev = mmc[0].dev;

> This feels wrong - setup after registering devices.  All it takes is to
> have to move various device drivers to be earlier in the initialization
> ordering and things start breaking in unexpected ways.

> If MMC controls the Vmmc1 supply, then why does the Vmmc1 supply need
> the struct device pointer for the MMC controller?

Like the clock API the regulator API looks up clients for regulators
based on a combination of the struct device for the client driver and
the name of the supply.  Unfortunately with both the I2C and SPI APIs
the struct device is only available once the driver has probed so this
can't be set up with static data prior to probe, hence this sort of
bodge.

Long term I think we'll want to fix I2C and SPI to let us have static
data for this.
--
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