2019-06-04 10:11:33 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2016-11-17 02:16:13 +05:30
|
|
|
/*
|
2021-03-30 09:54:21 -06:00
|
|
|
* Mediated device internal definitions
|
2016-11-17 02:16:13 +05:30
|
|
|
*
|
|
|
|
|
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
|
* Author: Neo Jia <cjia@nvidia.com>
|
|
|
|
|
* Kirti Wankhede <kwankhede@nvidia.com>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef MDEV_PRIVATE_H
|
|
|
|
|
#define MDEV_PRIVATE_H
|
|
|
|
|
|
2024-02-08 17:02:04 -03:00
|
|
|
extern const struct bus_type mdev_bus_type;
|
2022-04-11 16:14:02 +02:00
|
|
|
extern const struct attribute_group *mdev_device_groups[];
|
|
|
|
|
|
2016-11-17 02:16:13 +05:30
|
|
|
#define to_mdev_type_attr(_attr) \
|
|
|
|
|
container_of(_attr, struct mdev_type_attribute, attr)
|
|
|
|
|
#define to_mdev_type(_kobj) \
|
|
|
|
|
container_of(_kobj, struct mdev_type, kobj)
|
|
|
|
|
|
2016-12-30 08:13:38 -07:00
|
|
|
int parent_create_sysfs_files(struct mdev_parent *parent);
|
|
|
|
|
void parent_remove_sysfs_files(struct mdev_parent *parent);
|
2016-11-17 02:16:13 +05:30
|
|
|
|
2021-04-06 16:40:28 -03:00
|
|
|
int mdev_create_sysfs_files(struct mdev_device *mdev);
|
|
|
|
|
void mdev_remove_sysfs_files(struct mdev_device *mdev);
|
2016-11-17 02:16:13 +05:30
|
|
|
|
2021-04-06 16:40:28 -03:00
|
|
|
int mdev_device_create(struct mdev_type *kobj, const guid_t *uuid);
|
2021-04-06 16:40:26 -03:00
|
|
|
int mdev_device_remove(struct mdev_device *dev);
|
2016-11-17 02:16:13 +05:30
|
|
|
|
|
|
|
|
#endif /* MDEV_PRIVATE_H */
|