Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: ethernet: stm32: add get_phy() support #85448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ramram885
Copy link

implementation of get_phy() added.

Copy link

github-actions bot commented Feb 8, 2025

Hello @ramram885, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

implementation of get_phy() added.

Signed-off-by: Ram Mahesh <rammaheshram1234@gmail.com>
Comment on lines +1255 to +1260
static const struct device *eth_stm32_hal_get_phy(const struct device *dev)
{
ARG_UNUSED(dev);
return eth_stm32_phy_dev;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static const struct device *eth_stm32_hal_get_phy(const struct device *dev)
{
ARG_UNUSED(dev);
return eth_stm32_phy_dev;
}
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_mdio)
static const struct device *eth_stm32_hal_get_phy(const struct device *dev)
{
ARG_UNUSED(dev);
return eth_stm32_phy_dev;
}
#endif /* DT_HAS_COMPAT_STATUS_OKAY(st_stm32_mdio) */

@@ -1277,6 +1283,7 @@ static const struct ethernet_api eth_api = {
#endif /* CONFIG_PTP_CLOCK_STM32_HAL */
.get_capabilities = eth_stm32_hal_get_capabilities,
.set_config = eth_stm32_hal_set_config,
.get_phy = eth_stm32_hal_get_phy,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.get_phy = eth_stm32_hal_get_phy,
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_mdio)
.get_phy = eth_stm32_hal_get_phy,
#endif

@maass-hamburg
Copy link
Collaborator

this PR was first: #80258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants