aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2010-10-10 17:59:19 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:22:10 -0700
commit96b9e83231f543391c29d12e1e65ddb2ed963154 (patch)
tree9b30ebf4e1b0af8875066d11f75c58a255a42a41 /drivers/usb/otg
parenta9138192d0e716c3e9714b3fe03543d93ebbad9f (diff)
downloadkernel_samsung_smdk4412-96b9e83231f543391c29d12e1e65ddb2ed963154.zip
kernel_samsung_smdk4412-96b9e83231f543391c29d12e1e65ddb2ed963154.tar.gz
kernel_samsung_smdk4412-96b9e83231f543391c29d12e1e65ddb2ed963154.tar.bz2
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/otg')
-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 e0d2a5c..059d9ac 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
@@ -29,12 +29,23 @@
#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>
+
+struct ulpi_info {
+ unsigned int id;
+ char *name;
+};
+
#define ULPI_ID(vendor, product) (((vendor) << 16) | (product))
+#define ULPI_INFO(_id, _name) \
+ { \
+ .id = (_id), \
+ .name = (_name), \
+ }
/* ULPI hardcoded IDs, used for probing */
-static unsigned int ulpi_ids[] = {
- ULPI_ID(0x04cc, 0x1504), /* NXP ISP1504 */
- ULPI_ID(0x0424, 0x0006), /* SMSC USB3319 */
+static struct ulpi_info ulpi_ids[] = {
+ ULPI_INFO(ULPI_ID(0x04cc, 0x1504), "NXP ISP1504"),
+ ULPI_INFO(ULPI_ID(0x0424, 0x0006), "SMSC USB3319"),
};
static int ulpi_set_otg_flags(struct otg_transceiver *otg)
@@ -179,9 +190,13 @@ static int ulpi_init(struct otg_transceiver *otg)
pr_info("ULPI transceiver vendor/product ID 0x%04x/0x%04x\n", vid, pid);
- for (i = 0; i < ARRAY_SIZE(ulpi_ids); i++)
- if (ulpi_ids[i] == ULPI_ID(vid, pid))
+ for (i = 0; i < ARRAY_SIZE(ulpi_ids); i++) {
+ if (ulpi_ids[i].id == ULPI_ID(vid, pid)) {
+ pr_info("Found %s ULPI transceiver.\n",
+ ulpi_ids[i].name);
break;
+ }
+ }
ret = ulpi_check_integrity(otg);
if (ret)