All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Benoît Coussno" <b-cousson@ti.com>,
	"Paul Walmsley" <paul@pwsan.com>,
	"Sourav Poddar" <sourav.poddar@ti.com>,
	"Russ Dill" <Russ.Dill@ti.com>, "Felipe Balbi" <balbi@ti.com>,
	"Koen Kooi" <koen@circuitco.com>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] pdev: Fix platform device resource linking
Date: Tue, 6 Aug 2013 18:15:27 +0800	[thread overview]
Message-ID: <20130806101527.GB29283@kroah.com> (raw)
In-Reply-To: <311C42C3-6544-4058-ABE9-F9FAE72DD5CA@antoniou-consulting.com>

On Tue, Aug 06, 2013 at 12:45:42PM +0300, Pantelis Antoniou wrote:
> Hi Greg,
> 
> On Aug 6, 2013, at 12:36 PM, Greg Kroah-Hartman wrote:
> 
> > On Tue, Aug 06, 2013 at 10:53:40AM +0300, Pantelis Antoniou wrote:
> >> Platform device removal uncovered a number of problems with
> >> the way resources are handled in the core platform code.
> >> 
> >> Resources now form child/parent linkages and this requires
> >> proper linking of the resources. On top of that the OF core
> >> directly creates it's own platform devices. Simplify things
> >> by providing helper functions that manage the linking properly.
> > 
> > Ugh, the OF core shouldn't be creating platform devices.  Well, yes, I
> > know it does that today, but ick, ick, ick.
> > 
> 
> Yep, ick, ick, ick is the correct form.
> 
> >> Two functions are provided:
> >> 
> >> platform_device_link_resources(), which links all the
> >> linkable resources (if not already linked).
> >> 
> >> and platform_device_unlink_resources(), which unlinks all the
> >> resources.
> > 
> > Why would anyone need to call this?  I'm getting the feeling that OF
> > should just have it's own bus of devices to handle this type of mess.
> > ACPI is going through the same rewrite for this same type of problem
> > (they did things differently.)  I suggest you work with the ACPI
> > developers to so the same thing they are, to solve it correctly for
> > everyone.
> > 
> 
> It's the same problem really. Another bus type might not fly well.
> The same device driver should be (in theory) be made to work unchanged
> either on an OF/ACPI/Fex( :) ) setup.

No, that's not quite true, a driver needs to know how to talk to the
bus, as that is how it communicates to the hardware.  It can be done for
different types of busses (see the OHCI USB controller for one example
of this), but a driver will have to know what type of bus it is on in
order to work properly.

> What would it take to move all this into driver core?

What specifically would you move into there?

thanks,

greg k-h

  reply	other threads:[~2013-08-06 10:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1375775624-12250-1-git-send-email-panto@antoniou-consulting.com>
     [not found] ` <1375775624-12250-6-git-send-email-panto@antoniou-consulting.com>
2013-08-06  9:33   ` [PATCH 5/5] arm: omap: Proper cleanups for omap_device Greg Kroah-Hartman
2013-08-06  9:37     ` Pantelis Antoniou
2013-08-06 10:14       ` Greg Kroah-Hartman
2013-08-06 13:37         ` Alexander Holler
2013-08-07  5:52           ` Greg Kroah-Hartman
2013-08-07 15:22             ` Alexander Holler
2013-08-07  7:44         ` Pantelis Antoniou
2013-08-07 16:15       ` Tony Lindgren
2013-08-07 16:23         ` Pantelis Antoniou
2013-08-08  7:25           ` Tony Lindgren
     [not found] ` <1375775624-12250-2-git-send-email-panto@antoniou-consulting.com>
2013-08-06  9:36   ` [PATCH 1/5] pdev: Fix platform device resource linking Greg Kroah-Hartman
2013-08-06  9:45     ` Pantelis Antoniou
2013-08-06 10:15       ` Greg Kroah-Hartman [this message]
2013-08-06 10:19         ` Russell King - ARM Linux
2013-08-07  5:57           ` Greg Kroah-Hartman
2013-08-07  8:27             ` Russell King - ARM Linux
2013-08-06 10:27         ` Pantelis Antoniou
2013-08-07  5:56           ` Greg Kroah-Hartman
2013-08-07  7:37             ` Pantelis Antoniou
2013-08-07 17:13               ` Matt Porter
     [not found] ` <1375775624-12250-4-git-send-email-panto@antoniou-consulting.com>
     [not found]   ` <87a9kt2vd8.fsf@linaro.org>
2013-08-08  9:23     ` [PATCH 3/5] omap: Properly handle resources for omap_devices Pantelis Antoniou
2013-08-09 15:16       ` Kevin Hilman
2013-08-09 15:32         ` Pantelis Antoniou
2013-08-09 16:35           ` Kevin Hilman
2013-08-09 18:08             ` Pantelis Antoniou
     [not found] ` <1375775624-12250-5-git-send-email-panto@antoniou-consulting.com>
     [not found]   ` <87siyl19uk.fsf@linaro.org>
2013-08-08  9:29     ` [PATCH 4/5] omap: Avoid crashes in the case of hwmod misconfiguration Pantelis Antoniou

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=20130806101527.GB29283@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Russ.Dill@ti.com \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=koen@circuitco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=panto@antoniou-consulting.com \
    --cc=paul@pwsan.com \
    --cc=sourav.poddar@ti.com \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.