From: Marc Dietrich <marvin24@gmx.de>
To: Olof Johansson <olof@lixom.net>
Cc: linux-tegra@vger.kernel.org, Stephen Warren <swarren@nvidia.com>,
Colin Cross <ccross@android.com>,
linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>,
Rhyland Klein <rklein@nvidia.com>,
Grant Likely <grant.likely@secretlab.ca>,
devicetree-discuss@lists.ozlabs.org
Subject: Re: Re: [PATCH 2/3] dt: rfkill-gpio: add bindings documentation
Date: Mon, 06 Feb 2012 11:16:17 +0100 [thread overview]
Message-ID: <3698018.3auA4qnmIx@fb07-iapwap2> (raw)
In-Reply-To: <CAOesGMhXZLRHw+TSVqHZFQcYLeu995EKaG_hNFRkgOnPFdmq6g@mail.gmail.com>
Hi Olof,
Am Sonntag, 5. Februar 2012, 14:00:25 schrieb Olof Johansson:
> Hi,
>
> On Sun, Feb 5, 2012 at 9:18 AM, Marc Dietrich <marvin24@gmx.de> wrote:
> > Add device tree bindings information for rfkill gpio switches.
> >
> > Cc: linux-wireless@vger.kernel.org
> > Cc: "John W. Linville" <linville@tuxdriver.com>
> > Cc: Johannes Berg <johannes@sipsolutions.net>
> > Cc: Rhyland Klein <rklein@nvidia.com>
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > Signed-off-by: Marc Dietrich <marvin24@gmx.de>
>
> Please cc devicetree-discuss@lists.ozlabs.org on device tree bindings;
> not everyone monitors the linux mailing lists.
done.
> > diff --git a/Documentation/devicetree/bindings/gpio/rfkill.txt
> > b/Documentation/devicetree/bindings/gpio/rfkill.txt new file mode 100644
> > index 0000000..22bf22a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/rfkill.txt
> > @@ -0,0 +1,38 @@
> > +RFKILL switches connected to GPIO lines
> > +
> > +Required properties:
> > +- compatible : should be "rfkill-gpio".
> > +
> > +Each rfkill switch is represented as a sub-node of the rfkill-gpio device.
> > +Each node has a label property which represents the name of the corresponding
> > +rfkill device.
> > +
> > +RFKILL sub-node properties:
> > +- label : (optional) The label for this rfkill switch. If omitted, the label
> > is + taken from the node name (excluding the unit address).
> > +- reset-gpio, shutdown-gpio : Should specify the rfkill gpios for reset and
> > + shutdown (see "Specifying GPIO information for devices" in
> > + Documentation/devicetree/booting-without-of.txt).
> > +- type : enumerated type of the gpio (see include/linux/rfkill.h).
> > +- clock : (optional) name of the clock name associated with the rfkill switch
> > + (see include/linux/rfkill-gpio.h)
>
> Sorry, but this is going about things the wrong way.
>
> A device tree binding is meant to describe hardware. For example, the
> type and clock properties are clearly linux specifics that shouldn't
> be expressed that way in the device tree.
>
> instead, think about what you actually need to provide for a driver to
> do its work. Does the wifi device have a gpio to control power (and
> one for providing reset outside of the standard interface)? Well, then
> that should probably be defined in the node that describes the device
> -- i.e. under the sdhci node in question here.
well, that doesn't work in case of paz00 because nearly all devices (including wifi)
are connected via usb. Only the rfkill switch is controlled via the gpios.
> That doesn't fit the rfkill device/driver model perfectly, since it
> doesn't have something to bind against, so the rfkill platform device
> needs to be instantiated from somewhere else. It's possible that best
> match is to have the wifi driver handle it, which should be OK, I
> think?
You are right, but in case of usb devices which are not instantiated via device tree
there is no parent. It doesn't make much sense for me to put it under the usb
controller because it is independent to it. One may argue that the rfkill switch is a
separate device, which is controlled via gpio lines. The wifi driver itself has no
way to modify the gpios itself, it can only read out its status. I'm a bit lost here,
maybe you have a better solution.
Thanks
Marc
next prev parent reply other threads:[~2012-02-06 10:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 17:18 [PATCH 1/3] net: rfkill-gpio: add device tree support Marc Dietrich
2012-02-05 17:18 ` [PATCH 2/3] dt: rfkill-gpio: add bindings documentation Marc Dietrich
2012-02-05 22:00 ` Olof Johansson
2012-02-06 10:16 ` Marc Dietrich [this message]
2012-02-05 19:59 ` [PATCH 1/3] net: rfkill-gpio: add device tree support Thierry Reding
2012-02-06 10:25 ` Marc Dietrich
-- strict thread matches above, loose matches on Subject: below --
2012-02-12 19:13 Marc Dietrich
2012-02-13 13:47 ` [PATCH 2/3] dt: rfkill-gpio: add bindings documentation Rob Herring
2012-02-13 19:43 ` Olof Johansson
2012-02-16 10:29 ` Marc Dietrich
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=3698018.3auA4qnmIx@fb07-iapwap2 \
--to=marvin24@gmx.de \
--cc=ccross@android.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=johannes@sipsolutions.net \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=olof@lixom.net \
--cc=rklein@nvidia.com \
--cc=swarren@nvidia.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