<div data-ntes="ntes_mail_body_root" style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div id="spnEditorContent"><p style="margin: 0;">Hi,</p><p style="margin: 0;">    i have already declared it in the DTS.</p><p style="margin: 0;"><br></p><p style="margin: 0;">    &gmac {</p><p style="margin: 0;">            snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;</p><p style="margin: 0;"><br></p><p style="margin: 0;">    };</p><p style="margin: 0;"><br></p><p style="margin: 0;"><br></p><p style="margin: 0;">Thx !</p><p style="margin: 0;">Lizhe</p></div><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><p style="margin: 0;"><br></p><pre><br>At 2025-07-09 19:11:02, "Russell King (Oracle)" <linux@armlinux.org.uk> wrote:
>On Wed, Jul 09, 2025 at 03:48:25PM +0800, lizhe wrote:
>> Hi, 
>> 
>> after replacing with this function, the function returns 0, meaning the gpio is
>> still at a low voltage level.
>> 
>> +              int gpio_state = -1;
>> 
>> 
>>                 if (delays[2])
>>                         msleep(DIV_ROUND_UP(delays[2], 1000));
>> +
>> +               gpio_state = gpiod_get_raw_value_cansleep(reset_gpio);
>> +               pr_info("gpio_state: %d\n", gpio_state);
>> +               pr_info("gpio_state: %d\n", gpio_state);
>> 
>>  gpio-111 (                    |snps,reset          ) out lo
>> 
>> 
>> [    3.899319] gpio_state: 0
>> [    3.899324] gpio_state: 0
>
>How have you declared the snps,reset-gpio property in DT?
>
>-- 
>RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
>FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
</pre></div><img style="width:1px;height:1px" src="https://count.mail.163.com/beacon/webmail.gif?type=webmail_mailtrace&guid=pre_faa9673cffe86bb47236fc0e7446134e"><img style="width:1px;height:1px" src="https://hermes.mail.163.com/mt/icon.gif?key=pre_faa9673cffe86bb47236fc0e7446134e&-B7%2FCMvNKi0h4El7eUjSvktxZXGdWnErZhHd89P%2FY0dABNAZqIPiFaVUsOL11jfmO-izAMP3vhqJldjJasWlVwZNEq0uSVK93DC57aduXrGUmGy%2Bvshz7HPi75Q3P39%2B%2FK-u3kOtB5R5xnFtEVj&id=B7%2FCMvNKi0h4El7eUjSvktxZXGdWnErZhHd89P%2FY0dABNAZqIPiFaVUsOL11jfmO&rcpt=izAMP3vhqJldjJasWlVwZNEq0uSVK93DC57aduXrGUmGy%2Bvshz7HPi75Q3P39%2B%2FK&i=u3kOtB5R5xnFtEVj">