diff options
author | Bartosz Markowski <bartosz.markowski@tieto.com> | 2011-09-19 15:51:26 +0200 |
---|---|---|
committer | Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | 2011-09-20 13:44:52 +0200 |
commit | eb29b33dac130da396e535b5eb5facc1792e1d45 (patch) | |
tree | c00c8110fd262763ec5a8b83192d68f5a07523a1 /arch/arm/mach-ux500/board-mop500-wlan.c | |
parent | 7db7b81e3b307b120ed51305a157a9c478741da9 (diff) |
WLAN: u5500: Add new wlan platform file for u5500
* Split board config files for u8500 and u5500
* Set sdi3 and mmc2 for u5500 WLAN
ST-Ericsson ID: 352334
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Change-Id: I9746591fe33c3c3748a50c86d01205fc0680f5d2
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31410
Reviewed-by: Stefan NILSSON9 <stefan.xk.nilsson@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-wlan.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-wlan.c | 52 |
1 files changed, 6 insertions, 46 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-wlan.c b/arch/arm/mach-ux500/board-mop500-wlan.c index 16169d1cfcb..e525d4fe8aa 100644 --- a/arch/arm/mach-ux500/board-mop500-wlan.c +++ b/arch/arm/mach-ux500/board-mop500-wlan.c @@ -16,8 +16,6 @@ #include <mach/cw1200_plat.h> static void cw1200_release(struct device *dev); -static int cw1200_power_ctrl(const struct cw1200_platform_data *pdata, - bool enable); static struct resource cw1200_href_resources[] = { { @@ -68,10 +66,11 @@ EXPORT_SYMBOL_GPL(cw1200_get_platform_data); static int cw1200_pins_enable(bool enable) { - struct ux500_pins *pins; + 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"); @@ -93,45 +92,12 @@ static int cw1200_pins_enable(bool enable) return ret; } -static int cw1200_power_ctrl(const struct cw1200_platform_data *pdata, - bool enable) -{ - static const char *vdd_name = "vdd"; - struct regulator *vdd; - int ret = 0; - - vdd = regulator_get(&cw1200_device.dev, vdd_name); - if (IS_ERR(vdd)) { - ret = PTR_ERR(vdd); - dev_warn(&cw1200_device.dev, - "%s: Failed to get regulator '%s': %d\n", - __func__, vdd_name, ret); - } else { - if (enable) - ret = regulator_enable(vdd); - else - ret = regulator_disable(vdd); - - if (ret) { - dev_warn(&cw1200_device.dev, - "%s: Failed to %s regulator '%s': %d\n", - __func__, enable ? "enable" : "disable", - vdd_name, ret); - } - regulator_put(vdd); - } - return ret; -} - int __init mop500_wlan_init(void) { int ret; - if (machine_is_snowball() || - machine_is_u8500() || - machine_is_u5500() || - machine_is_nomadik()) { - cw1200_device.num_resources = - ARRAY_SIZE(cw1200_href_resources); + + if (machine_is_u8500() || machine_is_nomadik()) { + cw1200_device.num_resources = ARRAY_SIZE(cw1200_href_resources); cw1200_device.resource = cw1200_href_resources; } else if (machine_is_hrefv60()) { cw1200_device.num_resources = @@ -145,18 +111,12 @@ int __init mop500_wlan_init(void) return -ENOTSUPP; } - if (machine_is_snowball() || - machine_is_u5500()) - cw1200_platform_data.mmc_id = "mmc2"; - else - cw1200_platform_data.mmc_id = "mmc3"; + cw1200_platform_data.mmc_id = "mmc3"; cw1200_platform_data.reset = &cw1200_device.resource[0]; cw1200_platform_data.irq = &cw1200_device.resource[1]; cw1200_device.dev.release = cw1200_release; - if (machine_is_snowball()) - cw1200_platform_data.power_ctrl = cw1200_power_ctrl; ret = cw1200_pins_enable(true); if (WARN_ON(ret)) |