It's been pointed out that output GPIOs should have an initial value, toavoid signal glitching ... among other things, it can be some time beforea driver is ready. This patch corrects that oversight, fixing

- documentation - platforms supporting the GPIO interface - users of that call (just one for now, others are pending)

Note that most platforms are clear about the hardware letting the outputvalue be set before the pin direction is changed, but the s3c241x docsare vague on that topic ... so those chips might not avoid the glitches.

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 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, sinceIndex: g26/include/asm-arm/arch-at91/gpio.h===================================================================--- g26.orig/include/asm-arm/arch-at91/gpio.h 2007-02-19 13:43:00.000000000 -0800+++ g26/include/asm-arm/arch-at91/gpio.h 2007-03-01 14:36:02.000000000 -0800@@ -223,7 +223,7 @@ static inline void gpio_free(unsigned gp }