Should I just leave it there, or add it to ports somehow? I would like a code review, because it is my first kernel module, I only wrote some bare metal drivers for embedded stuff before.
You asked, I hope this will be useful.
You are missing a man page. You are missing an config.txt example.
For good man pages, you need 3 examples:
1) a simple example
2) a common use example
3) a complex example
If your initial case they might all be the same.
For a complex example, I would consider something like a matrix input keyboard. That goes back to the "break" key of 8 bit home computers. Or see my wish list below.
For you man page, Start with a copy of a simple other kernel module man page preferably one originated by someone in the bsd core team and modify to suit. If you can't find one, look at the boot ones (and if you find a good one, update the docs on how to doc docs).
Since I'm already asking for stuff...
Can you add "instant touch", and/or "hold for 3 sec to do thing A, hold for 10 sec to do thing B"?
Or more than one button... I can see a use of "restart the NTP" thing... except I need it to resycn the local gps while not screwing with everything else which requires injecting a command into ntpc which tells ntpd odd stuff. Of, the other button could reset all of NTP and the last one just does a nice warm restart. Extra points for flipping LED status either built in or I/O pin. I did mention 3) a complex example.
Also what happens on a simple install where the console happens to be a on your "sane reboot" pin? Writing that off as a config err is ok.
Final comment is make sure you have a decent name for your module. It should be specific, unambiguous but not too complex.