static void set_sw_LED1(struct rtl8192cd_priv *priv, int flag) { #ifdef RTL8190_SWGPIO_LED if (LED_ROUTE) set_swGpio_LED(priv, 1, flag); #else if ((GET_CHIP_VER(priv) == VERSION_8188E)||(GET_CHIP_VER(priv) == VERSION_8192E)) { #ifdef RTLWIFINIC_GPIO_CONTROL if (flag) RTLWIFINIC_GPIO_write(5, 0); else RTLWIFINIC_GPIO_write(5, 1); #endif } #if defined(CONFIG_RTL_92D_SUPPORT) else if (GET_CHIP_VER(priv) == VERSION_8192D) { if (flag) RTL_W32(LEDCFG, (RTL_R32(LEDCFG) & 0xfffff0ff) | LED1SV_92D); else RTL_W32(LEDCFG, RTL_R32(LEDCFG) & 0xfffff0ff); } #endif else if (GET_CHIP_VER(priv) == VERSION_8192C){ if (flag) RTL_W32(LEDCFG, (RTL_R32(LEDCFG) & 0xfffff0ff) | LED1SV); else RTL_W32(LEDCFG, RTL_R32(LEDCFG) & 0xfffff0ff); } #endif }
static void set_sw_LED1(struct rtl8192cd_priv *priv, int flag) { #ifdef RTL8190_SWGPIO_LED if (LED_ROUTE) set_swGpio_LED(priv, 1, flag); #else #if defined(CONFIG_RTL_92C_SUPPORT) || defined(CONFIG_RTL_92D_SUPPORT) #ifdef CONFIG_RTL_92D_SUPPORT if (GET_CHIP_VER(priv) == VERSION_8192D) { if (flag) RTL_W32(LEDCFG, (RTL_R32(LEDCFG) & 0xfffff0ff) | LED1SV_92D); else RTL_W32(LEDCFG, RTL_R32(LEDCFG) & 0xfffff0ff); } else #endif { if (flag) RTL_W32(LEDCFG, (RTL_R32(LEDCFG) & 0xfffff0ff) | LED1SV); else RTL_W32(LEDCFG, RTL_R32(LEDCFG) & 0xfffff0ff); } #endif #endif }
static void set_sw_LED0(struct rtl8192cd_priv *priv, int flag) { #ifdef RTL8190_SWGPIO_LED if (LED_ROUTE) set_swGpio_LED(priv, 0, flag); #else if ((GET_CHIP_VER(priv) == VERSION_8188E)||(GET_CHIP_VER(priv) == VERSION_8192E)) { if (flag) RTLWIFINIC_GPIO_write(5, 0); else RTLWIFINIC_GPIO_write(5, 1); } else if ((GET_CHIP_VER(priv) == VERSION_8812E)) { if (flag) RTL_W32(LEDCFG, (RTL_R32(LEDCFG) & 0xfffff0ff) | LED1SV); else RTL_W32(LEDCFG, RTL_R32(LEDCFG) & 0xfffff0ff); } else if (GET_CHIP_VER(priv) == VERSION_8881A) { if (flag) writel(readl(0xb800350c) | BIT(24), 0xb800350c); else writel(readl(0xb800350c) & ~BIT(24), 0xb800350c); } else { if (flag) RTL_W32(LEDCFG, (RTL_R32(LEDCFG) & 0xfffffff0) | LED0SV); else RTL_W32(LEDCFG, RTL_R32(LEDCFG) & 0xfffffff0); } #endif }
static void set_sw_LED0(struct rtl8192cd_priv *priv, int flag) { #ifdef RTL8190_SWGPIO_LED if (LED_ROUTE) set_swGpio_LED(priv, 0, flag); #else #if defined(CONFIG_RTL_92C_SUPPORT) || defined(CONFIG_RTL_92D_SUPPORT) if (flag) RTL_W32(LEDCFG, (RTL_R32(LEDCFG) & 0xfffffff0) | LED0SV); else RTL_W32(LEDCFG, RTL_R32(LEDCFG) & 0xfffffff0); #elif defined(CONFIG_RTL_88E_SUPPORT) if (flag) RTLWIFINIC_GPIO_write(5, 0); else RTLWIFINIC_GPIO_write(5, 1); #endif #endif }