This is a re-adaptation, with some modifications (hopefully improvements), customizations and comments, of the Johannes4Linux sourcefiles for the Linux Driver Tutorial.
The original repository is available here. A step-by-step video series is also available on Youtube. Not all the 14 sections have been explored here.
These modules have been built and tested on a Raspberry Pi 3 B+ running Raspbian:
$ uname -a
Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux