diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/board-u5500-wlan.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/cw1200_plat.h | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/board-u5500-wlan.c b/arch/arm/mach-ux500/board-u5500-wlan.c index 3683f3ad8bb..fd64089108a 100644 --- a/arch/arm/mach-ux500/board-u5500-wlan.c +++ b/arch/arm/mach-ux500/board-u5500-wlan.c @@ -10,12 +10,16 @@ #include <linux/err.h> #include <linux/platform_device.h> #include <linux/regulator/consumer.h> +#include <linux/mfd/dbx500-prcmu.h> #include <asm/mach-types.h> #include <mach/irqs.h> #include "pins.h" #include <mach/cw1200_plat.h> + static void cw1200_release(struct device *dev); +static int cw1200_prcmu_ctrl(const struct cw1200_platform_data *pdata, + bool enable); static struct resource cw1200_u5500_resources[] = { { @@ -26,7 +30,9 @@ static struct resource cw1200_u5500_resources[] = { }, }; -static struct cw1200_platform_data cw1200_u5500_platform_data = { 0 }; +static struct cw1200_platform_data cw1200_u5500_platform_data = { + .prcmu_ctrl = cw1200_prcmu_ctrl, +}; static struct platform_device cw1200_device = { .name = "cw1200_wlan", @@ -43,6 +49,19 @@ const struct cw1200_platform_data *cw1200_u5500_get_platform_data(void) } EXPORT_SYMBOL_GPL(cw1200_u5500_get_platform_data); +static int cw1200_prcmu_ctrl(const struct cw1200_platform_data *pdata, + bool enable) +{ + int ret; + + if (enable) + ret = prcmu_resetout(2, 1); + else + ret = prcmu_resetout(2, 0); + + return ret; +} + int __init u5500_wlan_init(void) { if (machine_is_u5500()) { diff --git a/arch/arm/mach-ux500/include/mach/cw1200_plat.h b/arch/arm/mach-ux500/include/mach/cw1200_plat.h index 4d30dbd3979..3a73183c9f8 100644 --- a/arch/arm/mach-ux500/include/mach/cw1200_plat.h +++ b/arch/arm/mach-ux500/include/mach/cw1200_plat.h @@ -18,6 +18,8 @@ struct cw1200_platform_data { bool enable); int (*clk_ctrl)(const struct cw1200_platform_data *pdata, bool enable); + int (*prcmu_ctrl)(const struct cw1200_platform_data *pdata, + bool enable); }; /* Declaration only. Should be implemented in arch/xxx/mach-yyy */ |