<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٬ Andrew<br><br>Thx,</p><p style="margin: 0;"><br></p><p style="margin: 0;">i conducted an experiment, and no matter whether i configured it as </p><p style="margin: 0;">GPIO_ACTIVE_LOW or GPIO_ACTIVE_HIGH in the dts, the resulting</p><p style="margin: 0;">GPIO pin state was 0, indicating a low level.</p><p style="margin: 0;"><br></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;"><br></p><p style="margin: 0;">+ gpio_state = gpiod_get_value_can_sleep(reset_gpio);</p><p style="margin: 0;">+ pr_info("gpio_state: %d\n", gpio_state);</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 01:34:07, "Andrew Lunn" <andrew@lunn.ch> wrote:
>On Tue, Jul 08, 2025 at 09:50:44AM -0700, Lizhe wrote:
>> some devices only reset when the GPIO is at a high level, but the
>> current function lacks support for such devices. add high-level
>> reset functionality to the function to support devices that require
>> high-level triggering for reset
>
>You can probably specify this in DT:
>
>reset-gpios = <&qe_pio_e 18 GPIO_ACTIVE_LOW>;
>
>The gpio core will then flip the meaning of
>
>gpiod_set_value_cansleep(reset_gpio, 1);
>
>such that a value of 1 will become low, 0 will become high.
>
> Andrew
</pre></div><img style="width:1px;height:1px" src="https://count.mail.163.com/beacon/webmail.gif?type=webmail_mailtrace&guid=pre_877c1be252aa2577e5cf37b7cee2e2a1">