zx2967_pm_domains.h 816 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Header for ZTE's Power Domain Driver support
  4. *
  5. * Copyright (C) 2017 ZTE Ltd.
  6. *
  7. * Author: Baoyou Xie <baoyou.xie@linaro.org>
  8. */
  9. #ifndef __ZTE_ZX2967_PM_DOMAIN_H
  10. #define __ZTE_ZX2967_PM_DOMAIN_H
  11. #include <linux/platform_device.h>
  12. #include <linux/pm_domain.h>
  13. enum {
  14. REG_CLKEN,
  15. REG_ISOEN,
  16. REG_RSTEN,
  17. REG_PWREN,
  18. REG_PWRDN,
  19. REG_ACK_SYNC,
  20. /* The size of the array - must be last */
  21. REG_ARRAY_SIZE,
  22. };
  23. enum zx2967_power_polarity {
  24. PWREN,
  25. PWRDN,
  26. };
  27. struct zx2967_pm_domain {
  28. struct generic_pm_domain dm;
  29. const u16 bit;
  30. const enum zx2967_power_polarity polarity;
  31. const u16 *reg_offset;
  32. };
  33. int zx2967_pd_probe(struct platform_device *pdev,
  34. struct generic_pm_domain **zx_pm_domains,
  35. int domain_num);
  36. #endif /* __ZTE_ZX2967_PM_DOMAIN_H */