]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/gpio/spear_gpio.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / drivers / gpio / spear_gpio.c
index 367b6701663470db932371daf07d14dc23e508ff..6fb4117dbeaa77fe683a1de3d93b6f155c848a8f 100644 (file)
@@ -36,7 +36,10 @@ int gpio_set_value(unsigned gpio, int value)
 {
        struct gpio_regs *regs = (struct gpio_regs *)CONFIG_GPIO_BASE;
 
-       writel(1 << gpio, &regs->gpiodata[DATA_REG_ADDR(gpio)]);
+       if (value)
+               writel(1 << gpio, &regs->gpiodata[DATA_REG_ADDR(gpio)]);
+       else
+               writel(0, &regs->gpiodata[DATA_REG_ADDR(gpio)]);
 
        return 0;
 }