Skip to content

Commit

Permalink
powerpc/qe_lib: Set gpio data before changing the direction to output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Barkowski authored and Kumar Gala committed Aug 26, 2009
1 parent 9b9d401 commit 1dcd8ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/sysdev/qe_lib/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
struct qe_gpio_chip *qe_gc = to_qe_gpio_chip(mm_gc);
unsigned long flags;

qe_gpio_set(gc, gpio, val);

spin_lock_irqsave(&qe_gc->lock, flags);

__par_io_config_pin(mm_gc->regs, gpio, QE_PIO_DIR_OUT, 0, 0, 0);

spin_unlock_irqrestore(&qe_gc->lock, flags);

qe_gpio_set(gc, gpio, val);

return 0;
}

Expand Down

0 comments on commit 1dcd8ff

Please sign in to comment.