summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-10-13 13:56:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-13 13:56:53 +0200
commit965a946c49e016bcff5bbfffaa1a468cd74af0db (patch)
treeef7154018382b5c84685c7048d1962d1cf8ccece /include
parent1b60c94270ef8011a0016f4e75cbb693e4ceb330 (diff)
parentbd4d0c0565aa440dc5e65e0b57e4ce31cbbd4a0f (diff)
downloadbarebox-965a946c49e016bcff5bbfffaa1a468cd74af0db.tar.gz
barebox-965a946c49e016bcff5bbfffaa1a468cd74af0db.tar.xz
Merge branch 'for-next/ksz8873'
Diffstat (limited to 'include')
-rw-r--r--include/driver.h5
-rw-r--r--include/linux/mdio-bitbang.h3
-rw-r--r--include/linux/mdio.h14
-rw-r--r--include/linux/phy.h1
4 files changed, 23 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index 543287a276..f48e906fec 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -618,4 +618,9 @@ static inline void *dev_get_priv(struct device_d *dev)
return dev->priv;
}
+static inline bool dev_is_probed(struct device_d *dev)
+{
+ return dev->driver ? true : false;
+}
+
#endif /* DRIVER_H */
diff --git a/include/linux/mdio-bitbang.h b/include/linux/mdio-bitbang.h
index a6e6057886..49fe435429 100644
--- a/include/linux/mdio-bitbang.h
+++ b/include/linux/mdio-bitbang.h
@@ -36,6 +36,9 @@ struct mdiobb_ctrl {
const struct mdiobb_ops *ops;
/* reset callback */
int (*reset)(struct mii_bus *bus);
+ unsigned int override_op_c22;
+ u8 op_c22_read;
+ u8 op_c22_write;
};
/* The returned bus is not yet registered with the phy layer. */
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index b910b05cec..a4aee49d8d 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -326,4 +326,18 @@ static inline __u16 mdio_phy_id_c45(int prtad, int devad)
#define MDIO_DEVAD_NONE (-1)
+struct phy_driver;
+
+int mdio_driver_register(struct phy_driver *drv);
+
+#define mdio_register_driver_macro(level, drv) \
+ static int __init drv##_register(void) \
+ { \
+ return mdio_driver_register(&drv); \
+ } \
+ level##_initcall(drv##_register)
+
+#define device_mdio_driver(drv) \
+ mdio_register_driver_macro(device, drv)
+
#endif /* _UAPI__LINUX_MDIO_H__ */
diff --git a/include/linux/phy.h b/include/linux/phy.h
index a4c3f43c06..ba1740ff55 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -223,6 +223,7 @@ struct phy_driver {
unsigned int phy_id_mask;
u32 features;
const void *driver_data;
+ bool is_phy;
/*
* Called to initialize the PHY,