linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: <linux-wireless@vger.kernel.org>,
	Nishant Sarmukadam <nishants@marvell.com>,
	Xinming Hu <huxm@marvell.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH] mwifiex: parse hscfg_gpio info from device tree
Date: Fri, 11 Dec 2015 10:34:21 +0200	[thread overview]
Message-ID: <87vb855qpe.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1448618297-19803-1-git-send-email-akarwar@marvell.com> (Amitkumar Karwar's message of "Fri, 27 Nov 2015 01:58:17 -0800")

+ devicetree list

Amitkumar Karwar <akarwar@marvell.com> writes:

> 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;
> +			}
> +		}

I don't see this documented in Documentation/devicetree/bindings. Please
create a binding document and review it with the device tree
maintainers.

Actually when looking mwifiex close I see that it uses more undocumented
device tree interfaces:

marvell_cfgdata
marvell,caldata
marvell,00_txpwrlimit

I think these all should be properly documented and reviewed. But I'll
let the device tree people chime in what's the best way.

-- 
Kalle Valo

  reply	other threads:[~2015-12-11  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  9:58 [PATCH] mwifiex: parse hscfg_gpio info from device tree Amitkumar Karwar
2015-12-11  8:34 ` Kalle Valo [this message]
2015-12-11  9:23   ` Amitkumar Karwar
2016-03-16 23:26     ` Julian Calaby
2016-03-17 13:26       ` Amitkumar Karwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vb855qpe.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=akarwar@marvell.com \
    --cc=devicetree@vger.kernel.org \
    --cc=huxm@marvell.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nishants@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).