The patches shown are not actually “a git thing”, but git was shown in order to identify which files the patch is comparing. The “diff” command is illustrating the changes the patch will make compared to the unpatched source regardless of whether or not git provided one of the sources.
This part of the diff says there are two source trees looking at file “tegra124-jetson_tk1-gpio-pm375-0000-c00-00.dtsi” in kernel source subdirectory “arch/arm/boot/dts/tegra124-platforms/”:
So if you are manually exploring or hand editing, you’d go to your unpatched kernel source and look at subdirectory “arch/arm/boot/dts/tegra124-platforms/”, then edit file “tegra124-jetson_tk1-gpio-pm375-0000-c00-00.dtsi”.
The rest of the patch simply identifies line numbers in a way that the patch command can use to remove lines, add lines, or leave lines alone. Mostly you will see a line removal followed by a line addition if a line is edited. Lines can also be added without removing something, or lines can be removed and nothing added back. The leading “+” or “-” tells you if it is an addition or removal. A “-” followed by a “+” just means an edit. The notation “@@ -36,10 +36,7 @@” says this is about 10 lines of the first file, and after patch, the second file will have 7 lines. In both cases of the source and destination, the block of lines start at line 36:
@@ -36,10 +36,7 @@
- TEGRA_GPIO(U, 3)
- TEGRA_GPIO(U, 5)
- TEGRA_GPIO(U, 6)
gpio-output-low = <
The above sample from the PWM patch URL means you are removing three lines and not adding anything back. The patch command can be used to automate this if you have both the unpatched file and the patch (but not the end product…once patch is done, you will have end product).
So basically you start with the kernel source from the download page of L4T R21.4.