I've been following this guide to it's entirety when building existing kernel modules with no issues.
My problem arises when I try to add my own driver.c files to the /linux/drivers/input/touchscreen folder (for example). I can't seem to get the build system to recognize these new files, even when I explicitly add them to the make file.
Normally I configure the modules I want to build through menuconfig
make ARCh=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
Then I cross compile on host Linux with:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules dtbs
but my driver.c file doesn't get compiled. The build system totally ignores it. This is not surprising since the files don't show up in menuconfig. Is there a elegant way to 'register' these new files with the build system so I don't have to add them directly to the make file? But even if I add them to the make file myself, they STILL don't build. I think I've missed something that should be easy and now I am really confused about what to do.