summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@stericsson.com>2011-11-14 13:09:38 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2011-11-14 15:36:50 +0100
commit3ac308adb598729edd5808f7f298560f660439a8 (patch)
tree77ad586cff29612cfabf2b9e84693f1e62ad6107 /arch/arm
parent9b24924c304d758c595fa4cc9421cd2b5a7cccb9 (diff)
cw1200: Revert requesting SDIO pins at device registration
The SDIO pins belongs to the SDIO driver and should be handled by the SDIO driver only. The reason that it has worked up until now is that the SDIO driver has just started using pm runtime. Since both WLAN and SDIO framework enable the pins, the number of users is set to two. SDIO tries to release the pins (after 50 ms of inactivity in order to save power), the usage count does not go down to 0 and therefore the pins are not reconfigured to GPIOs, which they must be when PL18X is not driving the pins due to power down). This reverts commit 53c8821cafaabc841d194c7d86cca3b574605e6e Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-ux500/board-mop500-wlan.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-wlan.c b/arch/arm/mach-ux500/board-mop500-wlan.c
index 84c1b8958fa..e14773c7823 100644
--- a/arch/arm/mach-ux500/board-mop500-wlan.c
+++ b/arch/arm/mach-ux500/board-mop500-wlan.c
@@ -11,12 +11,9 @@
#include <linux/regulator/consumer.h>
#include <asm/mach-types.h>
#include <mach/irqs.h>
-#include <plat/pincfg.h>
#include <linux/clk.h>
#include <mach/cw1200_plat.h>
-#include "pins.h"
-
static void cw1200_release(struct device *dev);
static int cw1200_power_ctrl(const struct cw1200_platform_data *pdata,
bool enable);
@@ -72,34 +69,6 @@ const struct cw1200_platform_data *cw1200_get_platform_data(void)
}
EXPORT_SYMBOL_GPL(cw1200_get_platform_data);
-static int cw1200_pins_enable(bool enable)
-{
- struct ux500_pins *pins = NULL;
- int ret = 0;
-
- pins = ux500_pins_get("sdi1");
-
- if (!pins) {
- printk(KERN_ERR "cw1200: Pins are not found. "
- "Check platform data.\n");
- return -ENOENT;
- }
-
- if (enable)
- ret = ux500_pins_enable(pins);
- else
- ret = ux500_pins_disable(pins);
-
- if (ret)
- printk(KERN_ERR "cw1200: Pins can not be %s: %d.\n",
- enable ? "enabled" : "disabled",
- ret);
-
- ux500_pins_put(pins);
-
- return ret;
-}
-
static int cw1200_power_ctrl(const struct cw1200_platform_data *pdata,
bool enable)
{
@@ -164,8 +133,6 @@ static int cw1200_clk_ctrl(const struct cw1200_platform_data *pdata,
int __init mop500_wlan_init(void)
{
- int ret;
-
if (machine_is_u8500() ||
machine_is_nomadik() ||
machine_is_snowball()) {
@@ -196,18 +163,10 @@ int __init mop500_wlan_init(void)
if (machine_is_snowball())
cw1200_platform_data.power_ctrl = cw1200_power_ctrl;
- ret = cw1200_pins_enable(true);
- if (WARN_ON(ret))
- return ret;
-
- ret = platform_device_register(&cw1200_device);
- if (ret)
- cw1200_pins_enable(false);
-
- return ret;
+ return platform_device_register(&cw1200_device);
}
static void cw1200_release(struct device *dev)
{
- cw1200_pins_enable(false);
+ /* Do nothing: release is handled by SDIO stack */
}