funcmux.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. /* Tegra high-level function multiplexing */
  17. #ifndef _TEGRA_FUNCMUX_H_
  18. #define _TEGRA_FUNCMUX_H_
  19. /**
  20. * Select a config for a particular peripheral.
  21. *
  22. * Each peripheral can operate through a number of configurations,
  23. * which are sets of pins that it uses to bring out its signals.
  24. * The basic config is 0, and higher numbers indicate different
  25. * pinmux settings to bring the peripheral out on other pins,
  26. *
  27. * This function also disables tristate for the function's pins,
  28. * so that they operate in normal mode.
  29. *
  30. * @param id Peripheral id
  31. * @param config Configuration to use (FUNCMUX_...), 0 for default
  32. * @return 0 if ok, -1 on error (e.g. incorrect id or config)
  33. */
  34. int funcmux_select(enum periph_id id, int config);
  35. #endif /* _TEGRA_FUNCMUX_H_ */