proxy-consumer.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _LINUX_REGULATOR_PROXY_CONSUMER_H_
  6. #define _LINUX_REGULATOR_PROXY_CONSUMER_H_
  7. #include <linux/device.h>
  8. #include <linux/of.h>
  9. #if IS_ENABLED(CONFIG_REGULATOR_PROXY_CONSUMER)
  10. int regulator_proxy_consumer_register(struct device *dev,
  11. struct device_node *node);
  12. void regulator_proxy_consumer_unregister(struct device *dev);
  13. int devm_regulator_proxy_consumer_register(struct device *dev,
  14. struct device_node *node);
  15. void devm_regulator_proxy_consumer_unregister(struct device *dev);
  16. void regulator_proxy_consumer_sync_state(struct device *dev);
  17. #else
  18. static inline int regulator_proxy_consumer_register(struct device *dev,
  19. struct device_node *node)
  20. { return 0; }
  21. static inline void regulator_proxy_consumer_unregister(struct device *dev)
  22. { }
  23. static inline int devm_regulator_proxy_consumer_register(struct device *dev,
  24. struct device_node *node)
  25. { return 0; }
  26. static inline void devm_regulator_proxy_consumer_unregister(struct device *dev)
  27. { }
  28. void regulator_proxy_consumer_sync_state(struct device *dev)
  29. { }
  30. #endif
  31. #endif