Skip to content

Conversation

tpambor
Copy link
Contributor

@tpambor tpambor commented Oct 6, 2025

Add support for hardware reset via GPIO in the ADIN2111 PHY driver.

The reset pin is configured via device tree using the reset-gpios property.

Copy link
Member

@maass-hamburg maass-hamburg left a comment

Choose a reason for hiding this comment

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

Also add
select GPIO if ..... to config PHY_ADIN2111 like on the other phys.

if (ret < 0) {
return ret;
}
k_busy_wait(50);
Copy link
Member

Choose a reason for hiding this comment

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

Should be a definite

#if ADIN2111_RST_GPIO_SUPPORT
const struct phy_adin2111_config *config = dev->config;

if (!config->reset_gpio.port) {
Copy link
Member

Choose a reason for hiding this comment

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

Invert if and put the new logic inside, so the goto isn't needed anymore

Comment on lines 107 to 109
#if ADIN2111_RST_GPIO_SUPPORT
const struct gpio_dt_spec reset_gpio;
#endif /* ADIN2111_RST_GPIO_SUPPORT */
Copy link
Member

Choose a reason for hiding this comment

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

put this after the mdio bus and not between bools.

Add support for hardware reset via GPIO in the ADIN2111 PHY driver.

The reset pin is configured via device tree using the reset-gpios
property.

Signed-off-by: Tim Pambor <[email protected]>
Copy link

sonarqubecloud bot commented Oct 7, 2025

@tpambor tpambor requested a review from maass-hamburg October 7, 2025 09:11
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.

3 participants