component.h 916 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef COMPONENT_H
  2. #define COMPONENT_H
  3. struct device;
  4. struct component_ops {
  5. int (*bind)(struct device *, struct device *, void *);
  6. void (*unbind)(struct device *, struct device *, void *);
  7. };
  8. int component_add(struct device *, const struct component_ops *);
  9. void component_del(struct device *, const struct component_ops *);
  10. int component_bind_all(struct device *, void *);
  11. void component_unbind_all(struct device *, void *);
  12. struct master;
  13. struct component_master_ops {
  14. int (*bind)(struct device *);
  15. void (*unbind)(struct device *);
  16. };
  17. void component_master_del(struct device *,
  18. const struct component_master_ops *);
  19. struct component_match;
  20. int component_master_add_with_match(struct device *,
  21. const struct component_master_ops *, struct component_match *);
  22. void component_match_add(struct device *, struct component_match **,
  23. int (*compare)(struct device *, void *), void *compare_data);
  24. #endif