matiamic opened a new pull request, #16926: URL: https://github.com/apache/nuttx/pull/16926
## Summary This patch adds `mdio_phy_id_c45` macro. This macro allows encoding of additional information needed for MDIO Manageable Device (MMD) access into the `phy_id` field of the `mii_ioctl_data_s` structure. This macro is intended for use by user applications. This patch also adds macros for decoding the `phy_id` encoded with the `mdio_phy_id_c45` macro. These macros are intended for use by network drivers implementing SIOCxMIIREG commands. The mechanism is inspired by the approach used in Linux: https://elixir.bootlin.com/linux/v6.16.3/source/include/uapi/linux/mdio.h#L456-L465 https://elixir.bootlin.com/linux/v6.16.3/source/include/linux/mdio.h#L110-L123 This PR was preceded by discussion in PR https://github.com/apache/nuttx/pull/16911 ## Impact Network drivers now may implement access to MMD registers through ioctl. ## Testing The testing was performed by a testing application during development of a driver for 10BASE-T1x SPI MAC-PHYs. A mirrored bit between two registers - one in MII interface, second in an MMD space - was written to. The bit enables / disables the PHY. Same effect was observed when accessing the bit using MII and MMD. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org