diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-11 14:16:13 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-11 14:20:51 +0100 |
commit | 0826d25d3699a34385c740f9bff90693411eebf3 (patch) | |
tree | 4e21cb3c26631b9ff4749b727a5b1c2aa12d7f7f /include/linux | |
parent | 369d39adfe79334db5ed04d6f2acaf096c68b8a2 (diff) | |
download | barebox-0826d25d3699a34385c740f9bff90693411eebf3.tar.gz barebox-0826d25d3699a34385c740f9bff90693411eebf3.tar.xz |
net: phy: Add PHY_ID_MATCH_* macros
Linux has some macros to describe matching phy ids to vendors and
models. Add them to barebox for upcoming realtek phy driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/phy.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 82c8da03ce..ce72861bfc 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -274,6 +274,10 @@ struct phy_driver { #define PHY_ANY_ID "MATCH ANY PHY" #define PHY_ANY_UID 0xffffffff +#define PHY_ID_MATCH_EXACT(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 0) +#define PHY_ID_MATCH_MODEL(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 4) +#define PHY_ID_MATCH_VENDOR(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 10) + /* A Structure for boards to register fixups with the PHY Lib */ struct phy_fixup { struct list_head list; |