Lines Matching full:class
3 * The class-specific portions of the driver model
26 * struct class - device classes
27 * @name: Name of the class.
29 * @class_groups: Default attributes of this class.
30 * @dev_groups: Default attributes of the devices that belong to the class.
31 * @dev_kobj: The kobject that represents this class and links it into the hierarchy.
32 * @dev_uevent: Called when a device is added, removed from this class, or a
36 * @class_release: Called to release this class.
40 * @namespace: Namespace of the device belongs to this class.
41 * @get_ownership: Allows class to specify uid/gid of the sysfs directories
42 * for the devices belonging to the class. Usually tied to
44 * @pm: The default device power management operations of this class.
48 * A class is a higher-level view of a device that abstracts out low-level
50 * at the class level, they are all simply disks. Classes allow user space
54 struct class { struct
65 void (*class_release)(struct class *class); argument
87 extern int __must_check __class_register(struct class *class, argument
89 extern void class_unregister(struct class *class);
93 #define class_register(class) \ argument
96 __class_register(class, &__key); \
108 struct class *class,
114 extern int class_for_each_device(struct class *class, struct device *start,
117 extern struct device *class_find_device(struct class *class,
124 * @class: class type
127 static inline struct device *class_find_device_by_name(struct class *class, in class_find_device_by_name() argument
130 return class_find_device(class, NULL, name, device_match_name); in class_find_device_by_name()
136 * @class: class type
140 class_find_device_by_of_node(struct class *class, const struct device_node *np) in class_find_device_by_of_node() argument
142 return class_find_device(class, NULL, np, device_match_of_node); in class_find_device_by_of_node()
148 * @class: class type
152 class_find_device_by_fwnode(struct class *class, in class_find_device_by_fwnode() argument
155 return class_find_device(class, NULL, fwnode, device_match_fwnode); in class_find_device_by_fwnode()
161 * @class: class type
164 static inline struct device *class_find_device_by_devt(struct class *class, in class_find_device_by_devt() argument
167 return class_find_device(class, NULL, &devt, device_match_devt); in class_find_device_by_devt()
175 * @class: class type
179 class_find_device_by_acpi_dev(struct class *class, const struct acpi_device *adev) in class_find_device_by_acpi_dev() argument
181 return class_find_device(class, NULL, adev, device_match_acpi_dev); in class_find_device_by_acpi_dev()
185 class_find_device_by_acpi_dev(struct class *class, const void *adev) in class_find_device_by_acpi_dev() argument
193 ssize_t (*show)(struct class *class, struct class_attribute *attr,
195 ssize_t (*store)(struct class *class, struct class_attribute *attr,
206 extern int __must_check class_create_file_ns(struct class *class,
209 extern void class_remove_file_ns(struct class *class,
213 static inline int __must_check class_create_file(struct class *class, in class_create_file() argument
216 return class_create_file_ns(class, attr, NULL); in class_create_file()
219 static inline void class_remove_file(struct class *class, in class_remove_file() argument
222 return class_remove_file_ns(class, attr, NULL); in class_remove_file()
225 /* Simple class attribute that is just a static string */
238 extern ssize_t show_class_attr_string(struct class *class, struct class_attribute *attr,
243 struct class *class; member
252 extern struct class * __must_check __class_create(struct module *owner,
255 extern void class_destroy(struct class *cls);
261 * class_create - create a struct class structure
262 * @owner: pointer to the module that is to "own" this struct class
263 * @name: pointer to a string for the name of this class.
265 * This is used to create a struct class pointer that can then be used
268 * Returns &struct class pointer on success, or ERR_PTR() on error.