summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBartosz Markowski <bartosz.markowski@tieto.com>2011-12-07 11:36:21 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:06:35 +0200
commitc81d6835ff70b5f4132d1cef32329e4f0ecde220 (patch)
treeabb53824b6433b7a375424708437a7a3997ab90a /arch
parent96d472636ea3216270ec94f6a0c5c896dfcf8002 (diff)
u5500: WLAN: Adds prcmu_ctrl callback
Adds prcmu_ctrl callback to u5500 WLAN platform data file. In u5500 platform cw1200 reset pin is connected to PRCMU. prcmu_resetout is used to set/unset RESOUT2_N_PIN by writing to PRCMU register (platform callback) ST-Ericsson Linux next: NA ST-Ericsson ID: 375493 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Iedfa62dcec0b0bb9bc67abb6ff8dc00b1b78f375 Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/41359 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-u5500-wlan.c21
-rw-r--r--arch/arm/mach-ux500/include/mach/cw1200_plat.h2
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 */