mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@linaro.org>
To: Rob Herring <robherring2@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <rob.herring@calxeda.com>
Subject: Re: [RFC PATCH 1/2] driver core: introduce module_platform_driver_match_and_probe
Date: Thu, 21 Nov 2013 23:11:59 +0000	[thread overview]
Message-ID: <20131121231159.9CB1BC40753@trevor.secretlab.ca> (raw)
In-Reply-To: <CAL_JsqLK_ivSphWq3xLpQqUjF1nEvPjf2WQ4hJ+hThcTFae-Kg@mail.gmail.com>

On Thu, 21 Nov 2013 16:33:13 -0600, Rob Herring <robherring2@gmail.com> wrote:
> On Thu, Nov 21, 2013 at 6:47 AM, Grant Likely <grant.likely@linaro.org> wrote:
> > On Wed, 30 Oct 2013 01:12:50 -0500, Rob Herring <robherring2@gmail.com> wrote:
> >> From: Rob Herring <rob.herring@calxeda.com>
> >>
> >> Introduce a helper to match, create and probe a platform device. This
> >> is for drivers such as cpuidle or cpufreq that typically don't have a
> >> bus device node and need to match on a system-level compatible property.
> >>
> >> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> Cc: Grant Likely <grant.likely@linaro.org>
> >> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> >
> > Oh, ick. Please no. If a platform_device isn't getting created for a
> > device tree node, then we should be asking why it isn't getting created
> > and fix the core logic rather than trying to bodge it in the driver init
> > code.
> >
> > We should never be creating and registering devices in module init code.
> > We've spent the last 4 years trying to get away from that.
> 
> This is for devices that have no DT device node to be associated with
> and therefore will never have a device created by the core DT code.
> Instead the devices are created based off of the root compatible
> property. cpuidle drivers are one such example [1]. We already do this
> today by putting the platform device creation in the
> machine_desc.init_machine function which is a conditional initcall.
> The motivation for changing this is how to support drivers like this
> on arm64 which doesn't want any platform code or machine_desc. At
> least historically, we didn't want DT nodes of Linux specific devices
> in the DT. So, how would you propose to solve this problem?

Honestly? With a machine_desc.  :-)

Actually, I'm totally serious here. That is why machine_desc is still a
good idea. There are always going to be a few per-platform bits that
need to be present, although the hope is the per-platform will be at the
SoC family level instead of the board level.

g.


  reply	other threads:[~2013-11-21 23:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  6:12 [RFC PATCH 0/2] DT match helpers for initcalls and platform devices Rob Herring
     [not found] ` < 1383113571-13029-2-git-send-email-robherring2@gmail.com>
     [not found]   ` <20131121124736. 6EBEBC40A2C@trevor.secretlab.ca>
     [not found] ` < 20131030082621.GA22787@ulmo.nvidia.com>
     [not found] ` < 1383113571-13029-3-git-send-email-robherring2@gmail.com>
     [not found]   ` <20131121125007. 17A8FC40A2C@trevor.secretlab.ca>
2013-10-30  6:12 ` [RFC PATCH 1/2] driver core: introduce module_platform_driver_match_and_probe Rob Herring
2013-11-21 12:47   ` Grant Likely
2013-11-21 22:33     ` Rob Herring
2013-11-21 23:11       ` Grant Likely [this message]
2013-10-30  6:12 ` [RFC PATCH 2/2] of: add initcall with match boilerplate helpers Rob Herring
2013-11-21 12:50   ` Grant Likely
2013-11-21 23:23     ` Rob Herring
2013-11-27 15:22       ` Grant Likely
2013-12-05 17:57         ` Rob Herring
2013-10-30  8:26 ` [RFC PATCH 0/2] DT match helpers for initcalls and platform devices Thierry Reding
2013-10-30 20:02   ` Rob Herring
2013-10-30 21:40     ` Rob Herring
2013-11-21 12:53     ` Grant Likely

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=20131121231159.9CB1BC40753@trevor.secretlab.ca \
    --to=grant.likely@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.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®