funcmux.h 884 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
  4. */
  5. /* Tegra high-level function multiplexing */
  6. #ifndef _TEGRA_FUNCMUX_H_
  7. #define _TEGRA_FUNCMUX_H_
  8. /**
  9. * Select a config for a particular peripheral.
  10. *
  11. * Each peripheral can operate through a number of configurations,
  12. * which are sets of pins that it uses to bring out its signals.
  13. * The basic config is 0, and higher numbers indicate different
  14. * pinmux settings to bring the peripheral out on other pins,
  15. *
  16. * This function also disables tristate for the function's pins,
  17. * so that they operate in normal mode.
  18. *
  19. * @param id Peripheral id
  20. * @param config Configuration to use (FUNCMUX_...), 0 for default
  21. * Return: 0 if ok, -1 on error (e.g. incorrect id or config)
  22. */
  23. int funcmux_select(enum periph_id id, int config);
  24. #endif /* _TEGRA_FUNCMUX_H_ */