aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2010-10-10 11:59:19 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:22:10 -0400
commit96b9e83231f543391c29d12e1e65ddb2ed963154 (patch)
tree9b30ebf4e1b0af8875066d11f75c58a255a42a41 /drivers/usb
parenta9138192d0e716c3e9714b3fe03543d93ebbad9f (diff)
USB: otg/ulpi: extend id's table.
Extend id's table to have ulpi phy names in it. Report if the known phy is found. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/otg/ulpi.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c
index e0d2a5c504c..059d9ac0ab5 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
@@ -29,12 +29,23 @@
29#include <linux/usb/otg.h> 29#include <linux/usb/otg.h>
30#include <linux/usb/ulpi.h> 30#include <linux/usb/ulpi.h>
31 31
32
33struct ulpi_info {
34 unsigned int id;
35 char *name;
36};
37
32#define ULPI_ID(vendor, product) (((vendor) << 16) | (product)) 38#define ULPI_ID(vendor, product) (((vendor) << 16) | (product))
39#define ULPI_INFO(_id, _name) \
40 { \
41 .id = (_id), \
42 .name = (_name), \
43 }
33 44
34/* ULPI hardcoded IDs, used for probing */ 45/* ULPI hardcoded IDs, used for probing */
35static unsigned int ulpi_ids[] = { 46static struct ulpi_info ulpi_ids[] = {
36 ULPI_ID(0x04cc, 0x1504), /* NXP ISP1504 */ 47 ULPI_INFO(ULPI_ID(0x04cc, 0x1504), "NXP ISP1504"),
37 ULPI_ID(0x0424, 0x0006), /* SMSC USB3319 */ 48 ULPI_INFO(ULPI_ID(0x0424, 0x0006), "SMSC USB3319"),
38}; 49};
39 50
40static int ulpi_set_otg_flags(struct otg_transceiver *otg) 51static int ulpi_set_otg_flags(struct otg_transceiver *otg)
@@ -179,9 +190,13 @@ static int ulpi_init(struct otg_transceiver *otg)
179 190
180 pr_info("ULPI transceiver vendor/product ID 0x%04x/0x%04x\n", vid, pid); 191 pr_info("ULPI transceiver vendor/product ID 0x%04x/0x%04x\n", vid, pid);
181 192
182 for (i = 0; i < ARRAY_SIZE(ulpi_ids); i++) 193 for (i = 0; i < ARRAY_SIZE(ulpi_ids); i++) {
183 if (ulpi_ids[i] == ULPI_ID(vid, pid)) 194 if (ulpi_ids[i].id == ULPI_ID(vid, pid)) {
195 pr_info("Found %s ULPI transceiver.\n",
196 ulpi_ids[i].name);
184 break; 197 break;
198 }
199 }
185 200
186 ret = ulpi_check_integrity(otg); 201 ret = ulpi_check_integrity(otg);
187 if (ret) 202 if (ret)