aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2012-02-17 09:56:20 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-03-05 09:49:44 -0500
commit3d2ddfdcf05f5f816f829f81858c54827d7be5b4 (patch)
tree3a655df686c60a332accba69976ab251c6a25289 /Documentation
parent6e2cf6514066cdd5a0844b34760029a5a4870318 (diff)
Documentation: gpio: Add details of open-drain/source configuration
Adding details of open drain(open collector) and open source (open emitter) configuration of the gpio so that client can set the pin as open drain at the time of gpio request. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gpio.txt17
1 files changed, 15 insertions, 2 deletions
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index 792faa3c06cf..f783e7fed764 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -302,6 +302,8 @@ where 'flags' is currently defined to specify the following properties:
302 302
303 * GPIOF_INIT_LOW - as output, set initial level to LOW 303 * GPIOF_INIT_LOW - as output, set initial level to LOW
304 * GPIOF_INIT_HIGH - as output, set initial level to HIGH 304 * GPIOF_INIT_HIGH - as output, set initial level to HIGH
305 * GPIOF_OPEN_DRAIN - gpio pin is open drain type.
306 * GPIOF_OPEN_SOURCE - gpio pin is open source type.
305 307
306since GPIOF_INIT_* are only valid when configured as output, so group valid 308since GPIOF_INIT_* are only valid when configured as output, so group valid
307combinations as: 309combinations as:
@@ -310,8 +312,19 @@ combinations as:
310 * GPIOF_OUT_INIT_LOW - configured as output, initial level LOW 312 * GPIOF_OUT_INIT_LOW - configured as output, initial level LOW
311 * GPIOF_OUT_INIT_HIGH - configured as output, initial level HIGH 313 * GPIOF_OUT_INIT_HIGH - configured as output, initial level HIGH
312 314
313In the future, these flags can be extended to support more properties such 315When setting the flag as GPIOF_OPEN_DRAIN then it will assume that pins is
314as open-drain status. 316open drain type. Such pins will not be driven to 1 in output mode. It is
317require to connect pull-up on such pins. By enabling this flag, gpio lib will
318make the direction to input when it is asked to set value of 1 in output mode
319to make the pin HIGH. The pin is make to LOW by driving value 0 in output mode.
320
321When setting the flag as GPIOF_OPEN_SOURCE then it will assume that pins is
322open source type. Such pins will not be driven to 0 in output mode. It is
323require to connect pull-down on such pin. By enabling this flag, gpio lib will
324make the direction to input when it is asked to set value of 0 in output mode
325to make the pin LOW. The pin is make to HIGH by driving value 1 in output mode.
326
327In the future, these flags can be extended to support more properties.
315 328
316Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is 329Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is
317introduced to encapsulate all three fields as: 330introduced to encapsulate all three fields as: