Devicetree
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: Deprecating of_platform, the path from here...
Date: Fri, 11 Dec 2009 08:30:18 +1100	[thread overview]
Message-ID: <1260480618.16132.299.camel@pasglop> (raw)
In-Reply-To: <1260409535.16132.109.camel@pasglop>

On Thu, 2009-12-10 at 12:45 +1100, Benjamin Herrenschmidt wrote:

> I don't agree with grant idea however that just converting the content
> of the device node into properties is the way to go.

And here of course I meant " converting the content of the device node
into into pdata" ...

> I do prefer your proposed approach (from our IRC discussion) which is
> instead to allocate a struct device-node, convert pdata into properties,
> and modify the drier to use these properties.
> 
> The main difference thus between the two type of conversions (convert to
> of_platform vs convert to platform) is that in the first case, you have
> to convert the driver to use properties -and- convert all platforms in
> all archs including gory ARM cell phone stuff you really don't want to
> go anywhere near. In the second case, you still convert the driver to
> use properties natively, but you keep a "wart" to turn pdata into a
> device-node -inside the driver-, protected by a CONFIG option maybe, so
> that those archs can be left alone until it becomes so obvious to
> everybody what approach is better that they'll end up being converted
> too and the wart can go.
> 
> I believe the second approach, while less "clean" in the absolute is a
> more realistic path to take.
> 
> Now, orthogonally to that, I do believe it's still nice to provide a way
> to statically lay out a device node in platform code, to allow archs
> that don't otherwise have the device-tree to replace pdata with
> something nicer and get rid of the wart quicker.
> 
> We could either find a way with macros to layout an actual struct
> device_node statically along with all the properties etc... but that
> sounds a tad hard.
> 
> We could have something that convert an entirely ASCII representation
> into a struct device_node, but that would be akin of having dtc in the
> kernel, might be a bit bloated no ? Though it could be made simpler and
> more restrictive.
> 
> Or we could find an in-between .. .A different struct type that is more
> suitable for being laid out statically (a name, a type, and an enum of
> structs for various property "types", ie, strings, words, bytes, ...)
> with a little helper function that conver that into a device node at
> runtime ?
> 
> What do you think ?
> 
> Cheers,
> Ben.
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

  reply	other threads:[~2009-12-10 21:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09 22:06 Deprecating of_platform, the path from here Grant Likely
     [not found] ` <fa686aa40912091406i2ef4e1b2u25c9f46b20786245-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-10  0:15   ` David Miller
2009-12-10  0:21     ` David Miller
     [not found]       ` <20091209.162121.256573183.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-12-10 20:47         ` Grant Likely
     [not found]           ` <fa686aa40912101247k55d56783ge0163dd1da073b49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-10 21:56             ` David Miller
     [not found]               ` <20091210.135609.124000757.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-12-10 22:03                 ` Grant Likely
2009-12-11 15:25           ` Arnd Bergmann
2009-12-11 15:53             ` Joakim Tjernlund
     [not found]             ` <200912111625.29674.arnd-r2nGTMty4D4@public.gmane.org>
2009-12-11 16:44               ` Grant Likely
2009-12-11 21:17                 ` Arnd Bergmann
2009-12-11 22:19               ` Benjamin Herrenschmidt
     [not found]     ` <20091209.161550.168794100.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-12-10  1:45       ` Benjamin Herrenschmidt
2009-12-10 21:30         ` Benjamin Herrenschmidt [this message]
2009-12-10 21: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=1260480618.16132.299.camel@pasglop \
    --to=benh-xvmvhmargas8u2djnn8i7kb+6bgklq7r@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@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