In message <[EMAIL PROTECTED]>, Willem van Engen さんいわく:
>I'm trying to write a module which should be a child of the smbus.
>When I make the driver a child of the isa bus, identify, probe, 
>and attach functions are properly called. I use the following
>code to do that:
>  DRIVER_MODULE(my, isa, my_driver, my_devclass, 0, 0);
>But when I put it on the smbus using
>  DRIVER_MODULE(my, smbus, my_driver, my_devclass, 0, 0);
>only identify is called. The identify function is as follows:
>
>  static void
>  my_identify(driver_t *driver, device_t parent)
>  {
>      devclass_t dc;
>      device_t child;
>
>      printf("my: my_identify called\n");
>      dc = devclass_find("my");
>      if (devclass_get_device(dc, 0)==NULL) {
>          child = BUS_ADD_CHILD(parent, 0, "my", -1);
>      }
>  }


'smbus' code do not have 'bus_add_child' method.So the BUS_ADD_CHILD
call do not take effect.
Call device_add_child(parent,"my",-1); or define bus_add_child method.

And you will need to know grandparent device name to bind the device
collectly.(Or should we need a way to get device attribute such as
 Mother board, Video Capture BitBang,Video Capture Cooked,VGA Card and etc.)

Takanori Watanabe
<a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html">
Public Key</a>
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to