Stefan,
For my use case, I need to pass through a signal to blink an LED. I could constantly poll the input and set LED, but the trigger for GPIO seems to work much better.
In at least the 4.9.11 kernel in the LED Trigger support you can enable LED GPIO Trigger.
Then for the leds I get these triggers:
cat /sys/class/leds/led_wwan/trigger
none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock mmc1 timer oneshot heartbeat [gpio] default-on
This will set up the trigger with gpio 122 as a input:
echo gpio > /sys/class/leds/led_wwan/trigger
echo 122 > /sys/class/leds/led_wwan/gpio
When GPIO 122 see a high signal it will turn the LED on and low signal turns it off.
I thought there might be a way to see the 122 in the device tree, but currently there is not. I can set it up after boot.
Thanks
Bryce