debug-regulator.h 996 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _LINUX_REGULATOR_DEBUG_CONTROL_H_
  6. #define _LINUX_REGULATOR_DEBUG_CONTROL_H_
  7. struct device;
  8. struct regulator_dev;
  9. #if IS_ENABLED(CONFIG_REGULATOR_DEBUG_CONTROL)
  10. int regulator_debug_register(struct device *dev, struct regulator_dev *rdev);
  11. void regulator_debug_unregister(struct regulator_dev *rdev);
  12. int devm_regulator_debug_register(struct device *dev,
  13. struct regulator_dev *rdev);
  14. void devm_regulator_debug_unregister(struct regulator_dev *rdev);
  15. #else
  16. static inline int regulator_debug_register(struct device *dev,
  17. struct regulator_dev *rdev)
  18. { return 0; }
  19. static inline void regulator_debug_unregister(struct regulator_dev *rdev)
  20. { }
  21. static inline int devm_regulator_debug_register(struct device *dev,
  22. struct regulator_dev *rdev)
  23. { return 0; }
  24. static inline void devm_regulator_debug_unregister(struct regulator_dev *rdev)
  25. { }
  26. #endif
  27. #endif