1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2023 Intel Corporation
6 #ifndef _XE_ENGINE_CLASS_SYSFS_H_
7 #define _XE_ENGINE_CLASS_SYSFS_H_
9 #include <linux/kobject.h>
12 struct xe_hw_engine_class_intf;
14 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
15 bool xe_hw_engine_timeout_in_range(u64 timeout, u64 min, u64 max);
18 * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
21 * When dealing with multiple eclass, this struct helps to understand which eclass
22 * needs to be addressed on a given sysfs call.
25 /** @base: The actual kobject */
27 /** @eclass: A pointer to the hw engine class interface */
28 struct xe_hw_engine_class_intf *eclass;
31 static inline struct xe_hw_engine_class_intf *kobj_to_eclass(struct kobject *kobj)
33 return container_of(kobj, struct kobj_eclass, base)->eclass;