mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Saravana Kannan <saravanak@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Daniel Mentz <danielmentz@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH RFC] driver core: Ensure DT devices always have fwnode set
Date: Fri, 6 Nov 2020 19:23:00 +0000	[thread overview]
Message-ID: <20201106192300.GG49612@sirena.org.uk> (raw)
In-Reply-To: <CAGETcx-abGAgYrHM0jm6hVkrJ5KvfhK6gCZ4Y6RY0msPJDCuQg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

On Fri, Nov 06, 2020 at 11:09:17AM -0800, Saravana Kannan wrote:

> If you want to do this in "one common place", then I think the way to
> do this is have include/linux/of.h provide something like:

> void of_set_device_of_node(dev, of_node)
> {
>     dev->of_node = of_node;
>     dev->fw_node = &of_node->fwnode;
>    /* bunch of other housekeeping like setting OF_POPULATED and doing
> proper of_node_get() */
>    // Passing NULL for of_node could undo all the above for dev->of_node.
> }

That also sounds good, particularly if we have a coccinelle spatch or
some other mechanism that enforced the usage of the function where
appropriate, my main concern is making sure that we do something which
ensures that the boilerplate stuff is handled.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-11-06 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 15:07 Mark Brown
2020-11-06 19:09 ` Saravana Kannan
2020-11-06 19:23   ` Mark Brown [this message]
2020-11-07  1:55     ` Saravana Kannan
2020-11-09 17:08       ` Mark Brown
2020-11-09 17:25   ` Rob Herring
2020-11-09 17:41     ` Mark Brown

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=20201106192300.GG49612@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=danielmentz@google.com \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=saravanak@google.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

all inboxes | Powered by JetHome®