padmux.h 827 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. *
  3. * arch/arm/mach-u300/padmux.h
  4. *
  5. *
  6. * Copyright (C) 2009 ST-Ericsson AB
  7. * License terms: GNU General Public License (GPL) version 2
  8. * U300 PADMUX API
  9. * Author: Martin Persson <martin.persson@stericsson.com>
  10. */
  11. #ifndef __MACH_U300_PADMUX_H
  12. #define __MACH_U300_PADMUX_H
  13. enum pmx_settings {
  14. U300_APP_PMX_MMC_SETTING,
  15. U300_APP_PMX_SPI_SETTING
  16. };
  17. struct pmx_onmask {
  18. u16 mask; /* Mask bits */
  19. u16 val; /* Value when active */
  20. };
  21. struct pmx {
  22. struct device *dev;
  23. enum pmx_settings setting;
  24. char *name;
  25. bool activated;
  26. bool default_on;
  27. struct pmx_onmask onmask[];
  28. };
  29. struct pmx *pmx_get(struct device *dev, enum pmx_settings setting);
  30. int pmx_put(struct device *dev, struct pmx *pmx);
  31. int pmx_activate(struct device *dev, struct pmx *pmx);
  32. int pmx_deactivate(struct device *dev, struct pmx *pmx);
  33. #endif