m...@msys.ch said: > yes, please mail me some hints, I find it gross myself, but did not > yet find a better way.
It is pretty easy: -in files.gpio, change the declaration to defpseudodev gpiosim: gpiobus and remove the "attach" line -in the kernel config, change "gpiosim0 at root" (or what you have there) to pseudo-device gpiosim 1 (or a higher number if you want multiple instances) -add a gpiosimattach(int) function to gpiosim.c. It will be called automatically, with the integer argument from the config file, as usual for pseudo devices. In that function, you can call config_attach_pseudo(9) to attach the actual instances. See eg sys/dev/vnd.c for an example. You can do that multiple times, hinted by the integer argument, if you want to allow multiple instances. (You can attach or detach at runtime as well if you have a way to initiate that from a control program or so.) best regards Matthias ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------