Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update I2C and SPI kernel modules #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MichaIng
Copy link
Contributor

@MichaIng MichaIng commented Apr 21, 2022

spi-bcm2708 has been removed with RPi kernel v4.3: raspberrypi/linux@bdfc988
i2c-bcm2708 has been deprecated a long time ago: https://forums.raspberrypi.com/viewtopic.php?t=133024

The respective bcm2835 modules are available and compatible with all RPi models.

Fixes: #4

spi-bcm2708 has been removed with RPi kernel v4.3: raspberrypi/linux@bdfc988
i2c-bcm2708 has been deprecated a long time ago: https://forums.raspberrypi.com/viewtopic.php?t=133024

The respective bcm2835 modules are available and compatible with all RPi models.

Solves: Freenove#4

Signed-off-by: MichaIng <micha@dietpi.com>
@noanight
Copy link

this is a quick fix but...
I think the loadModule and unloadModule Functions, calling modprobe, should be removed, because it's outdated. The Kernel uses device tree.

@MichaIng
Copy link
Contributor Author

Good hint. It doesn't hurt to explicitly load them, but indeed when the anyway respective required device tree overlay is loaded, the modules are loaded automatically at boot. The modulesLoaded checks still make sense, to indirectly check whether the device tree overlay is enabled, but loading and unloading modules does not make sense, as the interfaces anyway do not work without the device tree overlay (despite modules being loaded manually).

However, for it's about the project maintainer to decide whether to keep the change minimal or complete. Btw, I remembered that the original WebIOPi source code is not touched here, but changes applied via patch: https://github.com/Freenove/WebIOPi/blob/master/WebIOPi-0.7.1/webiopi-pi2bplus.patch

But actually, since changes are transparent on Git/GitHub, probably it is not reasonable anymore to keep collecting everything in a growing patch file? However, just an idea, not me to decide either 😉. If the patch is to be kept, I can adjust this PR accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebIOPi using piFace and raspios-bullseye does not start; spi init fails
2 participants