Skip to content

Commit 2095a45

Browse files
AxelLinbrgl
authored andcommitted
gpio: altera-a10sr: Set proper output level for direction_output
The altr_a10sr_gpio_direction_output should set proper output level based on the value argument. Fixes: 26a48c4 ("gpio: altera-a10sr: Add A10 System Resource Chip GPIO support.") Cc: <stable@vger.kernel.org> Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested by: Thor Thayer <thor.thayer@linux.intel.com> Reviewed by: Thor Thayer <thor.thayer@linux.intel.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
1 parent f785ffb commit 2095a45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpio/gpio-altera-a10sr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ static int altr_a10sr_gpio_direction_input(struct gpio_chip *gc,
6666
static int altr_a10sr_gpio_direction_output(struct gpio_chip *gc,
6767
unsigned int nr, int value)
6868
{
69-
if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI - ALTR_A10SR_LED_VALID_SHIFT))
69+
if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI - ALTR_A10SR_LED_VALID_SHIFT)) {
70+
altr_a10sr_gpio_set(gc, nr, value);
7071
return 0;
72+
}
7173
return -EINVAL;
7274
}
7375

0 commit comments

Comments
 (0)