Best method to run config-pin after bootup?

Anyone have a favorite way to run config-pin after a BeagleBone boots up?

Background:
this question came up in this thread on the Adafruit forum where a BBGW boots with 4.4 ti kernel and univ-all-00A0.dtbo:

“Re: Green Wireless + DHT22 = not working?”

https://forums.adafruit.com/viewtopic.php?f=49&t=111784#p559251

thanks,
drew

It’s been my experience that if you’re running 4.x kernel it’s best not to use config-pin at all. For simple GPIO it works ok most of the time. But for more complex configurations it may not work all that well. There is at least one GPIO( P9.27 I think ) that won’t properly display it’s high / low value despite the pin being physically changed. This has been confirmed on our hardware here. This, can be a game changer if you need to monitor the pin states, and you need this pin.

My buddy uses a simple yet long winded bash script to test our hardware, and that works well for him. So it wouldn’t be too much of a stretch to imagine running a systemd service that calls a bash script that in turn configures the pins via config-pin.

Faster still would be to write your own device tree overlays, and load them via uEnv.txt at boot. This has the benefit of loading the pins very early ( in the initrd just a few seconds after boot )

Experimental versions of uboot can even load overlays the fastest, but multiple overlay loading seems a bit glitched the last time I tested( a couple months ago ).

The last tow options here of course having nothing to do with config-pin / universal IO.

It's been my experience that if you're running 4.x kernel it's best not
to use config-pin at all. For simple GPIO it works ok most of the time. But
for more complex configurations it may not work all that well. There is at
least one GPIO( P9.27 I think ) that won't properly display it's high / low
value despite the pin being physically changed. This has been confirmed on
our hardware here. This, can be a game changer if you need to monitor the
pin states, and you need this pin.

Actually this seem to only happen on Beaglebone greens. I have not been
able to duplicate this on any of our Beaglebone blacks.