I was reading the odroid wiki over at hardkernel, and was interested in adding a gpio power key to my c2 running the mainline kernel. (relevant wiki page: Power Off and Wake Up using GPIO Key Button) However, the mainline dtb doesn't seem to have the necessary entry "gpio_keypad"
Modifying, the dtb or creating an overlay is new territory for me, does anyone have any suggested references to go about this?
On a related note, the switch I would like to use has an LED ring, I would like to modify the heartbeat LED gpios (re: HK wiki:Alternative Heartbeat LED) which may be a bit easier since the heartbeat gpio is in the mainline device tree.
When I run ftdget on /leds/blue/gpios, it returns different numbers than the hk wiki states. Since the &gpio_ao number is different in mainline, I am unsure how to go about finding the &gpio number(s) used by the 40-pin header, which i assume are also different from the hk kernel.
Would any of this work in an overlay rather than modifying the mainline dtb, and if so would that make future upgrades easier?
Any assistance would be much appreciated. Thanks!