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