Hi,
For my pi I needed a button to safely shut it down. Found the gpio-shutdown overlay you can add in config.txt. This adds some stuff in the device tree. This little driver makes use of that.
Code is here.
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.
For my pi I needed a button to safely shut it down. Found the gpio-shutdown overlay you can add in config.txt. This adds some stuff in the device tree. This little driver makes use of that.
Code is here.
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.