Alessandro Rubini | 9444ff1 | 2009-07-24 11:27:03 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2009 Alessandro Rubini |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Alessandro Rubini | 9444ff1 | 2009-07-24 11:27:03 +0200 | [diff] [blame] | 5 | */ |
| 6 | #ifndef __NMK_GPIO_H__ |
| 7 | #define __NMK_GPIO_H__ |
| 8 | |
| 9 | /* |
| 10 | * These functions are called from the soft-i2c driver, but |
| 11 | * are also used by board files to set output bits. |
| 12 | */ |
| 13 | |
| 14 | enum nmk_af { /* alternate function settings */ |
| 15 | GPIO_GPIO = 0, |
| 16 | GPIO_ALT_A, |
| 17 | GPIO_ALT_B, |
| 18 | GPIO_ALT_C |
| 19 | }; |
| 20 | |
| 21 | extern void nmk_gpio_af(int gpio, int alternate_function); |
| 22 | extern void nmk_gpio_dir(int gpio, int dir); |
| 23 | extern void nmk_gpio_set(int gpio, int val); |
| 24 | extern int nmk_gpio_get(int gpio); |
| 25 | |
| 26 | #endif /* __NMK_GPIO_H__ */ |