summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy-core.c
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2023-12-15 16:15:32 +0300
committerDavid S. Miller <davem@davemloft.net>2023-12-17 23:10:07 +0300
commit9eea577eb1155fe4a183bc5e7bf269b0b2e7a6ba (patch)
treeb2543c72a1a46290ae3f113d4f3d3a7cda9b2530 /drivers/net/phy/phy-core.c
parentebb30ccbbdbd6fae5177b676da4f4ac92bb4f635 (diff)
downloadlinux-9eea577eb1155fe4a183bc5e7bf269b0b2e7a6ba.tar.xz
net: phy: extend PHY package API to support multiple global address
Current API for PHY package are limited to single address to configure global settings for the PHY package. It was found that some PHY package (for example the qca807x, a PHY package that is shipped with a bundle of 5 PHY) requires multiple PHY address to configure global settings. An example scenario is a PHY that have a dedicated PHY for PSGMII/serdes calibrarion and have a specific PHY in the package where the global PHY mode is set and affects every other PHY in the package. Change the API in the following way: - Change phy_package_join() to take the base addr of the PHY package instead of the global PHY addr. - Make __/phy_package_write/read() require an additional arg that select what global PHY address to use by passing the offset from the base addr passed on phy_package_join(). Each user of this API is updated to follow this new implementation following a pattern where an enum is defined to declare the offset of the addr. We also drop the check if shared is defined as any user of the phy_package_read/write is expected to use phy_package_join first. Misuse of this will correctly trigger a kernel panic for NULL pointer exception. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy-core.c')
0 files changed, 0 insertions, 0 deletions