Re: Query: Regulator framework in EHCI driver

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

 



On Tue, Nov 03, 2009 at 12:55:53PM +0100, ext Gupta, Ajay Kumar wrote:
> Hi Anand/Felipe,
> 
> This is regarding regulator framework for 1V8 supply to EHCI PHY from twl4030 device.
> 
> [EHCI port on OMAP3EVM uses SMSC USB3320 PHY and uses 1V8 supply from twl4030 chip.]
> 
> I found twl4030_usb_ldo_init () function in drivers/usb/otg/twl4030-usb.c, which uses regulator framework but it can not be used by all the board which are not using twl4030 PHY. Don't you think this function need to be moved to some other common location?
> 
> Currently we are not enabling 1V8 supply explicitly but still EHCI works on EVM as most of the twl4030 supplies are enabled by default.
> 
> I was thinking of adding regulator framework in EHCI driver which will enable the required supplies based on one of the board_data passed (same as reset_gpio) from board files.

You should be able to regulator_get() the 1v8 supply and
regulator_enable() it. The regulator was already setup in twl4030-core.c
so that should work just fine. It's not a good idea to export
twl4030_ldo_init() since that's only for twl4030-usb itself. If you
regulator_get()/regulator_enable() then the regulator will be
refcounted.

You might want to add more consumers to the same supply based on board
information though. Today it's hardcoded to one for every board in
twl4030-core.c

-- 
balbi
--
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