linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mwifiex: parse hscfg_gpio info from device tree
@ 2015-11-27  9:58 Amitkumar Karwar
  2015-12-11  8:34 ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Amitkumar Karwar @ 2015-11-27  9:58 UTC (permalink / raw)
  To: linux-wireless; +Cc: Nishant Sarmukadam, Xinming Hu, Amitkumar Karwar

From: Xinming Hu <huxm@marvell.com>

This patch reads hscfg_gpio from device tree and update
internal variable

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-17 13:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27  9:58 [PATCH] mwifiex: parse hscfg_gpio info from device tree Amitkumar Karwar
2015-12-11  8:34 ` Kalle Valo
2015-12-11  9:23   ` Amitkumar Karwar
2016-03-16 23:26     ` Julian Calaby
2016-03-17 13:26       ` Amitkumar Karwar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).