summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-mxs-usb.c
diff options
context:
space:
mode:
authorPeter Chen2014-02-24 03:21:00 +0100
committerFelipe Balbi2014-03-05 21:40:08 +0100
commit83be181b64222630957b9f59fd2d8c8864cb8972 (patch)
treef7c84878b409d96dc5de166fd095b1a7233f8836 /drivers/usb/phy/phy-mxs-usb.c
parentusb: phy: mxs: Enable IC fixes for related SoCs (diff)
downloadkernel-qcow2-linux-83be181b64222630957b9f59fd2d8c8864cb8972.tar.gz
kernel-qcow2-linux-83be181b64222630957b9f59fd2d8c8864cb8972.tar.xz
kernel-qcow2-linux-83be181b64222630957b9f59fd2d8c8864cb8972.zip
usb: phy: mxs: add controller id
It is used to access un-regulator registers according to different controllers. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-mxs-usb.c')
-rw-r--r--drivers/usb/phy/phy-mxs-usb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index cb7113543153..3009ab57614e 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -106,6 +106,7 @@ struct mxs_phy {
struct clk *clk;
const struct mxs_phy_data *data;
struct regmap *regmap_anatop;
+ int port_id;
};
static int mxs_phy_hw_init(struct mxs_phy *mxs_phy)
@@ -250,6 +251,11 @@ static int mxs_phy_probe(struct platform_device *pdev)
}
}
+ ret = of_alias_get_id(np, "usbphy");
+ if (ret < 0)
+ dev_dbg(&pdev->dev, "failed to get alias id, errno %d\n", ret);
+ mxs_phy->port_id = ret;
+
mxs_phy->phy.io_priv = base;
mxs_phy->phy.dev = &pdev->dev;
mxs_phy->phy.label = DRIVER_NAME;