linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
	"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"John W. Linville"
	<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
	Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Subject: Re: [PATCH 1/3] net: rfkill-gpio: add device tree support
Date: Tue, 14 Feb 2012 11:14:58 +0100	[thread overview]
Message-ID: <4F3A3422.7020304@gmx.de> (raw)
In-Reply-To: <CAOesGMgJW7bRZn84VSZNVvc3G6z4S6HPzFEv3MJ8DcNYVsV2uQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Am 13.02.2012 20:36, schrieb Olof Johansson:
> On Mon, Feb 13, 2012 at 11:25 AM, Rhyland Klein<rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>  wrote:
>> On Sun, 2012-02-12 at 11:13 -0800, Marc Dietrich wrote:
>>> This adds device tree support for rfkill-gpio. The optional platform
>>> paramters gpio_runtime_close and gpio_runtime_setup are not implemented.
>>>
>>> Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> Cc: "John W. Linville"<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
>>> Cc: Johannes Berg<johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
>>> Cc: Rhyland Klein<rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> Signed-off-by: Marc Dietrich<marvin24-Mmb7MZpHnFY@public.gmane.org>
>>> +
>>>   static int rfkill_gpio_probe(struct platform_device *pdev)
>>>   {
>>>        struct rfkill_gpio_data *rfkill;
>>>        struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data;
>>> +     struct device_node *np = pdev->dev.of_node;
>>>        int ret = 0;
>>>        int len = 0;
>>>
>>> +     if (np)
>>> +             pdata = rfkill_gpio_parse_pdata(pdev);
>>> +
>> The only concern I have is the precedence of devicetree settings vs
>> platform data settings? If there is pdata passed in from board file
>> initialization, and there is a device tree (a corner case but I think a
>> valid one) then I believe the order would be that defined pdata would
>> override the devicetree settings. That way if someone wanted to make a
>> quick update, they wouldn't need to change the boot loader as well.
> Yes, that is how other drivers tend to be coded -- only of pdata is
> null will the driver try to fill in from the DT.

If the device tree from the bootloader does not contain the rfkill 
information the resources from platform_data will be used (so no need to 
update the bootloader). If the bootloader contains rfkill information, 
why shouldn't it be used?

Marc

  parent reply	other threads:[~2012-02-14 10:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12 19:13 [PATCH 1/3] net: rfkill-gpio: add device tree support Marc Dietrich
     [not found] ` <1ec0e63a7453072689618430ebc2bdd7b62542a2.1329073559.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-02-12 19:13   ` [PATCH 2/3] dt: rfkill-gpio: add bindings documentation Marc Dietrich
     [not found]     ` <86044d44009316a48b402050f9dd742391d46eac.1329073559.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-02-12 20:21       ` Simon Glass
     [not found]         ` <CAPnjgZ2b4QjKMKjKyHqGGU1TbMamq6pBPUAAO99gMa98Rd+Erw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-13 13:47           ` Rob Herring
     [not found]             ` <4F391470.3090102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-02-13 19:43               ` Olof Johansson
     [not found]                 ` <CAOesGMjofzC9pp1H9SXS693QR7JU9XjvVLVi6gBSGuqVNJ-rKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-14 10:12                   ` Marc Dietrich
2012-02-16 10:29                   ` Marc Dietrich
2012-02-12 19:13   ` [PATCH 3/3] dt: arm: paz00: add rfkill switch to device tree Marc Dietrich
2012-02-13 19:25   ` [PATCH 1/3] net: rfkill-gpio: add device tree support Rhyland Klein
2012-02-13 19:36     ` Olof Johansson
     [not found]       ` <CAOesGMgJW7bRZn84VSZNVvc3G6z4S6HPzFEv3MJ8DcNYVsV2uQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-14 10:14         ` Marc Dietrich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-05 17:18 Marc Dietrich
     [not found] ` <215249735783e9fe35db1c594d901f591725de50.1328461986.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2012-02-05 19:59   ` Thierry Reding

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=4F3A3422.7020304@gmx.de \
    --to=marvin24-mmb7mzphnfy@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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).