Message ID | 1306095684-7732-3-git-send-email-gg@slimlogic.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, May 22, 2011 at 09:21:24PM +0100, Graeme Gregory wrote: > The twl6025 uses a different regulator for USB than the 6030 so select > the correct regulator name depending on the subclass of device. Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 22/05/11 23:51, Mark Brown wrote: > On Sun, May 22, 2011 at 09:21:24PM +0100, Graeme Gregory wrote: >> The twl6025 uses a different regulator for USB than the 6030 so select >> the correct regulator name depending on the subclass of device. > > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, On Mon, May 23, 2011 at 10:58:27AM +0100, Liam Girdwood wrote: > On 22/05/11 23:51, Mark Brown wrote: > > On Sun, May 22, 2011 at 09:21:24PM +0100, Graeme Gregory wrote: > >> The twl6025 uses a different regulator for USB than the 6030 so select > >> the correct regulator name depending on the subclass of device. > > > > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> > > Acked-by: Liam Girdwood <lrg@ti.com> Maybe it's better for you to carry this one Liam. I'm done taking patches for this merge window and this is related to the same series adding support to twl6025. Either that or this will be pending until 2.6.41 merge window.
On 23/05/11 12:13, Balbi, Felipe wrote: > Hi, > > On Mon, May 23, 2011 at 10:58:27AM +0100, Liam Girdwood wrote: >> On 22/05/11 23:51, Mark Brown wrote: >>> On Sun, May 22, 2011 at 09:21:24PM +0100, Graeme Gregory wrote: >>>> The twl6025 uses a different regulator for USB than the 6030 so select >>>> the correct regulator name depending on the subclass of device. >>> >>> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> >> >> Acked-by: Liam Girdwood <lrg@ti.com> > > Maybe it's better for you to carry this one Liam. I'm done taking > patches for this merge window and this is related to the same series > adding support to twl6025. Either that or this will be pending until > 2.6.41 merge window. > Ok, I've now applied it to regulator. Thanks ! Liam -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index 3f2e070..cfb5aa7 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c @@ -100,6 +100,7 @@ struct twl6030_usb { u8 linkstat; u8 asleep; bool irq_enabled; + unsigned long features; }; #define xceiv_to_twl(x) container_of((x), struct twl6030_usb, otg) @@ -204,6 +205,12 @@ static int twl6030_start_srp(struct otg_transceiver *x) static int twl6030_usb_ldo_init(struct twl6030_usb *twl) { + char *regulator_name; + + if (twl->features & TWL6025_SUBCLASS) + regulator_name = "ldousb"; + else + regulator_name = "vusb"; /* Set to OTG_REV 1.3 and turn on the ID_WAKEUP_COMP */ twl6030_writeb(twl, TWL6030_MODULE_ID0 , 0x1, TWL6030_BACKUP_REG); @@ -214,7 +221,7 @@ static int twl6030_usb_ldo_init(struct twl6030_usb *twl) /* Program MISC2 register and set bit VUSB_IN_VBAT */ twl6030_writeb(twl, TWL6030_MODULE_ID0 , 0x10, TWL6030_MISC2); - twl->usb3v3 = regulator_get(twl->dev, "vusb"); + twl->usb3v3 = regulator_get(twl->dev, regulator_name); if (IS_ERR(twl->usb3v3)) return -ENODEV; @@ -409,6 +416,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev) twl->dev = &pdev->dev; twl->irq1 = platform_get_irq(pdev, 0); twl->irq2 = platform_get_irq(pdev, 1); + twl->features = pdata->features; twl->otg.dev = twl->dev; twl->otg.label = "twl6030"; twl->otg.set_host = twl6030_set_host;
The twl6025 uses a different regulator for USB than the 6030 so select the correct regulator name depending on the subclass of device. Since V1 Use features passed via platform data instead of global variable. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> --- drivers/usb/otg/twl6030-usb.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)