diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2010-12-15 09:10:12 -0500 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-12-15 10:09:27 -0500 |
commit | 248daa084cee4b212ff4408e9c9b05b3bdc0da0d (patch) | |
tree | d525ac39d421a323ec7c8f42356e7844fbff1395 /drivers | |
parent | 6742f554db14da94172da9eb1875a1aa944a827f (diff) |
wl12xx_sdio_test: rename files to match current style
Change some file names and Kconfig settings so that this new module matches
the new way of using wl12xx instead of wl1271.
Also fix SDIO power enabling and disabling to match the latest way of doing
it.
Cc: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/Kconfig | 12 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/Makefile | 3 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/sdio_test.c (renamed from drivers/net/wireless/wl12xx/wl1271_sdio_test.c) | 28 |
3 files changed, 28 insertions, 15 deletions
diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig index 085bc44d814b..0e65bce457d6 100644 --- a/drivers/net/wireless/wl12xx/Kconfig +++ b/drivers/net/wireless/wl12xx/Kconfig | |||
@@ -52,13 +52,15 @@ config WL12XX_SDIO | |||
52 | If you choose to build a module, it'll be called wl12xx_sdio. | 52 | If you choose to build a module, it'll be called wl12xx_sdio. |
53 | Say N if unsure. | 53 | Say N if unsure. |
54 | 54 | ||
55 | config WL1271_SDIO_TEST | 55 | config WL12XX_SDIO_TEST |
56 | tristate "TI wl1271 SDIO testing support" | 56 | tristate "TI wl12xx SDIO testing support" |
57 | depends on WL1271 && MMC | 57 | depends on WL12XX && MMC |
58 | default n | ||
58 | ---help--- | 59 | ---help--- |
59 | This module adds support for the SDIO bus testing with the | 60 | This module adds support for the SDIO bus testing with the |
60 | TI wl1271 chipset. Select this if your platform is using | 61 | TI wl12xx chipsets. You probably don't want this unless you are |
61 | the SDIO bus. | 62 | testing a new hardware platform. Select this if you want to test the |
63 | SDIO bus which is connected to the wl12xx chip. | ||
62 | 64 | ||
63 | config WL12XX_PLATFORM_DATA | 65 | config WL12XX_PLATFORM_DATA |
64 | bool | 66 | bool |
diff --git a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile index 187678503887..521c0414e52e 100644 --- a/drivers/net/wireless/wl12xx/Makefile +++ b/drivers/net/wireless/wl12xx/Makefile | |||
@@ -3,13 +3,14 @@ wl12xx-objs = main.o cmd.o io.o event.o tx.o rx.o ps.o acx.o \ | |||
3 | 3 | ||
4 | wl12xx_spi-objs = spi.o | 4 | wl12xx_spi-objs = spi.o |
5 | wl12xx_sdio-objs = sdio.o | 5 | wl12xx_sdio-objs = sdio.o |
6 | wl12xx_sdio_test-objs = sdio_test.o | ||
6 | 7 | ||
7 | wl12xx-$(CONFIG_NL80211_TESTMODE) += testmode.o | 8 | wl12xx-$(CONFIG_NL80211_TESTMODE) += testmode.o |
8 | obj-$(CONFIG_WL12XX) += wl12xx.o | 9 | obj-$(CONFIG_WL12XX) += wl12xx.o |
9 | obj-$(CONFIG_WL12XX_SPI) += wl12xx_spi.o | 10 | obj-$(CONFIG_WL12XX_SPI) += wl12xx_spi.o |
10 | obj-$(CONFIG_WL12XX_SDIO) += wl12xx_sdio.o | 11 | obj-$(CONFIG_WL12XX_SDIO) += wl12xx_sdio.o |
11 | 12 | ||
12 | obj-$(CONFIG_WL1271_SDIO_TEST) += wl1271_sdio_test.o | 13 | obj-$(CONFIG_WL12XX_SDIO_TEST) += wl12xx_sdio_test.o |
13 | 14 | ||
14 | # small builtin driver bit | 15 | # small builtin driver bit |
15 | obj-$(CONFIG_WL12XX_PLATFORM_DATA) += wl12xx_platform_data.o | 16 | obj-$(CONFIG_WL12XX_PLATFORM_DATA) += wl12xx_platform_data.o |
diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio_test.c b/drivers/net/wireless/wl12xx/sdio_test.c index 42d13144f645..9fcbd3dd8490 100644 --- a/drivers/net/wireless/wl12xx/wl1271_sdio_test.c +++ b/drivers/net/wireless/wl12xx/sdio_test.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * wl1271_sdio_test.c - SDIO testing driver for wl1271 | 2 | * SDIO testing driver for wl12xx |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Nokia Corporation | 4 | * Copyright (C) 2010 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Roger Quadros <roger.quadros@nokia.com> | 6 | * Contact: Roger Quadros <roger.quadros@nokia.com> |
7 | * | 7 | * |
8 | * wl1271 read/write routines taken from wl1271_sdio.c | 8 | * wl12xx read/write routines taken from the main module |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 11 | * modify it under the terms of the GNU General Public License |
@@ -34,10 +34,11 @@ | |||
34 | #include <linux/wl12xx.h> | 34 | #include <linux/wl12xx.h> |
35 | #include <linux/kthread.h> | 35 | #include <linux/kthread.h> |
36 | #include <linux/firmware.h> | 36 | #include <linux/firmware.h> |
37 | #include <linux/pm_runtime.h> | ||
37 | 38 | ||
38 | #include "wl1271.h" | 39 | #include "wl12xx.h" |
39 | #include "wl1271_io.h" | 40 | #include "io.h" |
40 | #include "wl1271_boot.h" | 41 | #include "boot.h" |
41 | 42 | ||
42 | #ifndef SDIO_VENDOR_ID_TI | 43 | #ifndef SDIO_VENDOR_ID_TI |
43 | #define SDIO_VENDOR_ID_TI 0x0097 | 44 | #define SDIO_VENDOR_ID_TI 0x0097 |
@@ -130,22 +131,31 @@ static void wl1271_sdio_raw_write(struct wl1271 *wl, int addr, void *buf, | |||
130 | static int wl1271_sdio_set_power(struct wl1271 *wl, bool enable) | 131 | static int wl1271_sdio_set_power(struct wl1271 *wl, bool enable) |
131 | { | 132 | { |
132 | struct sdio_func *func = wl_to_func(wl); | 133 | struct sdio_func *func = wl_to_func(wl); |
134 | int ret; | ||
133 | 135 | ||
134 | /* Let the SDIO stack handle wlan_enable control, so we | 136 | /* Let the SDIO stack handle wlan_enable control, so we |
135 | * keep host claimed while wlan is in use to keep wl1271 | 137 | * keep host claimed while wlan is in use to keep wl1271 |
136 | * alive. | 138 | * alive. |
137 | */ | 139 | */ |
138 | if (enable) { | 140 | if (enable) { |
139 | sdio_claim_power(func); | 141 | /* Power up the card */ |
142 | ret = pm_runtime_get_sync(&func->dev); | ||
143 | if (ret < 0) | ||
144 | goto out; | ||
140 | sdio_claim_host(func); | 145 | sdio_claim_host(func); |
141 | sdio_enable_func(func); | 146 | sdio_enable_func(func); |
147 | sdio_release_host(func); | ||
142 | } else { | 148 | } else { |
149 | sdio_claim_host(func); | ||
143 | sdio_disable_func(func); | 150 | sdio_disable_func(func); |
144 | sdio_release_host(func); | 151 | sdio_release_host(func); |
145 | sdio_release_power(func); | 152 | |
153 | /* Power down the card */ | ||
154 | ret = pm_runtime_put_sync(&func->dev); | ||
146 | } | 155 | } |
147 | 156 | ||
148 | return 0; | 157 | out: |
158 | return ret; | ||
149 | } | 159 | } |
150 | 160 | ||
151 | static void wl1271_sdio_disable_interrupts(struct wl1271 *wl) | 161 | static void wl1271_sdio_disable_interrupts(struct wl1271 *wl) |
@@ -481,7 +491,7 @@ static void __devexit wl1271_remove(struct sdio_func *func) | |||
481 | } | 491 | } |
482 | 492 | ||
483 | static struct sdio_driver wl1271_sdio_driver = { | 493 | static struct sdio_driver wl1271_sdio_driver = { |
484 | .name = "wl1271_sdio_test", | 494 | .name = "wl12xx_sdio_test", |
485 | .id_table = wl1271_devices, | 495 | .id_table = wl1271_devices, |
486 | .probe = wl1271_probe, | 496 | .probe = wl1271_probe, |
487 | .remove = __devexit_p(wl1271_remove), | 497 | .remove = __devexit_p(wl1271_remove), |