Commit b5db0a068a25e71b178e4b89635af731cf2f7c24
Committed by
Albert ARIBAUD
1 parent
1037d585d3
Exists in
master
and in
54 other branches
omap: Don't use gpio_free to change direction to input
gpio_free() should not have the side effect of setting the line to input since this prevents the gpio command from being able to set a line as output. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Showing 5 changed files with 1 additions and 21 deletions Side-by-side Diff
arch/arm/cpu/armv7/omap-common/gpio.c
board/logicpd/zoom2/debug_board.c
board/logicpd/zoom2/zoom2.c
board/overo/overo.c
... | ... | @@ -118,10 +118,6 @@ |
118 | 118 | revision = gpio_get_value(115) << 2 | |
119 | 119 | gpio_get_value(113) << 1 | |
120 | 120 | gpio_get_value(112); |
121 | - | |
122 | - gpio_free(112); | |
123 | - gpio_free(113); | |
124 | - gpio_free(115); | |
125 | 121 | } else { |
126 | 122 | printf("Error: unable to acquire board revision GPIOs\n"); |
127 | 123 | revision = -1; |
... | ... | @@ -153,8 +149,7 @@ |
153 | 149 | sdio_direct = 0; |
154 | 150 | } |
155 | 151 | |
156 | - gpio_free(130); | |
157 | - gpio_free(139); | |
152 | + gpio_direction_input(130); | |
158 | 153 | } else { |
159 | 154 | printf("Error: unable to acquire sdio2 clk GPIOs\n"); |
160 | 155 | sdio_direct = -1; |
board/ti/beagle/beagle.c
... | ... | @@ -127,10 +127,6 @@ |
127 | 127 | revision = gpio_get_value(173) << 2 | |
128 | 128 | gpio_get_value(172) << 1 | |
129 | 129 | gpio_get_value(171); |
130 | - | |
131 | - gpio_free(171); | |
132 | - gpio_free(172); | |
133 | - gpio_free(173); | |
134 | 130 | } else { |
135 | 131 | printf("Error: unable to acquire board revision GPIOs\n"); |
136 | 132 | revision = -1; |
... | ... | @@ -521,8 +517,6 @@ |
521 | 517 | button = 0; |
522 | 518 | printf("NOT pressed.\n"); |
523 | 519 | } |
524 | - | |
525 | - gpio_free(gpio); | |
526 | 520 | |
527 | 521 | return !button; |
528 | 522 | } |