diff options
-rw-r--r-- | drivers/gpio/cs5535-gpio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c index 79eb9c5a2923..d3e55a0ae92b 100644 --- a/drivers/gpio/cs5535-gpio.c +++ b/drivers/gpio/cs5535-gpio.c | |||
@@ -70,8 +70,12 @@ static void errata_outl(struct cs5535_gpio_chip *chip, u32 val, | |||
70 | * Don't apply this errata to the edge status GPIOs, as writing | 70 | * Don't apply this errata to the edge status GPIOs, as writing |
71 | * to their lower bits will clear them. | 71 | * to their lower bits will clear them. |
72 | */ | 72 | */ |
73 | if (reg != GPIO_POSITIVE_EDGE_STS && reg != GPIO_NEGATIVE_EDGE_STS) | 73 | if (reg != GPIO_POSITIVE_EDGE_STS && reg != GPIO_NEGATIVE_EDGE_STS) { |
74 | val |= inl(addr); | 74 | if (val & 0xffff) |
75 | val |= (inl(addr) & 0xffff); /* ignore the high bits */ | ||
76 | else | ||
77 | val |= (inl(addr) ^ (val >> 16)); | ||
78 | } | ||
75 | outl(val, addr); | 79 | outl(val, addr); |
76 | } | 80 | } |
77 | 81 | ||