<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;">after replacing with this function, the function returns 0, meaning the gpio is</p><p style="margin: 0;">still at a low voltage level.<br><br>+ int gpio_state = -1;</p><p style="margin: 0;"><br></p><p style="margin: 0;"> if (delays[2])</p><p style="margin: 0;"> msleep(DIV_ROUND_UP(delays[2], 1000));</p><p style="margin: 0;">+</p><p style="margin: 0;">+ gpio_state = gpiod_get_raw_value_cansleep(reset_gpio);</p><p style="margin: 0;">+ pr_info("gpio_state: %d\n", gpio_state);</p><p style="margin: 0;">+ pr_info("gpio_state: %d\n", gpio_state);</p><div><br></div><p style="margin: 0;"><br></p><p style="margin: 0;"> gpio-111 ( |snps,reset ) out lo</p><p style="margin: 0;"><br></p><p style="margin: 0;">[ 3.899319] gpio_state: 0</p><p style="margin: 0;">[ 3.899324] gpio_state: 0</p><div><br></div><p style="margin: 0;"><br></p><p style="margin: 0;">Thx</p></div><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><p style="margin: 0;">Lizhe</p><pre><br>At 2025-07-09 12:26:55, "Russell King (Oracle)" <linux@armlinux.org.uk> wrote:
>On Wed, Jul 09, 2025 at 09:57:50AM +0800, lizhe wrote:
>> + gpio_state = gpiod_get_value_can_sleep(reset_gpio);
>
>Use gpiod_get_raw_value_cansleep(). The normal get/set return the
>active/inactive state, whereas the _raw get/set return the physical
>state.
>
>--
>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_b2b9326f9237bd68fa8b29629e2b5c14">