Lines Matching full:class
3 * The class-specific portions of the driver model
26 * struct class - device classes
27 * @name: Name of the class.
28 * @class_groups: Default attributes of this class.
29 * @dev_groups: Default attributes of the devices that belong to the class.
30 * @dev_uevent: Called when a device is added, removed from this class, or a
34 * @class_release: Called to release this class.
38 * @namespace: Namespace of the device belongs to this class.
39 * @get_ownership: Allows class to specify uid/gid of the sysfs directories
40 * for the devices belonging to the class. Usually tied to
42 * @pm: The default device power management operations of this class.
44 * A class is a higher-level view of a device that abstracts out low-level
46 * at the class level, they are all simply disks. Classes allow user space
50 struct class { struct
59 void (*class_release)(const struct class *class); argument
78 int __must_check class_register(const struct class *class); argument
79 void class_unregister(const struct class *class);
80 bool class_is_registered(const struct class *class);
90 void class_dev_iter_init(struct class_dev_iter *iter, const struct class *class,
95 int class_for_each_device(const struct class *class, const struct device *start, void *data,
97 struct device *class_find_device(const struct class *class, const struct device *start,
103 * @class: class type
106 static inline struct device *class_find_device_by_name(const struct class *class, in class_find_device_by_name() argument
109 return class_find_device(class, NULL, name, device_match_name); in class_find_device_by_name()
115 * @class: class type
118 static inline struct device *class_find_device_by_of_node(const struct class *class, in class_find_device_by_of_node() argument
121 return class_find_device(class, NULL, np, device_match_of_node); in class_find_device_by_of_node()
127 * @class: class type
130 static inline struct device *class_find_device_by_fwnode(const struct class *class, in class_find_device_by_fwnode() argument
133 return class_find_device(class, NULL, fwnode, device_match_fwnode); in class_find_device_by_fwnode()
139 * @class: class type
142 static inline struct device *class_find_device_by_devt(const struct class *class, in class_find_device_by_devt() argument
145 return class_find_device(class, NULL, &devt, device_match_devt); in class_find_device_by_devt()
153 * @class: class type
156 static inline struct device *class_find_device_by_acpi_dev(const struct class *class, in class_find_device_by_acpi_dev() argument
159 return class_find_device(class, NULL, adev, device_match_acpi_dev); in class_find_device_by_acpi_dev()
162 static inline struct device *class_find_device_by_acpi_dev(const struct class *class, in class_find_device_by_acpi_dev() argument
171 ssize_t (*show)(const struct class *class, const struct class_attribute *attr,
173 ssize_t (*store)(const struct class *class, const struct class_attribute *attr,
184 int __must_check class_create_file_ns(const struct class *class, const struct class_attribute *attr,
186 void class_remove_file_ns(const struct class *class, const struct class_attribute *attr,
189 static inline int __must_check class_create_file(const struct class *class, in class_create_file() argument
192 return class_create_file_ns(class, attr, NULL); in class_create_file()
195 static inline void class_remove_file(const struct class *class, in class_remove_file() argument
198 return class_remove_file_ns(class, attr, NULL); in class_remove_file()
201 /* Simple class attribute that is just a static string */
214 ssize_t show_class_attr_string(const struct class *class, const struct class_attribute *attr,
219 const struct class *class; member
228 struct class * __must_check class_create(const char *name);
229 void class_destroy(const struct class *cls);