I want to use the EINT2 to set the interrupt and I following the steps that
*change the pin setting at
vendor/mediatek/proprietary/bootable/bootloader/lk/target/amt6797_64_open/dct/dct/codegen.dws
and
kernel-3.18/drivers/misc/mediatek/dws/mt6797/amt6797_64_open.dws
*add the describe at
kernel-3.18/arch/arm64/boot/dts/cust_eint.dtsi
&test_irq {
interrupt-parent = <&eintc>;
interrupts = <63 IRQ_TYPE_EDGE_RISING>;
debounce = <63 0>;
status = "okay";
};
*add the describe at
kernel-3.18/arch/arm64/boot/dts/mt6797.dtsi
test_irq: test_irq@ {
compatible = "test,test_irq";
};
*call the irq
static void gt_irq_gpio_cfg(void)
{
struct device_node *pNode=NULL;
pNode = of_find_compatible_node(NULL, NULL, "test,test_irq");
if (pNode) {
irq_number = irq_of_parse_and_map(pNode, 0);
} else{
_DBG("%s can't find compatible pNode\n", __func__);
return;
}
if(request_irq(irq_number, irq_proc, IRQ_TYPE_EDGE_RISING, "test,test_irq", NULL)){
_DBG("%s request_irq fail at %d\n", __func__, irq_number);
}else{
disable_irq(irq_number);
_DBG("%s request_irq ok at %d\n", __func__, irq_number);
}
return;
}
When I call enable_irq(irq_number), I find that the function “irq_proc” was triggered but only once.
However, if I change the EDGE_RISING to LEVEL_HIGH, I find the function was always triggered. That’s means the irq pin is always level HIGH?
And I try to used the gpio_set_value(63, 0) to make the low level pin but it is no used.
I want to know how to modify the setting that can make interrupt correctly.
Thanks