Adding Kernel Modules, where to put "/asm/xx/header.h" files?

I am trying to compile additional kernel modules (porting them from a SDK) to add extra functionality for my SOC.

Initially (for ease and debug purpose) I want to compile from local source. I managed to put my module in /package/kernel/mymodule with a Makefile, the source code into an additional "src" folder.

The source needs additional "asm/xx/header.h" files which are not standard in Linux / Lede. As a work around I put them into the same source folder and modified to code to use the "local" headers. My module compiles fine and works but this is of course not the proper way to go...

So where do I put these files, so that later when I put them online for other people to use, my module compiles properly?

Not quite sure what is wrong with your approach. As long as the headers are proprietary to your package, it may actually make sense to keep them in the same "src" directory and not to mix them into the general kernel source files.

Ok. I saw other patches (for OpenWRT) and they add files to different places. The same folders are not in my build-dir, hence the question.

I guess it doesn't really hurt to put everything into the src folder. Just thought it would be "proper " not to do like that. I already removed additional (conditional) stuff from the header file cause the references from the original SDK are different. For this I'm also not sure if I should replace the references to Lede or add references during building (make aliases).

If I can't use the ifdef statements in the header, I need to have separate "source" for every (similar) SOC.