关于MT7621配置引脚为GPIO模式的设置

由于引脚的复用,要把引脚配置为GPIO功能,而一直没有找到如何配置,现在问题解决了,贴出来分享一下

编辑 linux-2.6.36.x/drivers/char/ralink_gpio.h
在500行左右有如下代码

// if you would like to enable GPIO mode for other pins, please modify this value
// !! Warning: changing this value may make other features(MDIO, PCI, etc) lose efficacy
#if defined (CONFIG_RALINK_MT7621)
#define RALINK_GPIOMODE_DFT     (RALINK_GPIOMODE_UART2 | RALINK_GPIOMODE_UART3 | RALINK_GPIOMODE_WDT ) 

如需要把JATG配置为GPIO mode 添加 RALINK_GPIOMODE_JTAG 即可,具体代码为

// if you would like to enable GPIO mode for other pins, please modify this value
// !! Warning: changing this value may make other features(MDIO, PCI, etc) lose efficacy
#if defined (CONFIG_RALINK_MT7621)
#define RALINK_GPIOMODE_DFT     (RALINK_GPIOMODE_UART2 | RALINK_GPIOMODE_UART3 | RALINK_GPIOMODE_WDT | RALINK_GPIOMODE_JTAG) 

你可能感兴趣的:(GPIO,MT7621)