Zahemszky Gábor <ga...@zahemszky.hu> writes: > # kldload gpiospi > > kldload: can't load gpiospi: module already loaded or in kernel > > It's not true: "kldstat -v | fgrep -A 5 gpio" doesn't show it. > > But on the console > > === > KLD gpiospi.ko: depends on gpiospi - not available or version mismatch > === > > gpiospi depends on gpiospi ????
The file gpiospi.ko contains multiple modules, one of which is gpiospi: DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, gpio_spi_devclass, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, spibus_devclass, 0, 0); It also appears to declare dependencies for modules it does not contain: MODULE_DEPEND(spi, gpiospi, 1, 1, 1); MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); I believe the intention was that gpiospi depends on spibus and gpiobus, but what it actually says is that spi (which does not exist) and gpiobus depend on gpiospi. If you change those two lines to the following, the module will load: MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); I have no idea if it will work, though. DES -- Dag-Erling Smørgrav - d...@freebsd.org