浏览代码

gpio: tpic2810: Make tpic2810_direction_output set proper output level

The .direction_output callback should set proper output level.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin 9 年之前
父节点
当前提交
ce02d18fc1
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/gpio/gpio-tpic2810.c

+ 3 - 0
drivers/gpio/gpio-tpic2810.c

@@ -33,6 +33,8 @@ struct tpic2810 {
 	struct mutex lock;
 };
 
+static void tpic2810_set(struct gpio_chip *chip, unsigned offset, int value);
+
 static int tpic2810_get_direction(struct gpio_chip *chip,
 				  unsigned offset)
 {
@@ -51,6 +53,7 @@ static int tpic2810_direction_output(struct gpio_chip *chip,
 				     unsigned offset, int value)
 {
 	/* This device always output */
+	tpic2810_set(chip, offset, value);
 	return 0;
 }