mdev_private.h 1009 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Mediated device internal definitions
  4. *
  5. * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
  6. * Author: Neo Jia <[email protected]>
  7. * Kirti Wankhede <[email protected]>
  8. */
  9. #ifndef MDEV_PRIVATE_H
  10. #define MDEV_PRIVATE_H
  11. int mdev_bus_register(void);
  12. void mdev_bus_unregister(void);
  13. extern struct bus_type mdev_bus_type;
  14. extern const struct attribute_group *mdev_device_groups[];
  15. #define to_mdev_type_attr(_attr) \
  16. container_of(_attr, struct mdev_type_attribute, attr)
  17. #define to_mdev_type(_kobj) \
  18. container_of(_kobj, struct mdev_type, kobj)
  19. int parent_create_sysfs_files(struct mdev_parent *parent);
  20. void parent_remove_sysfs_files(struct mdev_parent *parent);
  21. int mdev_create_sysfs_files(struct mdev_device *mdev);
  22. void mdev_remove_sysfs_files(struct mdev_device *mdev);
  23. int mdev_device_create(struct mdev_type *kobj, const guid_t *uuid);
  24. int mdev_device_remove(struct mdev_device *dev);
  25. #endif /* MDEV_PRIVATE_H */