]> err.no Git - linux-2.6/blobdiff - Documentation/gpio.txt
[CRYPTO] doc: Fix typo in hash example
[linux-2.6] / Documentation / gpio.txt
index 576ce463cf442d7fb806fea31eb373c883647d86..989f1130f4f33e6960459b971b41862b10713a2d 100644 (file)
@@ -105,12 +105,15 @@ setting up a platform_device using the GPIO, is mark its direction:
 
        /* set as input or output, returning 0 or negative errno */
        int gpio_direction_input(unsigned gpio);
 
        /* set as input or output, returning 0 or negative errno */
        int gpio_direction_input(unsigned gpio);
-       int gpio_direction_output(unsigned gpio);
+       int gpio_direction_output(unsigned gpio, int value);
 
 The return value is zero for success, else a negative errno.  It should
 be checked, since the get/set calls don't have error returns and since
 misconfiguration is possible.  (These calls could sleep.)
 
 
 The return value is zero for success, else a negative errno.  It should
 be checked, since the get/set calls don't have error returns and since
 misconfiguration is possible.  (These calls could sleep.)
 
+For output GPIOs, the value provided becomes the initial output value.
+This helps avoid signal glitching during system startup.
+
 Setting the direction can fail if the GPIO number is invalid, or when
 that particular GPIO can't be used in that mode.  It's generally a bad
 idea to rely on boot firmware to have set the direction correctly, since
 Setting the direction can fail if the GPIO number is invalid, or when
 that particular GPIO can't be used in that mode.  It's generally a bad
 idea to rely on boot firmware to have set the direction correctly, since