| 1 |
|
| 2 |
|
| 3 |
#ifndef __DEVICE_MDIO_H__ |
| 4 |
#define __DEVICE_MDIO_H__ |
| 5 |
|
| 6 |
#include <device/device.h> |
| 7 |
#include <types.h> |
| 8 |
|
| 9 |
struct mdio_bus_operations { |
| 10 |
uint16_t (*read)(struct device *dev, uint8_t phy_adr, uint8_t reg_adr); |
| 11 |
void (*write)(struct device *dev, uint8_t phy_adr, uint8_t reg_adr, uint16_t data); |
| 12 |
}; |
| 13 |
|
| 14 |
|
| 15 |
const struct mdio_bus_operations *dev_get_mdio_ops(struct device *dev); |
| 16 |
|
| 17 |
uint16_t mdio_read(struct device *dev, uint8_t offset); |
| 18 |
void mdio_write(struct device *dev, uint8_t offset, uint16_t val); |
| 19 |
|
| 20 |
#endif |