diff options
author | Michael Barkowski <michaelbarkowski@ruggedcom.com> | 2009-08-18 17:20:44 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2009-08-25 22:08:45 -0400 |
commit | 1dcd8ffc81e80a170625883f63f6a5db3cd0428d (patch) | |
tree | 8e8f1a34d271a43408745e5eacf868307e85859b /arch | |
parent | 9b9d401b8d11796f4c4bcbcabecfec9f5d85ea25 (diff) |
powerpc/qe_lib: Set gpio data before changing the direction to output
This avoids having a short glitch if the desired initial value is not
the same as what was previously in the data register.
Signed-off-by: Michael Barkowski <michaelbarkowski@ruggedcom.com>
Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c index 3485288dce31..8e7a7767dd5c 100644 --- a/arch/powerpc/sysdev/qe_lib/gpio.c +++ b/arch/powerpc/sysdev/qe_lib/gpio.c | |||
@@ -105,14 +105,14 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | |||
105 | struct qe_gpio_chip *qe_gc = to_qe_gpio_chip(mm_gc); | 105 | struct qe_gpio_chip *qe_gc = to_qe_gpio_chip(mm_gc); |
106 | unsigned long flags; | 106 | unsigned long flags; |
107 | 107 | ||
108 | qe_gpio_set(gc, gpio, val); | ||
109 | |||
108 | spin_lock_irqsave(&qe_gc->lock, flags); | 110 | spin_lock_irqsave(&qe_gc->lock, flags); |
109 | 111 | ||
110 | __par_io_config_pin(mm_gc->regs, gpio, QE_PIO_DIR_OUT, 0, 0, 0); | 112 | __par_io_config_pin(mm_gc->regs, gpio, QE_PIO_DIR_OUT, 0, 0, 0); |
111 | 113 | ||
112 | spin_unlock_irqrestore(&qe_gc->lock, flags); | 114 | spin_unlock_irqrestore(&qe_gc->lock, flags); |
113 | 115 | ||
114 | qe_gpio_set(gc, gpio, val); | ||
115 | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||