You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hm2_rpspi/hm2_spix: detect kernel SPI driver, fail at load
Replace the eshellf-driven modprobe/rmmod dance with a passive check:
on load, look for the conflicting kernel SPI master driver (spi_bcm2835
on RPi3/4, dw_spi_mmio on RPi5) and refuse to start if present, with a
message pointing at raspi-config or the modprobe.d blacklist recipe in
the man page. Avoids needing root to call /sbin/rmmod and removes the
last user of rtapi_spawn_as_root from these drivers.
The shared kernel_module_loaded() helper queries /sys/module/<name>,
which covers both loadable and built-in modules; /proc/modules alone
would miss kernels with SPI compiled in. Lives in a new kmod_check.c
linked into hm2_rpspi and hm2_spix, replacing eshellf.c which has no
remaining callers (hm2_eth no longer needs it either after the direct
iptables posix_spawn rework).
Update hm2_rpspi(9) and hm2_spix(9) NOTES to describe the per-platform
disable recipe instead of claiming auto-unload.
0 commit comments