Peter Stuge wrote:
On Sat, Feb 09, 2008 at 09:35:49PM -0800, ron minnich wrote:
It should be simple enough to get the type if struct property had a struct node *node; member so that the owner->parent node could be reached from within the property foreach loop.
it's there.
Hmm. How?
but that doesn't totally tell you what type of resource you have. I don't think.
Maybe I'm oversimplifying? I was thinking that: (from your patch)
cpus {
cpupath="0"; apic { /config/("northbridge/amd/geodelx/apic");
apicpath="0,0,0"; superio { /config/("superio/winbond/w83627hf/dts");
superiopath = "0x2e";
..it would be possible to determine resource type from the name of the containing block. "cpus" => cpupath, "apic" => apicpath etc.
Ron suggested to make this cpu@0 { ... } and apic@0,0,0 { ... }
I like that idea a lot.
I think that would be the way to go.. It means we can not call the apic node "my_weird_apic" anymore, which is an improvement, too.
Stefan