First of all you will need the source of the kernel you want to patch as it is explained here:
https://source.android.com/source/building-kernels.html
As you can see in your link these files are written in C.
When you got the source you can change some lines in these files to create your own patch
How you build your changed kernel is explained as well in the above link.
You can also add new files for complete new functionality or features.
To create your .patch file you will have to do something like
diff -Naur old_file.c changed_old_file.c > patch.txt
or you could as well use eclipse or git to do so, as shown here:
https://docs.moodle.org/dev/How_to_create_a_patch
Another usefull tool to create patches and apply them is quilt. How to use it you can read here:
https://wiki.debian.org/UsingQuilt
The documentation is done in the code with comments.
Depending on the developer there will be more or less comments to explain what happens in the code.
Additional documentation can be found under:
https://www.kernel.org/doc/Documentation/
I think the Linux kernel coding style is used in Android kernel development as well. So you should stick to the coding style of the rest of the kernel to get your patch acknowledged by the maintainer.
https://www.kernel.org/doc/Documentation/CodingStyle
[EDIT]:
If you want to participate in the community its a good idea to subscribe to the mailing list of the kernel part you are most interested in. You can also get a feeling for what is needed to be patched.
The google groups are probably a good place to ask additional questions on how to go on.
https://source.android.com/source/community/index.html
You can also get the source for android here:
https://android.googlesource.com/?format=HTML
Did i leave something out?