diff options
Diffstat (limited to 'target/linux/cns3xxx/files/arch/arm/mach-cns3xxx')
-rw-r--r-- | target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c index 8fccbbf45..4f5d50054 100644 --- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c +++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c @@ -59,9 +59,9 @@ __set_direction(struct cns3xxx_gpio_chip *cchip, unsigned pin, int input) reg = __raw_readl(cchip->base + GPIO_DIR); if (input) - reg |= 1 << pin; + reg &= ~(1 << pin); else - reg &= !(1 << pin); + reg |= (1 << pin); __raw_writel(reg, cchip->base + GPIO_DIR); } |