]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/sysfs.h
Merge remote-tracking branch 'chrome-platform/for-next'
[karo-tx-linux.git] / include / linux / sysfs.h
index ea090eaf468c6337b5ad29685b0d4919e44d2fab..c6f0f0d0e17e07609a8f6ae493bd71bdef093676 100644 (file)
@@ -64,10 +64,18 @@ do {                                                        \
  *             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.
+ *             non-binary 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.
+ * @is_bin_visible:
+ *             Optional: Function to return permissions associated with a
+ *             binary attribute of the group. Will be called repeatedly
+ *             for each binary attribute in the group. Only read/write
+ *             permissions as well as SYSFS_PREALLOC are accepted. Must
+ *             return 0 if a binary attribute is not visible. The returned
+ *             value will replace static permissions defined in
+ *             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.
@@ -76,6 +84,8 @@ struct attribute_group {
        const char              *name;
        umode_t                 (*is_visible)(struct kobject *,
                                              struct attribute *, int);
+       umode_t                 (*is_bin_visible)(struct kobject *,
+                                                 struct bin_attribute *, int);
        struct attribute        **attrs;
        struct bin_attribute    **bin_attrs;
 };