Commit 1bbd28d21518e3118e0a2d1da87084b6846e5b32
Committed by
Anatolij Gustschin
1 parent
3ab270d5df
Exists in
master
and in
57 other branches
Add gpio_request() to asm-generic header
This function should also be part of the GPIO API, so add it. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff
include/asm-generic/gpio.h
| ... | ... | @@ -94,5 +94,14 @@ |
| 94 | 94 | */ |
| 95 | 95 | int gpio_set_value(unsigned gpio, int value); |
| 96 | 96 | |
| 97 | +/** | |
| 98 | + * Request a gpio. This should be called before any of the other functions | |
| 99 | + * are used on this gpio. | |
| 100 | + * | |
| 101 | + * @param gp GPIO number | |
| 102 | + * @param label User label for this GPIO | |
| 103 | + * @return 0 if ok, -1 on error | |
| 104 | + */ | |
| 105 | +int gpio_request(unsigned gpio, const char *label); | |
| 97 | 106 | #endif /* _ASM_GENERIC_GPIO_H_ */ |