Merge tag 'cpumask-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / include / linux / sysfs.h
index ddad16148bd69cd2b6d7c4a682864b6d29f7a1dc..99382c0df17eb3fc367e3b3eafd5dca3cb63975a 100644 (file)
@@ -57,6 +57,21 @@ do {                                                 \
 #define sysfs_attr_init(attr) do {} while (0)
 #endif
 
+/**
+ * struct attribute_group - data structure used to declare an attribute group.
+ * @name:      Optional: Attribute group name
+ *             If specified, the attribute group will be created in
+ *             a new subdirectory with this name.
+ * @is_visible:        Optional: Function to return permissions associated with an
+ *             attribute of the group. Will be called repeatedly for each
+ *             attribute in the group. Only read/write permissions as well as
+ *             SYSFS_PREALLOC are accepted. Must return 0 if an attribute is
+ *             not visible. The returned value will replace static permissions
+ *             defined in struct attribute or struct bin_attribute.
+ * @attrs:     Pointer to NULL terminated list of attributes.
+ * @bin_attrs: Pointer to NULL terminated list of binary attributes.
+ *             Either attrs or bin_attrs or both must be provided.
+ */
 struct attribute_group {
        const char              *name;
        umode_t                 (*is_visible)(struct kobject *,