summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
authorDoug Zobel <dzobel1@motorola.com>2013-11-15 14:29:07 -0600
committerJames Wylder <jwylder@motorola.com>2014-03-05 17:46:52 -0600
commitd2a782003a6047da120a33e6f8ee6fd33bb825d6 (patch)
tree8d20bd4ecda62a06e98993c4108456bc1acb0d0b /drivers/mmc/host/omap_hsmmc.c
parent32fd2d36d2464056d4522a9c02797b7c2b2e884f (diff)
downloadolio-linux-3.10-d2a782003a6047da120a33e6f8ee6fd33bb825d6.tar.xz
olio-linux-3.10-d2a782003a6047da120a33e6f8ee6fd33bb825d6.zip
CW integration and minnow bringup
* create minnow machine type * create Android makefile * add pre-commit syntax check * enable -Werror * Add drivers: CPCAP, TPS65xxx, m4sensorhub, atmxt, lm3535, usb gadget, minnow display, TI 12xx wireless Change-Id: I7962f5e1256715f2452aed5a62a4f2f2383d5046
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index eccedc7d06a..a347ade7664 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -40,6 +40,8 @@
#include <linux/pinctrl/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/platform_data/mmc-omap.h>
+#include <linux/wl12xx.h>
+#include <asm-generic/gpio.h>
/* OMAP HSMMC Host Controller Registers */
#define OMAP_HSMMC_SYSSTATUS 0x0014
@@ -1716,9 +1718,10 @@ MODULE_DEVICE_TABLE(of, omap_mmc_of_match);
static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
{
struct omap_mmc_platform_data *pdata;
+ struct wl12xx_platform_data minnow_wlan_data;
struct device_node *np = dev->of_node;
u32 bus_width, max_freq;
- int cd_gpio, wp_gpio;
+ int cd_gpio, wp_gpio, wl_host_wake_gpio = -1;
cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
@@ -1756,6 +1759,30 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
if (of_find_property(np, "ti,needs-special-hs-handling", NULL))
pdata->slots[0].features |= HSMMC_HAS_HSPE_SUPPORT;
+ /* wlan_host_wake_gpio is needed by TI WLAN driver in TI proprietary
+ * code under repo hardware/ti/wlan, retrieve this gpio here from dts
+ * and pass to TI WLAN driver through the existing interface
+ * of wl12xx_set_platform_data, so not to chanage TI code
+ */
+ if (!of_property_read_u32(np, "wl_host_wake_gpio",
+ &wl_host_wake_gpio)) {
+ pr_info("wl_host_wake_gpio is %d\n", wl_host_wake_gpio);
+ if (gpio_request(wl_host_wake_gpio, "wifi_irq") < 0) {
+ printk(KERN_ERR "%s: can't reserve GPIO: %d\n",
+ __func__, wl_host_wake_gpio);
+ devm_kfree(dev, pdata);
+ return NULL;
+ }
+ gpio_direction_input(wl_host_wake_gpio);
+ minnow_wlan_data.irq = __gpio_to_irq(wl_host_wake_gpio);
+ if (wl12xx_set_platform_data(&minnow_wlan_data)) {
+ printk(KERN_ERR "%s: Error setting wl18xx data\n",
+ __func__);
+ devm_kfree(dev, pdata);
+ return NULL;
+ }
+ }
+
return pdata;
}
#else