WR703N How to export GPIO with edge ?

I try to use WR703N's GPIO to do some input poll work. But I found that the WR703N GPIO can not be exported with edge. Since the edge is required for develop the input program.

Here's the log:

root@OpenWrt:~# echo "12" > /sys/class/gpio/export
root@OpenWrt:~# echo "in" > /sys/class/gpio/gpio12/direction
root@OpenWrt:~# cd /sys/class/gpio/gpio12/
root@OpenWrt:/sys/devices/virtual/gpio/gpio12# ls
active_low  direction   subsystem   uevent      value
root@OpenWrt:/sys/devices/virtual/gpio/gpio12#




I understand it may need modify the source code of the kernel. I checked the source code, in the /drivers/gpio/gpiolib.c, line 744~749:

            if (!status && gpio_to_irq(gpio) >= 0
                    && (direction_may_change
                        || !test_bit(FLAG_IS_OUT,
                            &desc->flags)))
                status = device_create_file(dev,
                        &dev_attr_edge);

it seems that require the gpio_to_irq to be effective before it can export edge. But I don't know how to modify.

Can someone tell me how to export the GPIO with the edge.

Thanks for help!