Search Linux Wireless

[PATCH] mwifiex: parse hscfg_gpio info from device tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Xinming Hu <huxm@xxxxxxxxxxx>

This patch reads hscfg_gpio from device tree and update
internal variable

Signed-off-by: Xinming Hu <huxm@xxxxxxxxxxx>
Signed-off-by: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
---
 drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
index e486867..d28a53f 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
@@ -1459,10 +1459,21 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
 #ifdef CONFIG_OF
 	struct property *prop;
 	size_t len = strlen(prefix);
+	u32 data;
 	int ret;
 
 	/* look for all matching property names */
 	for_each_property_of_node(node, prop) {
+		if (!strncmp(prop->name, "marvell,hscfg_gpio",
+			     strlen("marvell,hscfg_gpio"))) {
+			if (!of_property_read_u32(priv->adapter->dt_node,
+						  prop->name, &data)) {
+				dev_dbg(priv->adapter->dev,
+					"hscfg gpio = 0x%x\n", data);
+				priv->adapter->hs_cfg.gpio = data;
+			}
+		}
+
 		if (len > strlen(prop->name) ||
 		    strncmp(prop->name, prefix, len))
 			continue;
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux