thanks for the reply briselec! so setting bit 5 enables the pin to be both an output pin and an input pin. The pins themselves could obviously only be either an input or output pin at any one time depending on the value in the GPIO_OE reg.
And the sysfs interface likely sets/clears the GPIO_OE register depending on what value ("out" or "in") is written in the GPIO's 'direction' file.
Does this sound about right ?
For generic GPIO, does that mean that writing a value of 0x2F in the GPIO's control module register via device tree overlays will enable the GPIO as a bidirectional pin? Are there any recommendations for the pull-up/down settings for bi-directional I/Os? I know that they come in handy for inputs configurations, not sure about the bidirectional/output configurations though.
0x2F => 0010 1111
bits 0-2 (111) Mode 7
bit 3 (1) Pull up/down Disabled
bit 4 (x) Pull up/down type (bit 3 is disabled hence this doesn't matter)
bit 5 (1) Receiver enabled
bit 6 (0) Fast slew rate
Thanks!
Hussam