i.MX8MP gpio wakeup type issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8MP gpio wakeup type issue

2,177 Views
Winslow
Contributor III

Hi,

 

I'm using imx8mp EVK Linux 6.12.3_1.0.0 and testing gpio wakeup

when setting IRQ_TYPE_EDGE_FALLING

The system is incorrectly woken up when the GPIO changes from low to high.

(It should be wakeup when GPIO changes from high to low only)

How can this problem be solved?

Thank you

0 Kudos
Reply
11 Replies

2,147 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Winslow 

How do you configure the gpio wakeup in dts?

Here is drivers/input/keyboard/gpio_keys.c source code, you can try to dump 

bdata->wakeup_trigger_type to confirm real type in driver.
bool active_low = gpiod_is_active_low(bdata->gpiod);		

switch (button->wakeup_event_action) {
		case EV_ACT_ASSERTED:
			bdata->wakeup_trigger_type = active_low ?
				IRQ_TYPE_EDGE_FALLING : IRQ_TYPE_EDGE_RISING;
			break;
		case EV_ACT_DEASSERTED:
			bdata->wakeup_trigger_type = active_low ?
				IRQ_TYPE_EDGE_RISING : IRQ_TYPE_EDGE_FALLING;
			break;
		case EV_ACT_ANY:




Best Regards,
Zhiming

0 Kudos
Reply

2,138 Views
Winslow
Contributor III

Hi @Zhiming_Liu 

 

my setting is 

        btn-wakeup {
            label = "BTN-WAKEUP";
            gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
            linux,code = <KEY_WAKEUP>;
            debounce-interval = <10>;
            interrupt-parent = <&gpio5>;
            interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
            wakeup-source;
        };

 

Does this code means irq is setting trigger both falling and rising?

irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
error = devm_request_any_context_irq(dev, bdata->irq, isr, irqflags,
desc, bdata);
0 Kudos
Reply

2,128 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Winslow 

Did you set the pull up in iomux setting? and make sure that this gpio stay high before your click the button. Otherwise, there is no HIGH->LOW signal when you click button. If this gpio stays low before you click the button, the driver's action is correct.

Best Regards,
Zhiming

0 Kudos
Reply

2,123 Views
Winslow
Contributor III

Hi @Zhiming_Liu 

iomux setting:

MX8MP_IOMUXC_ECSPI2_MISO__GPIO5_IO12 0x00000140

 

We keep press the button (GPIO: HIGH->LOW)

then using systemctl suspend to enter suspend (GPIO stay LOW)

and then relase the button (GPIO: LOW->HIGH), system will be woken up

Is this correct?

0 Kudos
Reply

2,097 Views
Winslow
Contributor III

Hi @Zhiming_Liu 

 

I saw this in source code

* The trigger type is always both edges for gpio-based keys and we do
* not support changing wakeup trigger for interrupt-based keys.
 
Does this mean that IRQ_TYPE_EDGE_FALLING is not working?
0 Kudos
Reply

2,077 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Winslow 

Can you add below property to test? This will set wakeup event for IRQ_TYPE_EDGE_FALLING referring the source code.

wakeup-event-action = <EV_ACT_ASSERTED>;



Best Regards,
Zhiming

0 Kudos
Reply

2,075 Views
Winslow
Contributor III

Hi @Zhiming_Liu 

 

I did added this, but it's not working.

        BTN-wakeup {
            label = "BTN-WAKEUP";
            gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
            linux,code = <KEY_WAKEUP>;
            debounce-interval = <10>;
            interrupt-parent = <&gpio5>;
            interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
            wakeup-event-action = <EV_ACT_ASSERTED>;
            wakeup-source;
        };

 

0 Kudos
Reply

2,068 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Winslow 

I did test based on i.MX8MP FRDM platform, iomux value 0x1c4. Enter suspend with systemctl, then click button, keep it low, system will be waken up.

	sw-keys {
		compatible = "gpio-keys";

		K1: user_btn1 {
			label = "User Button1";
			linux,code = <KEY_WAKEUP>;
			gpios = <&gpio3 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
			interrupt-parent = <&gpio3>;
			interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
			wakeup-event-action = <EV_ACT_ASSERTED>;
			wakeup-source;
		};
	};




Best Regards,
Zhiming

0 Kudos
Reply

2,062 Views
Winslow
Contributor III

Hi @Zhiming_Liu 

 

could you help to try

1. click button, keep it low

2. systemctl suspend

3. release button (low -> high)

system will wakeup?

0 Kudos
Reply

2,042 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Winslow 

I did such test steps for many times, the system will not wake up while LOW->HIGH. So at least on my side, rising edge will not work if setting failing edge in dts.

This should relate to hardware design, as i didn't find availble button on EVK board, so i test it on i.MX8MP FRDM board which has a user button.

Zhiming_Liu_0-1762994853485.png

 



Best Regards,
Zhiming

0 Kudos
Reply

2,032 Views
Winslow
Contributor III

Hi @Zhiming_Liu 

 

Thank you!

We will review our hardware design

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2202316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EI'm%20using%20imx8mp%20EVK%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ELinux%206.12.3_1.0.0%20and%20testing%20gpio%20wakeup%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ewhen%20setting%26nbsp%3BIRQ_TYPE_EDGE_FALLING%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20system%20is%20incorrectly%20woken%20up%20when%20the%20GPIO%20changes%20from%20low%20to%20high.%3C%2FP%3E%3CP%3E(It%20should%20be%20wakeup%20when%20GPIO%20changes%20from%20high%20to%20low%20only)%3C%2FP%3E%3CP%3EHow%20can%20this%20problem%20be%20solved%3F%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204013%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204013%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_blank%22%3E%40Zhiming_Liu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThank%20you!%3C%2FP%3E%3CP%3EWe%20will%20review%20our%26nbsp%3B%3CSPAN%3Ehardware%20design%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203987%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203987%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F248522%22%20target%3D%22_blank%22%3E%40Winslow%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20did%20such%20test%20steps%20for%20many%20times%2C%20the%20system%20will%20not%20wake%20up%20while%20LOW-%26gt%3BHIGH.%20So%20at%20least%20on%20my%20side%2C%20rising%20edge%20will%20not%20work%20if%20setting%20failing%20edge%20in%20dts.%3C%2FP%3E%0A%3CP%3EThis%20should%20relate%20to%20hardware%20design%2C%20as%20i%20didn't%20find%20availble%20button%20on%20EVK%20board%2C%20so%20i%20test%20it%20on%20i.MX8MP%20FRDM%20board%20which%20has%20a%20user%20button.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zhiming_Liu_0-1762994853485.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zhiming_Liu_0-1762994853485.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365380i5CB28C3E06748EAA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zhiming_Liu_0-1762994853485.png%22%20alt%3D%22Zhiming_Liu_0-1762994853485.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_blank%22%3E%40Zhiming_Liu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Ecould%20you%20help%20to%20try%3C%2FP%3E%3CP%3E1.%26nbsp%3B%3CSPAN%3Eclick%20button%2C%20keep%20it%20low%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E2.%20systemctl%20suspend%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E3.%20release%20button%20(low%20-%26gt%3B%20high)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Esystem%20will%20wakeup%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203293%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203293%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F248522%22%20target%3D%22_blank%22%3E%40Winslow%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20did%20test%20based%20on%20i.MX8MP%20FRDM%20platform%2C%20iomux%20value%200x1c4.%20Enter%20suspend%20with%20systemctl%2C%20then%20click%20button%2C%20keep%20it%20low%2C%20system%20will%20be%20waken%20up.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%09sw-keys%20%7B%0A%09%09compatible%20%3D%20%22gpio-keys%22%3B%0A%0A%09%09K1%3A%20user_btn1%20%7B%0A%09%09%09label%20%3D%20%22User%20Button1%22%3B%0A%09%09%09linux%2Ccode%20%3D%20%3CKEY_WAKEUP%3E%3B%0A%09%09%09gpios%20%3D%20%26lt%3B%26amp%3Bgpio3%2014%20(GPIO_ACTIVE_LOW%20%7C%20GPIO_PULL_UP)%26gt%3B%3B%0A%09%09%09interrupt-parent%20%3D%20%26lt%3B%26amp%3Bgpio3%26gt%3B%3B%0A%09%09%09interrupts%20%3D%20%26lt%3B14%20IRQ_TYPE_EDGE_FALLING%26gt%3B%3B%0A%09%09%09wakeup-event-action%20%3D%20%3CEV_ACT_ASSERTED%3E%3B%0A%09%09%09wakeup-source%3B%0A%09%09%7D%3B%0A%09%7D%3B%3C%2FEV_ACT_ASSERTED%3E%3C%2FKEY_WAKEUP%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203245%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203245%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_blank%22%3E%40Zhiming_Liu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20did%20added%20this%2C%20but%20it's%20not%20working.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20%20%20%20%20%20BTN-wakeup%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20label%20%3D%20%22BTN-WAKEUP%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20gpios%20%3D%20%26lt%3B%26amp%3Bgpio5%2012%20GPIO_ACTIVE_LOW%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20linux%2Ccode%20%3D%20%3CKEY_WAKEUP%3E%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20debounce-interval%20%3D%20%26lt%3B10%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20interrupt-parent%20%3D%20%26lt%3B%26amp%3Bgpio5%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20interrupts%20%3D%20%26lt%3B12%20IRQ_TYPE_EDGE_FALLING%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20wakeup-event-action%20%3D%20%3CEV_ACT_ASSERTED%3E%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20wakeup-source%3B%0A%20%20%20%20%20%20%20%20%7D%3B%3C%2FEV_ACT_ASSERTED%3E%3C%2FKEY_WAKEUP%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203238%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203238%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F248522%22%20target%3D%22_blank%22%3E%40Winslow%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20you%20add%20below%20property%20to%20test%3F%20This%20will%20set%20wakeup%20event%20for%26nbsp%3B%3CSPAN%3EIRQ_TYPE_EDGE_FALLING%20referring%20the%20source%20code.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Ewakeup-event-action%20%3D%20%3CEV_ACT_ASSERTED%3E%3B%3C%2FEV_ACT_ASSERTED%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_blank%22%3E%40Zhiming_Liu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20saw%20this%20in%20source%20code%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E*%20The%20trigger%20type%20is%20always%20both%20edges%20for%20gpio-based%20keys%20and%20we%20do%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E*%20not%20support%20changing%20wakeup%20trigger%20for%20interrupt-based%20keys.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EDoes%20this%20mean%20that%20IRQ_TYPE_EDGE_FALLING%20is%20not%20working%3F%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F248522%22%20target%3D%22_blank%22%3E%40Winslow%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EDid%20you%20set%20the%20pull%20up%20in%20iomux%20setting%3F%20and%20make%20sure%20that%20this%20gpio%20stay%20high%20before%20your%20click%20the%20button.%20Otherwise%2C%20there%20is%20no%20HIGH-%26gt%3BLOW%20signal%20when%20you%20click%20button.%20If%20this%20gpio%20stays%20low%20before%20you%20click%20the%20button%2C%20the%20driver's%20action%20is%20correct.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202434%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202434%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_blank%22%3E%40Zhiming_Liu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3Emy%20setting%20is%26nbsp%3B%3C%2FP%3E%3CPRE%3E%20%20%20%20%20%20%20%20btn-wakeup%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20label%20%3D%20%22BTN-WAKEUP%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20gpios%20%3D%20%26lt%3B%26amp%3Bgpio5%2012%20GPIO_ACTIVE_LOW%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20linux%2Ccode%20%3D%20%3CKEY_WAKEUP%3E%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20debounce-interval%20%3D%20%26lt%3B10%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20interrupt-parent%20%3D%20%26lt%3B%26amp%3Bgpio5%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20interrupts%20%3D%20%26lt%3B12%20IRQ_TYPE_EDGE_FALLING%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20wakeup-source%3B%0A%20%20%20%20%20%20%20%20%7D%3B%3C%2FKEY_WAKEUP%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EDoes%20this%20code%20means%20irq%20is%20setting%20trigger%20both%20falling%20and%20rising%3F%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3Eirqflags%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BIRQF_TRIGGER_RISING%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%7C%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BIRQF_TRIGGER_FALLING%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3Eerror%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Edevm_request_any_context_irq%3C%2FSPAN%3E%3CSPAN%3E(dev%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ebdata%3C%2FSPAN%3E%3CSPAN%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3Eirq%3C%2FSPAN%3E%3CSPAN%3E%2C%20isr%2C%20irqflags%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Edesc%2C%20bdata)%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202392%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX8MP%20gpio%20wakeup%20type%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202392%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F248522%22%20target%3D%22_blank%22%3E%40Winslow%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHow%20do%20you%20configure%20the%20gpio%20wakeup%20in%20dts%3F%3C%2FP%3E%0A%3CP%3EHere%20is%26nbsp%3Bdrivers%2Finput%2Fkeyboard%2Fgpio_keys.c%20source%20code%2C%20you%20can%20try%20to%20dump%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSTRONG%3Ebdata-%26gt%3B%3C%2FSTRONG%3E%3CSPAN%3E%3CSTRONG%3Ewakeup_trigger_type%3C%2FSTRONG%3E%20to%20confirm%20real%20type%20in%20driver.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Ebool%20active_low%20%3D%20gpiod_is_active_low(bdata-%26gt%3Bgpiod)%3B%09%09%0A%0Aswitch%20(button-%26gt%3Bwakeup_event_action)%20%7B%0A%09%09case%20EV_ACT_ASSERTED%3A%0A%09%09%09bdata-%26gt%3Bwakeup_trigger_type%20%3D%20active_low%20%3F%0A%09%09%09%09IRQ_TYPE_EDGE_FALLING%20%3A%20IRQ_TYPE_EDGE_RISING%3B%0A%09%09%09break%3B%0A%09%09case%20EV_ACT_DEASSERTED%3A%0A%09%09%09bdata-%26gt%3Bwakeup_trigger_type%20%3D%20active_low%20%3F%0A%09%09%09%09IRQ_TYPE_EDGE_RISING%20%3A%20IRQ_TYPE_EDGE_FALLING%3B%0A%09%09%09break%3B%0A%09%09case%20EV_ACT_ANY%3A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E