Thread (1 message) 1 message, 1 author, 2025-07-09

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

From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-07-09 17:02:01
Also in: linux-arm-kernel, lkml

On Thu, Jul 10, 2025 at 12:05:05AM +0800, lizhe wrote:
Hi,
Please don't top post.
    snps, reset-gpio = <&gpioX RK_PXX GPIO_ACTIVE_HIGH>;   
    All of them correctly parse the GPIO pin's state are described in the DTS



Thx !

Lizhe




At 2025-07-09 22:29:46, "Russell King (Oracle)" [off-list ref] wrote:
quoted
On Wed, Jul 09, 2025 at 07:42:55PM +0800, lizhe wrote:
quoted
Hi,
    i have already declared it in the DTS.

    &gmac {
            snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
    };
Active high means that the reset is in effect when the output is at the
logic '1' state. So, gpiod_get_value*() will return the same as
gpiod_get_raw_value*().

Active low means that the reset is in effect when the output is at the
logic '0' state, and in that case the return value of
gpiod_get_value*() will return true when the reset is active (at logic
'0' state) whereas gpiod_get_raw_value*() will return zero.
Did you read what Russell said? If so, why are you using
GPIO_ACTIVE_HIGH?

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help