summaryrefslogtreecommitdiff
path: root/src/lib/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/gpio.c')
-rw-r--r--src/lib/gpio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/gpio.c b/src/lib/gpio.c
index 0875538bae..633eabb4f5 100644
--- a/src/lib/gpio.c
+++ b/src/lib/gpio.c
@@ -26,10 +26,14 @@ int gpio_base2_value(gpio_t gpio[], int num_gpio)
{
int i, result = 0;
- for (i = 0; i < num_gpio; i++) {
+ for (i = 0; i < num_gpio; i++)
gpio_input(gpio[i]);
+
+ /* Wait until signals become stable */
+ udelay(10);
+
+ for (i = 0; i < num_gpio; i++)
result |= gpio_get(gpio[i]) << i;
- }
return result;
}