rt2x00: Add/Modify the GPIO register definition
authorShiang Tu <shiang_tu@ralinktech.com>
Sun, 20 Feb 2011 12:57:22 +0000 (13:57 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 21 Feb 2011 20:40:00 +0000 (15:40 -0500)
Revise/Add GPIO register related definitions

Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2800lib.c

index d3a693b0e706e68f621c81e3608a5c3905cbc744..591ac32b014e898ae88054720326ac550a6ed8c8 100644 (file)
 #define GPIO_CTRL_CFG_BIT5             FIELD32(0x00000020)
 #define GPIO_CTRL_CFG_BIT6             FIELD32(0x00000040)
 #define GPIO_CTRL_CFG_BIT7             FIELD32(0x00000080)
-#define GPIO_CTRL_CFG_BIT8             FIELD32(0x00000100)
-#define GPIO_CTRL_CFG_GPIOD            FIELD32(0x00000800)
+#define GPIO_CTRL_CFG_GPIOD_BIT0       FIELD32(0x00000100)
+#define GPIO_CTRL_CFG_GPIOD_BIT1       FIELD32(0x00000200)
+#define GPIO_CTRL_CFG_GPIOD_BIT2       FIELD32(0x00000400)
+#define GPIO_CTRL_CFG_GPIOD_BIT3       FIELD32(0x00000800)
+#define GPIO_CTRL_CFG_GPIOD_BIT4       FIELD32(0x00001000)
+#define GPIO_CTRL_CFG_GPIOD_BIT5       FIELD32(0x00002000)
+#define GPIO_CTRL_CFG_GPIOD_BIT6       FIELD32(0x00004000)
+#define GPIO_CTRL_CFG_GPIOD_BIT7       FIELD32(0x00008000)
 
 /*
  * MCU_CMD_CFG
index 55109656eabb17873d49fb425cd34c23625b38ad..5dd10589cff8c8952b15d8450a12db26d1776cbd 100644 (file)
@@ -1392,7 +1392,7 @@ static void rt2800_set_ant_diversity(struct rt2x00_dev *rt2x00dev,
                                   eesk_pin, 0);
 
        rt2800_register_read(rt2x00dev, GPIO_CTRL_CFG, &reg);
-       rt2x00_set_field32(&reg, GPIO_CTRL_CFG_GPIOD, 0);
+       rt2x00_set_field32(&reg, GPIO_CTRL_CFG_GPIOD_BIT3, 0);
        rt2x00_set_field32(&reg, GPIO_CTRL_CFG_BIT3, gpio_bit3);
        rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg);
 }