1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __DEVICE_MDIO_H__
4 #define __DEVICE_MDIO_H__
6 #include <device/device.h>
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
);
14 /* Helper for getting mdio operations from a device */
15 const struct mdio_bus_operations
*dev_get_mdio_ops(struct device
*dev
);
17 uint16_t mdio_read(struct device
*dev
, uint8_t offset
);
18 void mdio_write(struct device
*dev
, uint8_t offset
, uint16_t val
);
20 #endif /* __DEVICE_MDIO_H__ */