gpio-sch: set output level after configuration of direction
authorDaniel Krueger <daniel.krueger@systec-electronic.com>
Mon, 7 Apr 2014 12:20:32 +0000 (14:20 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 28 Apr 2014 19:35:08 +0000 (12:35 -0700)
commit1e0d9823178f8793dec7d1e9cd08f9bee5123871
tree6776551c46d61207f6ab6a4a5f10abf9bfabc3a4
parent9ea8d8102bbd32d97fe25decd4bf47ad2a63e031
gpio-sch: set output level after configuration of direction

According to the datasheet, writing to the level register has no effect
when GPIO is programmed as input. Actually the the level register is
read-only when configured as input. Thus presetting the output level
before switching to output is _NOT_ possible. Any writes are lost!
Hence we set the level after configuring the GPIO as output.
But we cannot prevent a short low pulse if direction is set to high and
an external  pull-up is connected.

Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com>
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-sch.c
This page took 0.065848 seconds and 5 git commands to generate.