diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-01-18 06:09:42 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-01-18 06:09:42 +0300 |
commit | 87a26f2bd66866cdecdb3bca41e0885abbe3ee36 (patch) | |
tree | 2fde52ae7e276de1c647104a7910ead9926908b3 /include | |
parent | 0c68c8e5ec68262b6aee7cdbc32d95f4f1599fc8 (diff) | |
parent | 7b3c4c370c09313e22b555e79167e73d233611d1 (diff) | |
download | linux-87a26f2bd66866cdecdb3bca41e0885abbe3ee36.tar.xz |
Merge tag 'regmap-mdio-c45-rework' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Mark Brown says:
====================
regmap: Rework regmap_mdio_c45_{read|write} for new C45 API.
This reworks the regmap MDIO handling of C45 addresses in
preparation for some forthcoming updates to the networking code.
* tag 'regmap-mdio-c45-rework' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: Rework regmap_mdio_c45_{read|write} for new C45 API.
====================
Link: https://lore.kernel.org/r/Y8VjkgcWHjR9TzNw@sirena.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index a3bc695bcca0..029b9e09d3ca 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -38,6 +38,14 @@ struct regmap_field; struct snd_ac97; struct sdw_slave; +/* + * regmap_mdio address encoding. IEEE 802.3ae clause 45 addresses consist of a + * device address and a register address. + */ +#define REGMAP_MDIO_C45_DEVAD_SHIFT 16 +#define REGMAP_MDIO_C45_DEVAD_MASK GENMASK(20, 16) +#define REGMAP_MDIO_C45_REGNUM_MASK GENMASK(15, 0) + /* An enum of all the supported cache types */ enum regcache_type { REGCACHE_NONE, |