Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335849
b: refs/heads/master
c: 3272dd9
h: refs/heads/master
i:
  335847: cb14c14
v: v3
  • Loading branch information
Srinivas Kandagatla authored and David S. Miller committed Nov 19, 2012
1 parent 4e102bf commit 33d546b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8495c0da20bc496ac9d5da2b292adb28f61d2713
refs/heads/master: 3272dd9b0fe4bc09321219ab65dc5eda3e82445c
9 changes: 8 additions & 1 deletion trunk/Documentation/devicetree/bindings/net/mdio-gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ gpios property as described in section VIII.1 in the following order:

MDC, MDIO.

Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"
node.

Example:

mdio {
aliases {
mdio-gpio0 = <&mdio0>;
};

mdio0: mdio {
compatible = "virtual,mdio-gpio";
#address-cells = <1>;
#size-cells = <0>;
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/net/phy/mdio-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,20 @@ static int __devinit mdio_gpio_probe(struct platform_device *pdev)
{
struct mdio_gpio_platform_data *pdata;
struct mii_bus *new_bus;
int ret;
int ret, bus_id;

if (pdev->dev.of_node)
if (pdev->dev.of_node) {
pdata = mdio_gpio_of_get_data(pdev);
else
bus_id = of_alias_get_id(pdev->dev.of_node, "mdio-gpio");
} else {
pdata = pdev->dev.platform_data;
bus_id = pdev->id;
}

if (!pdata)
return -ENODEV;

new_bus = mdio_gpio_bus_init(&pdev->dev, pdata, pdev->id);
new_bus = mdio_gpio_bus_init(&pdev->dev, pdata, bus_id);
if (!new_bus)
return -ENODEV;

Expand Down

0 comments on commit 33d546b

Please sign in to comment.