intel-lpss.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Intel LPSS core support.
  3. *
  4. * Copyright (C) 2015, Intel Corporation
  5. *
  6. * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  7. * Mika Westerberg <mika.westerberg@linux.intel.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef __MFD_INTEL_LPSS_H
  14. #define __MFD_INTEL_LPSS_H
  15. struct device;
  16. struct resource;
  17. struct property_entry;
  18. struct intel_lpss_platform_info {
  19. struct resource *mem;
  20. int irq;
  21. unsigned long clk_rate;
  22. const char *clk_con_id;
  23. struct property_entry *properties;
  24. };
  25. int intel_lpss_probe(struct device *dev,
  26. const struct intel_lpss_platform_info *info);
  27. void intel_lpss_remove(struct device *dev);
  28. #ifdef CONFIG_PM
  29. int intel_lpss_prepare(struct device *dev);
  30. int intel_lpss_suspend(struct device *dev);
  31. int intel_lpss_resume(struct device *dev);
  32. #ifdef CONFIG_PM_SLEEP
  33. #define INTEL_LPSS_SLEEP_PM_OPS \
  34. .prepare = intel_lpss_prepare, \
  35. SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume)
  36. #else
  37. #define INTEL_LPSS_SLEEP_PM_OPS
  38. #endif
  39. #define INTEL_LPSS_RUNTIME_PM_OPS \
  40. .runtime_suspend = intel_lpss_suspend, \
  41. .runtime_resume = intel_lpss_resume,
  42. #else /* !CONFIG_PM */
  43. #define INTEL_LPSS_SLEEP_PM_OPS
  44. #define INTEL_LPSS_RUNTIME_PM_OPS
  45. #endif /* CONFIG_PM */
  46. #define INTEL_LPSS_PM_OPS(name) \
  47. const struct dev_pm_ops name = { \
  48. INTEL_LPSS_SLEEP_PM_OPS \
  49. INTEL_LPSS_RUNTIME_PM_OPS \
  50. }
  51. #endif /* __MFD_INTEL_LPSS_H */