On 1/26/2014 9:44 AM, Bas Laarhoven wrote: > On 26-1-2014 16:04, Charles Steinkuehler wrote: >> On 1/26/2014 8:41 AM, Bas Laarhoven wrote: >>> >>> Great! It looks so obvious, this makes me wonder why it wasn't >>> implemented the first time...! >> Yes, but it's so simple I fear I'm missing something. There are > > That's what I meant to say. But since modern programmers do not write > comments, we'll always keep wondering whether it was a design decision > or an oversight. :-/
Yep! <sigh> >> definitely times when you might not want an I/O pin to change direction, >> and other times (like my use) where it's OK. >> >> I think maybe I should add a new property to allow the direction to be >> changed, so DT stubs would look something like: >> >> x_min { >> gpio-name = "bebopr:x_min"; >> gpio = <&gpio3 3 0>; >> input; >> dir-changeable; >> }; > > I have limited knowledge of what you're trying to do, but you probably > never want to make gpio3 an output on a BeBoPr because that creates two > outputs fighting the signal! That's why I added the flag, so it can be left off of I/O pins that really shouldn't be able to change direction. It still wound up being a simple 2-line patch. I've tested the change works as expected and have pushed the patch to my linux-dev github repo: https://github.com/cdsteinkuehler/linux-dev/blob/3.8.13-bone37-xenomai/patches/machinekit/0003-Add-dir-changeable-property-to-gpio-of-helper.patch -- Charles Steinkuehler char...@steinkuehler.net -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.