On 26-1-2014 14:32, Charles Steinkuehler wrote:
On 1/26/2014 5:37 AM, Charles Steinkuehler wrote:
I'm working on building a "universal" device tree overlay that can be
used to enable and switch between most of the various interesting pin
functions (uart, timers, spi, gpio, pru in/out, etc).  One problem is
the BeagleBone specific gpio_of_helper driver designed to make it easy
to export GPIO pins via the device tree is forcing a fixed direction of
input or output on the GPIO pins.

Before I start hacking on the driver, I'm wondering why the pins weren't
either exported with the GPIOF_EXPORT_CHANGEABLE flag set, or why some
provision wasn't made to allow specifying the direction could be changed.
I verified the attached minor patch does what I need and allows the user
to change the GPIO direction after the pin is exported by the
gpio-of-helper driver.

Without this patch, any pins exported to sysfs by the gpio-of-helper
driver are missing the /sys/class/gpio/gpio<N>/direction file and are
stuck in either input or output mode.

Comments?


Great! It looks so obvious, this makes me wonder why it wasn't implemented the first time...!

-- Bas

--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to