Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200674
b: refs/heads/master
c: 7b4a036
h: refs/heads/master
v: v3
  • Loading branch information
Wolfram Sang authored and Greg Kroah-Hartman committed Jun 30, 2010
1 parent b57a394 commit 6f28b22
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: 2bb14cbf04ded4b9e394a6ba9e4f06b82fbac8b2
refs/heads/master: 7b4a036722cfab2b3922685ad473fac35a55c3fa
17 changes: 11 additions & 6 deletions trunk/drivers/usb/otg/ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,17 @@ static int ulpi_set_flags(struct otg_transceiver *otg)

static int ulpi_init(struct otg_transceiver *otg)
{
int i, vid, pid;

vid = (otg_io_read(otg, ULPI_VENDOR_ID_HIGH) << 8) |
otg_io_read(otg, ULPI_VENDOR_ID_LOW);
pid = (otg_io_read(otg, ULPI_PRODUCT_ID_HIGH) << 8) |
otg_io_read(otg, ULPI_PRODUCT_ID_LOW);
int i, vid, pid, ret;
u32 ulpi_id = 0;

for (i = 0; i < 4; i++) {
ret = otg_io_read(otg, ULPI_PRODUCT_ID_HIGH - i);
if (ret < 0)
return ret;
ulpi_id = (ulpi_id << 8) | ret;
}
vid = ulpi_id & 0xffff;
pid = ulpi_id >> 16;

pr_info("ULPI transceiver vendor/product ID 0x%04x/0x%04x\n", vid, pid);

Expand Down

0 comments on commit 6f28b22

Please sign in to comment.