summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2017-02-22 19:23:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-09 10:22:08 +0100
commitfd567653bdb908009b650f079bfd4b63169e2ac4 (patch)
tree791ccf9dda1f062017a3ab46b48425fc1ff75fb3 /drivers/usb
parentusb: ohci-at91: Do not drop unhandled USB suspend control requests (diff)
downloadlinux-fd567653bdb908009b650f079bfd4b63169e2ac4.tar.xz
linux-fd567653bdb908009b650f079bfd4b63169e2ac4.zip
usb: phy: isp1301: Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/phy/phy-isp1301.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-isp1301.c b/drivers/usb/phy/phy-isp1301.c
index db68156568e6..b3b33cf7ddf6 100644
--- a/drivers/usb/phy/phy-isp1301.c
+++ b/drivers/usb/phy/phy-isp1301.c
@@ -33,6 +33,12 @@ static const struct i2c_device_id isp1301_id[] = {
};
MODULE_DEVICE_TABLE(i2c, isp1301_id);
+static const struct of_device_id isp1301_of_match[] = {
+ {.compatible = "nxp,isp1301" },
+ { },
+};
+MODULE_DEVICE_TABLE(of, isp1301_of_match);
+
static struct i2c_client *isp1301_i2c_client;
static int __isp1301_write(struct isp1301 *isp, u8 reg, u8 value, u8 clear)
@@ -130,6 +136,7 @@ static int isp1301_remove(struct i2c_client *client)
static struct i2c_driver isp1301_driver = {
.driver = {
.name = DRV_NAME,
+ .of_match_table = of_match_ptr(isp1301_of_match),
},
.probe = isp1301_probe,
.remove = isp1301_remove,