linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: Rob Herring <robh@kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Nishant Sarmukadam <nishants@marvell.com>,
	"wnhuang@chromium.com" <wnhuang@chromium.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Xinming Hu <huxm@marvell.com>
Subject: Re: [PATCH v3 2/3] mwifiex: parse chip specific gpio from device tree
Date: Tue, 09 Feb 2016 15:19:25 +0100	[thread overview]
Message-ID: <73667407.d5gJFSzxQK@wuerfel> (raw)
In-Reply-To: <1be9cc31466a49d2b6673e09795c9497@SC-EXCH04.marvell.com>

On Tuesday 09 February 2016 14:03:19 Amitkumar Karwar wrote:
> 
> > On Mon, Feb 08, 2016 at 01:11:03PM +0100, Arnd Bergmann wrote:
> > > On Monday 08 February 2016 02:15:27 Amitkumar Karwar wrote:
> > > >                 if (adapter->dt_node) {
> > > > +                       if (of_property_read_u32(adapter->dt_node,
> > > > +                                                "mwifiex,chip-
> > gpio",
> > > > +                                                &data) == 0) {
> > > > +                               mwifiex_dbg(adapter, INFO,
> > > > +                                           "chip_gpio = 0x%x\n",
> > data);
> > > > +                               adapter->hs_cfg.gpio = data;
> > > > +                       }
> > > > +
> > > >
> > >
> > > Please use the GPIO DT binding. Reading a number from DT is not a
> > > proper way to get a GPIO number, as you may have more than one GPIO
> > > controller in a system and it is not obvious to which controller this
> > > number belongs, or if you need to specify things like polarity.
> > 
> > My read of this is it is not the host SOC gpio, but the WiFi device's
> > GPIO number. The host GPIO is defined in patch 3. We could still use the
> > GPIO binding to describe it doing something like "marvell,<wifi gpio pin
> > name>-gpios". Then the assignment is based on the property name.

I see.

> Yes. This is not host SOC gpio. It's wifi chip's gpio number.
> We will use GPIO binding for this in updated version.

No, if it doesn't refer to a number that is interpreted by the host
but is used internally in the device, then leave it as it is, as Rob
suggested.

	Arnd

  reply	other threads:[~2016-02-09 14:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 10:15 [PATCH v3 1/3] mwifiex: register platform specific driver Amitkumar Karwar
2016-02-08 10:15 ` [PATCH v3 2/3] mwifiex: parse chip specific gpio from device tree Amitkumar Karwar
2016-02-08 12:11   ` Arnd Bergmann
2016-02-08 21:47     ` Rob Herring
2016-02-09 14:03       ` Amitkumar Karwar
2016-02-09 14:19         ` Arnd Bergmann [this message]
2016-02-09 14:26           ` Amitkumar Karwar
2016-02-08 10:15 ` [PATCH v3 3/3] mwifiex: parse host wakeup configuration " Amitkumar Karwar
2016-02-08 12:12   ` Arnd Bergmann
2016-02-09 13:46     ` Amitkumar Karwar
2016-02-08 12:09 ` [PATCH v3 1/3] mwifiex: register platform specific driver Arnd Bergmann
2016-02-09 13:44   ` Amitkumar Karwar
2016-02-09 14:18     ` Arnd Bergmann
2016-02-09 14:27       ` Amitkumar Karwar
2016-02-08 21:56 ` Rob Herring
2016-02-09 14:00   ` 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=73667407.d5gJFSzxQK@wuerfel \
    --to=arnd@arndb.de \
    --cc=akarwar@marvell.com \
    --cc=devicetree@vger.kernel.org \
    --cc=huxm@marvell.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nishants@marvell.com \
    --cc=robh@kernel.org \
    --cc=wnhuang@chromium.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).