Skip to contentSkip to conversation

gpio: tb10x: Set output value before setting direction to output

PATCH In review Axel Lin 3 participants 3 messages Oct 31, 2013 – Nov 12, 2013 GPIO

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 gpio: tb10x: Set output value before setting direction to output

---
 drivers/gpio/gpio-tb10x.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-tb10x.c +1 -0
index a0391bc..9116cdf 100644
@@ -132,6 +132,7 @@ static int tb10x_gpio_direction_out(struct gpio_chip *chip,
 	int mask = BIT(offset);
 	int val = TB10X_GPIO_DIR_OUT << offset;
 
+	tb10x_gpio_set(chip, offset, value);
 	tb10x_set_bits(tb10x_gpio, OFFSET_TO_REG_DDR, mask, val);
 
 	return 0;
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Axel Lin
Quoted 21 lines
---
 drivers/gpio/gpio-tb10x.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-tb10x.c +1 -0
index a0391bc..9116cdf 100644
@@ -132,6 +132,7 @@ static int tb10x_gpio_direction_out(struct gpio_chip *chip,
 	int mask = BIT(offset);
 	int val = TB10X_GPIO_DIR_OUT << offset;
 
+	tb10x_gpio_set(chip, offset, value);
 	tb10x_set_bits(tb10x_gpio, OFFSET_TO_REG_DDR, mask, val);
 
 	return 0;
Signature · 1 line
1.8.1.2