consumer.h 881 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * mux/consumer.h - definitions for the multiplexer consumer interface
  4. *
  5. * Copyright (C) 2017 Axentia Technologies AB
  6. *
  7. * Author: Peter Rosin <peda@axentia.se>
  8. */
  9. #ifndef _LINUX_MUX_CONSUMER_H
  10. #define _LINUX_MUX_CONSUMER_H
  11. #include <linux/compiler.h>
  12. struct device;
  13. struct mux_control;
  14. unsigned int mux_control_states(struct mux_control *mux);
  15. int __must_check mux_control_select(struct mux_control *mux,
  16. unsigned int state);
  17. int __must_check mux_control_try_select(struct mux_control *mux,
  18. unsigned int state);
  19. int mux_control_deselect(struct mux_control *mux);
  20. struct mux_control *mux_control_get(struct device *dev, const char *mux_name);
  21. void mux_control_put(struct mux_control *mux);
  22. struct mux_control *devm_mux_control_get(struct device *dev,
  23. const char *mux_name);
  24. #endif /* _LINUX_MUX_CONSUMER_H */