Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252185
b: refs/heads/master
c: 5ccee4a
h: refs/heads/master
i:
  252183: f38f5ad
v: v3
  • Loading branch information
Graeme Gregory authored and Liam Girdwood committed May 27, 2011
1 parent 23481a4 commit 9093034
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d94aee577ea8179bd40f0f17e64cada25c66b85
refs/heads/master: 5ccee4ae8eab957ab6d534283db5bd27703dba03
10 changes: 9 additions & 1 deletion trunk/drivers/usb/otg/twl6030-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand All @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9093034

Please sign in to comment.