Commit 83be181b authored by Peter Chen's avatar Peter Chen Committed by Felipe Balbi

usb: phy: mxs: add controller id

It is used to access un-regulator registers according to
different controllers.
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 22db05ec
...@@ -106,6 +106,7 @@ struct mxs_phy { ...@@ -106,6 +106,7 @@ struct mxs_phy {
struct clk *clk; struct clk *clk;
const struct mxs_phy_data *data; const struct mxs_phy_data *data;
struct regmap *regmap_anatop; struct regmap *regmap_anatop;
int port_id;
}; };
static int mxs_phy_hw_init(struct mxs_phy *mxs_phy) static int mxs_phy_hw_init(struct mxs_phy *mxs_phy)
...@@ -250,6 +251,11 @@ static int mxs_phy_probe(struct platform_device *pdev) ...@@ -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.io_priv = base;
mxs_phy->phy.dev = &pdev->dev; mxs_phy->phy.dev = &pdev->dev;
mxs_phy->phy.label = DRIVER_NAME; mxs_phy->phy.label = DRIVER_NAME;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment