malta-pm.h 1012 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) 2014 Imagination Technologies
  3. * Author: Paul Burton <paul.burton@imgtec.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. */
  10. #ifndef __ASM_MIPS_MACH_MALTA_PM_H__
  11. #define __ASM_MIPS_MACH_MALTA_PM_H__
  12. #include <asm/mips-boards/piix4.h>
  13. #ifdef CONFIG_MIPS_MALTA_PM
  14. /**
  15. * mips_pm_suspend - enter a suspend state
  16. * @state: the state to enter, one of PIIX4_FUNC3IO_PMCNTRL_SUS_TYP_*
  17. *
  18. * Enters a suspend state via the Malta's PIIX4. If the state to be entered
  19. * is one which loses context (eg. SOFF) then this function will never
  20. * return.
  21. */
  22. extern int mips_pm_suspend(unsigned state);
  23. #else /* !CONFIG_MIPS_MALTA_PM */
  24. static inline int mips_pm_suspend(unsigned state)
  25. {
  26. return -EINVAL;
  27. }
  28. #endif /* !CONFIG_MIPS_MALTA_PM */
  29. #endif /* __ASM_MIPS_MACH_MALTA_PM_H__ */