gpio.h 573 B

1234567891011121314151617181920212223242526
  1. /*
  2. * (C) Copyright 2009 Alessandro Rubini
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __NMK_GPIO_H__
  7. #define __NMK_GPIO_H__
  8. /*
  9. * These functions are called from the soft-i2c driver, but
  10. * are also used by board files to set output bits.
  11. */
  12. enum nmk_af { /* alternate function settings */
  13. GPIO_GPIO = 0,
  14. GPIO_ALT_A,
  15. GPIO_ALT_B,
  16. GPIO_ALT_C
  17. };
  18. extern void nmk_gpio_af(int gpio, int alternate_function);
  19. extern void nmk_gpio_dir(int gpio, int dir);
  20. extern void nmk_gpio_set(int gpio, int val);
  21. extern int nmk_gpio_get(int gpio);
  22. #endif /* __NMK_GPIO_H__ */