blob: 311758ae1a4487f5093e2f9ffc147c9b41906426 [file] [log] [blame]
Alessandro Rubini60cbfbf2009-07-24 11:27:03 +02001/*
2 * (C) Copyright 2009 Alessandro Rubini
3 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Alessandro Rubini60cbfbf2009-07-24 11:27:03 +02005 */
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
14enum nmk_af { /* alternate function settings */
15 GPIO_GPIO = 0,
16 GPIO_ALT_A,
17 GPIO_ALT_B,
18 GPIO_ALT_C
19};
20
21extern void nmk_gpio_af(int gpio, int alternate_function);
22extern void nmk_gpio_dir(int gpio, int dir);
23extern void nmk_gpio_set(int gpio, int val);
24extern int nmk_gpio_get(int gpio);
25
26#endif /* __NMK_GPIO_H__ */