On Thu, Mar 30, 2006 at 09:51:58 -0800, Sanjay Acharya wrote: > Bahadir Balban wrote: > > >Hi, > > > >How do I best pass parameters to a driver about my device at > >compile-time, by device->platform_data? (it's going to be an in-kernel > >driver). > > > >It is a network device and the parameters are the PHY address and a > >MAC address to optionally override the MAC stored in EEPROM. There may > >also be more parameters eventually. > > > How about passing parameter name-value pairs using the -D option in your > makefile? Not sure if thats the one you want... Have you ever seen kernel build system? If you want to add compile-time options, that's what the config thing is for. Each directory can have a file (Configure, or something like that) where it describes compile-time options it wants. There can then be set by make menucoding or make qconfig (or the other *config targets). However, the above option should NOT be compile-time. Either implement appropriate IOCTL so it can be set by ifconfig, or at least implement driver parameters (there are some macros like mod_param to declare them -- i don't recall which variant is current, as there are some obsolete ones as well). -- Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature