7620 Reset按键GPIO

1.在nvram_daemon.c修改如下,这个文件有点难找到

#elif defined (CONFIG_RALINK_MT7620)
-       info.irq = 44;  // MT7620 reset default
+       info.irq = 0;   // MT7620 reset default

2.在 ralink_gpio.h里面修改宏定义,根据原理图和datasheet来确定
-#define RALINK_GPIOMODE_DFT            (RALINK_GPIOMODE_I2C) | (RALINK_GPIOMODE_UARTF) | (RALINK_GPIOMODE_EPHY)
+#define RALINK_GPIOMODE_DFT            (RALINK_GPIOMODE_I2C) | (RALINK_GPIOMODE_UARTF)

3.在 ralink_gpio.c里面修改
//2<t<5
                                        printk("i=%d,2s<t<5s\n", i);
-                                       ralink_gpio_notify_user(3);
+                                       ralink_gpio_notify_user(1);
                                }
                        
-                       
-                               else if (time_before(now, record[i].falling + 2000L)) {
-                                       //less than 8s
-                                               ralink_gpio_notify_user(1);
-                                               printk("i=%d,5s<t<10s\n", i);
-                                               
-                               }
                                else {
                                        //press for several seconds
-                                       printk("i=%d, t>10s\n", i);
+                                       printk("i=%d, t>5s\n", i);
                                        ralink_gpio_notify_user(2);
                                }
                        }

你可能感兴趣的:(7620 Reset按键GPIO)