pm-rmobile.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (C) 2012 Renesas Solutions Corp.
  3. *
  4. * Kuninori Morimoto <morimoto.kuninori@renesas.com>
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef PM_RMOBILE_H
  11. #define PM_RMOBILE_H
  12. #include <linux/pm_domain.h>
  13. struct platform_device;
  14. struct rmobile_pm_domain {
  15. struct generic_pm_domain genpd;
  16. struct dev_power_governor *gov;
  17. int (*suspend)(void);
  18. void (*resume)(void);
  19. unsigned int bit_shift;
  20. bool no_debug;
  21. };
  22. static inline
  23. struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d)
  24. {
  25. return container_of(d, struct rmobile_pm_domain, genpd);
  26. }
  27. #ifdef CONFIG_PM
  28. extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd);
  29. extern void rmobile_add_device_to_domain(struct rmobile_pm_domain *rmobile_pd,
  30. struct platform_device *pdev);
  31. extern void rmobile_pm_add_subdomain(struct rmobile_pm_domain *rmobile_pd,
  32. struct rmobile_pm_domain *rmobile_sd);
  33. #else
  34. #define rmobile_init_pm_domain(pd) do { } while (0)
  35. #define rmobile_add_device_to_domain(pd, pdev) do { } while (0)
  36. #define rmobile_pm_add_subdomain(pd, sd) do { } while (0)
  37. #endif /* CONFIG_PM */
  38. #endif /* PM_RMOBILE_H */