Hi, I’m new to X20 board.
I want to implement irq to do touch wake up function.
I configure GPIO63 as EINT mode, and set EINT2 with Polarity: High, Sensitive Level: Edge, and Debounce En: Disabled.
mt6797.dtsi with setting as:
gh_irq: gh_irq@ {
compatible = "mediatek, vendorinfo";
status = "okay";
};
the irq request clip as follows:
const void *irq_prop=NULL;
int irq_gpio = -1, irq_num = -1;
int retval;
irq_prop = of_get_property(dev->of_node, "vendorinfo", NULL);
irq_gpio = be32_to_cpup(irq_prop);
if (gpio_is_valid(irq_gpio)) {
irq_num = gpio_to_irq(irq_gpio); // my problem is here, it return zero, as it is not eint...
retval = request_irq(irq_num, irq_handler, IRQF_TRIGGER_RISING, "vendorinfo", NULL);
}
Any advice will be appreciate.