Subject: Re: Device properties anyone?
To: None <eeh@netbsd.org,tech-kern@netbsd.org>
From: Ben Harris <bjh21@cam.ac.uk>
List: tech-kern
Date: 01/17/2001 12:26:16
In article <20010116235724.3143.qmail@mail.netbsd.org> you write:
>Examples of data that are currently problematical but could easily be passed
>as properties are device locators, which require and arbitrary bus-specific
>structure to pass betwen the parent bus node and the child device node,

How would device properties help here?  The foo_attach_args structure
has to be passed to a driver's match function, before there's a struct
device to associate any properties with.

>int setprop(struct device *dev, const char *name, void *val, size_t len, int flags);

>size_t getprop(struct device *dev, const char *name, void *val, 
>			size_t len, int flags);

Hmm.  I'd somehow prefer to be passing around void *s, rather than
copying the data all the time.  This does lead to a problem of what to
do if md_getprop had to dynamically allocate a property, though.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>