diff --git a/[refs] b/[refs] index adcfe77e5f86..ad683b291af9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a99d55514d3c6bfc03e41536659d781af6998f5 +refs/heads/master: 64b997c5142a13373857de09599afd2f079c2f7a diff --git a/trunk/drivers/gpio/pl061.c b/trunk/drivers/gpio/pl061.c index cc3b5e0b595a..2196f318114c 100644 --- a/trunk/drivers/gpio/pl061.c +++ b/trunk/drivers/gpio/pl061.c @@ -91,6 +91,12 @@ static int pl061_direction_output(struct gpio_chip *gc, unsigned offset, gpiodir = readb(chip->base + GPIODIR); gpiodir |= 1 << offset; writeb(gpiodir, chip->base + GPIODIR); + + /* + * gpio value is set again, because pl061 doesn't allow to set value of + * a gpio pin before configuring it in OUT mode. + */ + writeb(!!value << offset, chip->base + (1 << (offset + 2))); spin_unlock_irqrestore(&chip->lock, flags); return 0;