On 1/26/2014 8:41 AM, Bas Laarhoven wrote:
> On 26-1-2014 14:32, Charles Steinkuehler wrote:
>> 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...!

Yes, but it's so simple I fear I'm missing something.  There are
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;
};


x_ena {
    gpio-name = "bebopr:x_ena";
    gpio = <&gpio1 4 0>;
    output;
    init-high;
    dir-changeable;
};

Instead of just assuming the direction should _always_ be changeable, so
there's no chance of braking any existing setups.

-- 
Charles Steinkuehler
[email protected]

-- 
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