Skip to contentSkip to conversation

mdio-gpio: Add mdc pin direction initialization

PATCH New Paulius Zaleckas 1 participant 1 message Feb 9, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mdio-gpio: Add mdc pin direction initialization

mdc pin should always be output. Initialize it as output, so each board code does not need to do this.

---

 drivers/net/phy/mdio-gpio.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/phy/mdio-gpio.c +2 -0
index a439ebe..af28ff7 100644
@@ -125,6 +125,8 @@ static int __devinit mdio_gpio_bus_init(struct device *dev,
 	if (gpio_request(bitbang->mdio, "mdio"))
 		goto out_free_mdc;
 
+	gpio_direction_output(bitbang->mdc, 0);
+
 	dev_set_drvdata(dev, new_bus);
 
 	ret = mdiobus_register(new_bus);