Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277545
b: refs/heads/master
c: 6488270
h: refs/heads/master
i:
  277543: f0a1db4
v: v3
  • Loading branch information
Srinivas Kandagatla authored and David S. Miller committed Nov 15, 2011
1 parent aa2bd30 commit 69d0953
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 229a66e3bec97563aa92e25dfe0bc60b0d468619
refs/heads/master: 64882709ef07f3eae29c7afc5aa8b84d12733a72
9 changes: 9 additions & 0 deletions trunk/drivers/net/phy/mdio-bitbang.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ static int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val)
return 0;
}

static int mdiobb_reset(struct mii_bus *bus)
{
struct mdiobb_ctrl *ctrl = bus->priv;
if (ctrl->reset)
ctrl->reset(bus);
return 0;
}

struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl)
{
struct mii_bus *bus;
Expand All @@ -214,6 +222,7 @@ struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl)

bus->read = mdiobb_read;
bus->write = mdiobb_write;
bus->reset = mdiobb_reset;
bus->priv = ctrl;

return bus;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/phy/mdio-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static struct mii_bus * __devinit mdio_gpio_bus_init(struct device *dev,
goto out;

bitbang->ctrl.ops = &mdio_gpio_ops;
bitbang->ctrl.reset = pdata->reset;
bitbang->mdc = pdata->mdc;
bitbang->mdio = pdata->mdio;

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mdio-bitbang.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ struct mdiobb_ops {

struct mdiobb_ctrl {
const struct mdiobb_ops *ops;
/* reset callback */
int (*reset)(struct mii_bus *bus);
};

/* The returned bus is not yet registered with the phy layer. */
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mdio-gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ struct mdio_gpio_platform_data {

unsigned int phy_mask;
int irqs[PHY_MAX_ADDR];
/* reset callback */
int (*reset)(struct mii_bus *bus);
};

#endif /* __LINUX_MDIO_GPIO_H */

0 comments on commit 69d0953

Please sign in to comment.