diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2011-07-07 14:50:16 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-07-07 12:42:50 -0600 |
commit | fb1492186276ba52d99b58121b8a9a87f20cc9f3 (patch) | |
tree | 272d56ac4e895e9c14b6154a54e8a9014657c6eb /drivers/sn | |
parent | 6eae1ace68ab775e9d47f1f8e40c811ac39f733f (diff) |
gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables
The bgpio_init() function does not initialise the shadow register for
the GPIO direction register. Thus, when configuring the first GPIO with
gpio_set_direction() all other GPIOs of the same bank will be
configured as inputs. Since the bgpio layer cannot know whether the
register is readable, the initialisation should be done by the caller
of bgpio_init().
Also, the 'data' shadow variable that is used inside basic_mmio_gpio
to cache the current value of the GPIO_DR register is initialised from
the GPIO_PSR register within bgpio_init(). Thus when setting the
output value of a certain GPIO, the other GPIO outputs of the same
bank will be set or cleared depending on the pin state of the GPIO
inputs during bgpio_init().
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/sn')
0 files changed, 0 insertions, 0 deletions