| 17 | } |
| 18 | |
| 19 | uint16_t mdio_read(struct device *dev, uint8_t offset) |
| 20 | { |
| 21 | const struct mdio_bus_operations *mdio_ops; |
| 22 | struct device *parent = dev->upstream->dev; |
| 23 | |
| 24 | assert(dev->path.type == DEVICE_PATH_MDIO); |
| 25 | mdio_ops = dev_get_mdio_ops(parent); |
| 26 | if (!mdio_ops) |
| 27 | return 0; |
| 28 | return mdio_ops->read(parent, dev->path.mdio.addr, offset); |
| 29 | } |
| 30 | void mdio_write(struct device *dev, uint8_t offset, uint16_t val) |
| 31 | { |
| 32 | const struct mdio_bus_operations *mdio_ops; |
no test coverage detected