[PATCH] net: stmmac: Support gpio high-level reset for devices requiring it

Russell King (Oracle) linux at armlinux.org.uk
Tue Jul 8 21:25:04 PDT 2025


On Wed, Jul 09, 2025 at 09:58:21AM +0800, lizhe wrote:
> Hi, 
> 
> Thx !
> 
> i conducted an experiment, and no matter whether i configured it as 
> GPIO_ACTIVE_LOW or GPIO_ACTIVE_HIGH in the dts, the resulting
> GPIO pin state was 0, indicating a low level.
> 
> 
> if (delays[2])
>     msleep(DIV_ROUND_UP(DELAYS[2], 1000));
> 
> + gpio_state = gpiod_get_value_can_sleep(reset_gpio);
> + pr_info("gpio_state: %d\n", gpio_state);

Use gpiod_get_raw_value_cansleep().

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list