usb: phy: ab8500-usb: add platform_device_id table
[linux-2.6-microblaze.git] / drivers / usb / phy / phy-ab8500-usb.c
index 63bb7cc..a0f7bec 100644 (file)
@@ -835,8 +835,8 @@ static int ab8500_usb_probe(struct platform_device *pdev)
                return err;
        }
 
-       /* Phy tuning values for AB8500 */
-       if (!is_ab8500_2p0_or_earlier(ab->ab8500)) {
+       /* Phy tuning values for AB8500 > v2.0 */
+       if (is_ab8500(ab->ab8500) && !is_ab8500_2p0_or_earlier(ab->ab8500)) {
                /* Enable the PBT/Bank 0x12 access */
                err = abx500_set_register_interruptible(ab->dev,
                                AB8500_DEVELOPMENT, AB8500_BANK12_ACCESS, 0x01);
@@ -943,11 +943,18 @@ static int ab8500_usb_remove(struct platform_device *pdev)
        return 0;
 }
 
+static struct platform_device_id ab8500_usb_devtype[] = {
+       { .name = "ab8500-usb", },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, ab8500_usb_devtype);
+
 static struct platform_driver ab8500_usb_driver = {
        .probe          = ab8500_usb_probe,
        .remove         = ab8500_usb_remove,
+       .id_table       = ab8500_usb_devtype,
        .driver         = {
-               .name   = "ab8500-usb",
+               .name   = "abx5x0-usb",
                .owner  = THIS_MODULE,
        },
 };
@@ -964,7 +971,6 @@ static void __exit ab8500_usb_exit(void)
 }
 module_exit(ab8500_usb_exit);
 
-MODULE_ALIAS("platform:ab8500_usb");
 MODULE_AUTHOR("ST-Ericsson AB");
 MODULE_DESCRIPTION("AB8500 usb transceiver driver");
 MODULE_LICENSE("GPL");