Commit b7d1e18c authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman

staging: wilc1000: rename genuChipPSstate variable

This patch rename genuChipPSstate variable to chip_ps_state
to avoid CamelCase naming convention.
Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8739eeba
...@@ -55,13 +55,13 @@ static void wilc_debug(u32 flag, char *fmt, ...) ...@@ -55,13 +55,13 @@ static void wilc_debug(u32 flag, char *fmt, ...)
} }
} }
static CHIP_PS_STATE_T genuChipPSstate = CHIP_WAKEDUP; static CHIP_PS_STATE_T chip_ps_state = CHIP_WAKEDUP;
static inline void acquire_bus(BUS_ACQUIRE_T acquire) static inline void acquire_bus(BUS_ACQUIRE_T acquire)
{ {
mutex_lock(&g_linux_wlan->hif_cs); mutex_lock(&g_linux_wlan->hif_cs);
#ifndef WILC_OPTIMIZE_SLEEP_INT #ifndef WILC_OPTIMIZE_SLEEP_INT
if (genuChipPSstate != CHIP_WAKEDUP) if (chip_ps_state != CHIP_WAKEDUP)
#endif #endif
{ {
if (acquire == ACQUIRE_AND_WAKEUP) if (acquire == ACQUIRE_AND_WAKEUP)
...@@ -606,7 +606,7 @@ static inline void chip_wakeup(void) ...@@ -606,7 +606,7 @@ static inline void chip_wakeup(void)
} while ((clk_status_reg & 0x1) == 0); } while ((clk_status_reg & 0x1) == 0);
} }
if (genuChipPSstate == CHIP_SLEEPING_MANUAL) { if (chip_ps_state == CHIP_SLEEPING_MANUAL) {
g_wlan.hif_func.hif_read_reg(0x1C0C, &reg); g_wlan.hif_func.hif_read_reg(0x1C0C, &reg);
reg &= ~BIT(0); reg &= ~BIT(0);
g_wlan.hif_func.hif_write_reg(0x1C0C, reg); g_wlan.hif_func.hif_write_reg(0x1C0C, reg);
...@@ -623,7 +623,7 @@ static inline void chip_wakeup(void) ...@@ -623,7 +623,7 @@ static inline void chip_wakeup(void)
g_wlan.hif_func.hif_write_reg(0x1e9c, val32); g_wlan.hif_func.hif_write_reg(0x1e9c, val32);
} }
} }
genuChipPSstate = CHIP_WAKEDUP; chip_ps_state = CHIP_WAKEDUP;
} }
#else #else
static inline void chip_wakeup(void) static inline void chip_wakeup(void)
...@@ -653,7 +653,7 @@ static inline void chip_wakeup(void) ...@@ -653,7 +653,7 @@ static inline void chip_wakeup(void)
} while (wilc_get_chipid(true) == 0); } while (wilc_get_chipid(true) == 0);
if (genuChipPSstate == CHIP_SLEEPING_MANUAL) { if (chip_ps_state == CHIP_SLEEPING_MANUAL) {
g_wlan.hif_func.hif_read_reg(0x1C0C, &reg); g_wlan.hif_func.hif_read_reg(0x1C0C, &reg);
reg &= ~BIT(0); reg &= ~BIT(0);
g_wlan.hif_func.hif_write_reg(0x1C0C, reg); g_wlan.hif_func.hif_write_reg(0x1C0C, reg);
...@@ -670,12 +670,12 @@ static inline void chip_wakeup(void) ...@@ -670,12 +670,12 @@ static inline void chip_wakeup(void)
g_wlan.hif_func.hif_write_reg(0x1e9c, val32); g_wlan.hif_func.hif_write_reg(0x1e9c, val32);
} }
} }
genuChipPSstate = CHIP_WAKEDUP; chip_ps_state = CHIP_WAKEDUP;
} }
#endif #endif
void chip_sleep_manually(u32 u32SleepTime) void chip_sleep_manually(u32 u32SleepTime)
{ {
if (genuChipPSstate != CHIP_WAKEDUP) if (chip_ps_state != CHIP_WAKEDUP)
return; return;
acquire_bus(ACQUIRE_ONLY); acquire_bus(ACQUIRE_ONLY);
...@@ -684,7 +684,7 @@ void chip_sleep_manually(u32 u32SleepTime) ...@@ -684,7 +684,7 @@ void chip_sleep_manually(u32 u32SleepTime)
#endif #endif
g_wlan.hif_func.hif_write_reg(0x10a8, 1); g_wlan.hif_func.hif_write_reg(0x10a8, 1);
genuChipPSstate = CHIP_SLEEPING_MANUAL; chip_ps_state = CHIP_SLEEPING_MANUAL;
release_bus(RELEASE_ONLY); release_bus(RELEASE_ONLY);
} }
...@@ -1069,7 +1069,7 @@ static void wilc_sleeptimer_isr_ext(u32 int_stats1) ...@@ -1069,7 +1069,7 @@ static void wilc_sleeptimer_isr_ext(u32 int_stats1)
{ {
g_wlan.hif_func.hif_clear_int_ext(SLEEP_INT_CLR); g_wlan.hif_func.hif_clear_int_ext(SLEEP_INT_CLR);
#ifndef WILC_OPTIMIZE_SLEEP_INT #ifndef WILC_OPTIMIZE_SLEEP_INT
genuChipPSstate = CHIP_SLEEPING_AUTO; chip_ps_state = CHIP_SLEEPING_AUTO;
#endif #endif
} }
...@@ -1158,7 +1158,7 @@ void wilc_handle_isr(void *wilc) ...@@ -1158,7 +1158,7 @@ void wilc_handle_isr(void *wilc)
if (int_status & DATA_INT_EXT) { if (int_status & DATA_INT_EXT) {
wilc_wlan_handle_isr_ext(wilc, int_status); wilc_wlan_handle_isr_ext(wilc, int_status);
#ifndef WILC_OPTIMIZE_SLEEP_INT #ifndef WILC_OPTIMIZE_SLEEP_INT
genuChipPSstate = CHIP_WAKEDUP; chip_ps_state = CHIP_WAKEDUP;
#endif #endif
} }
if (int_status & SLEEP_INT_EXT) if (int_status & SLEEP_INT_EXT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment