#include "u_uvc.h"
#include "uvc_configfs.h"
+/* -----------------------------------------------------------------------------
+ * Global Utility Structures and Macros
+ */
+
#define UVCG_STREAMING_CONTROL_SIZE 1
#define UVC_ATTR(prefix, cname, aname) \
func_inst.group);
}
-/* control/header/<NAME> */
+/* -----------------------------------------------------------------------------
+ * control/header/<NAME>
+ * control/header
+ */
+
DECLARE_UVC_HEADER_DESCRIPTOR(1);
struct uvcg_control_header {
kfree(h);
}
-/* control/header */
static struct config_group uvcg_control_header_grp;
static struct configfs_group_operations uvcg_control_header_grp_ops = {
.ct_owner = THIS_MODULE,
};
-/* control/processing/default */
+/* -----------------------------------------------------------------------------
+ * control/processing/default
+ */
+
static struct config_group uvcg_default_processing_grp;
#define UVCG_DEFAULT_PROCESSING_ATTR(cname, aname, conv) \
.ct_owner = THIS_MODULE,
};
-/* struct uvcg_processing {}; */
+/* -----------------------------------------------------------------------------
+ * control/processing
+ */
-/* control/processing */
static struct config_group uvcg_processing_grp;
static const struct config_item_type uvcg_processing_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* control/terminal/camera/default */
+/* -----------------------------------------------------------------------------
+ * control/terminal/camera/default
+ */
+
static struct config_group uvcg_default_camera_grp;
#define UVCG_DEFAULT_CAMERA_ATTR(cname, aname, conv) \
.ct_owner = THIS_MODULE,
};
-/* struct uvcg_camera {}; */
+/* -----------------------------------------------------------------------------
+ * control/terminal/camera
+ */
-/* control/terminal/camera */
static struct config_group uvcg_camera_grp;
static const struct config_item_type uvcg_camera_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* control/terminal/output/default */
+/* -----------------------------------------------------------------------------
+ * control/terminal/output/default
+ */
+
static struct config_group uvcg_default_output_grp;
#define UVCG_DEFAULT_OUTPUT_ATTR(cname, aname, conv) \
.ct_owner = THIS_MODULE,
};
-/* struct uvcg_output {}; */
+/* -----------------------------------------------------------------------------
+ * control/terminal/output
+ */
-/* control/terminal/output */
static struct config_group uvcg_output_grp;
static const struct config_item_type uvcg_output_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* control/terminal */
+/* -----------------------------------------------------------------------------
+ * control/terminal
+ */
+
static struct config_group uvcg_terminal_grp;
static const struct config_item_type uvcg_terminal_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* control/class/{fs} */
+/* -----------------------------------------------------------------------------
+ * control/class/{fs|ss}
+ */
+
static struct config_group uvcg_control_class_fs_grp;
static struct config_group uvcg_control_class_ss_grp;
.ct_owner = THIS_MODULE,
};
-/* control/class */
+/* -----------------------------------------------------------------------------
+ * control/class
+ */
+
static struct config_group uvcg_control_class_grp;
static const struct config_item_type uvcg_control_class_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* control */
+/* -----------------------------------------------------------------------------
+ * control
+ */
+
static struct config_group uvcg_control_grp;
static const struct config_item_type uvcg_control_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* streaming/uncompressed */
-static struct config_group uvcg_uncompressed_grp;
+/* -----------------------------------------------------------------------------
+ * streaming/uncompressed
+ * streaming/mjpeg
+ */
-/* streaming/mjpeg */
+static struct config_group uvcg_uncompressed_grp;
static struct config_group uvcg_mjpeg_grp;
static struct config_item *fmt_parent[] = {
struct list_head entry;
};
-/* streaming/header/<NAME> */
+/* -----------------------------------------------------------------------------
+ * streaming/header/<NAME>
+ * streaming/header
+ */
+
struct uvcg_streaming_header {
struct config_item item;
struct uvc_input_header_descriptor desc;
kfree(h);
}
-/* streaming/header */
static struct config_group uvcg_streaming_header_grp;
static struct configfs_group_operations uvcg_streaming_header_grp_ops = {
.ct_owner = THIS_MODULE,
};
-/* streaming/<mode>/<format>/<NAME> */
+/* -----------------------------------------------------------------------------
+ * streaming/<mode>/<format>/<NAME>
+ */
+
struct uvcg_frame {
struct {
u8 b_length;
mutex_unlock(&opts->lock);
}
-/* streaming/uncompressed/<NAME> */
+/* -----------------------------------------------------------------------------
+ * streaming/uncompressed/<NAME>
+ */
+
struct uvcg_uncompressed {
struct uvcg_format fmt;
struct uvc_format_uncompressed desc;
.ct_owner = THIS_MODULE,
};
-/* streaming/mjpeg/<NAME> */
+/* -----------------------------------------------------------------------------
+ * streaming/mjpeg/<NAME>
+ */
+
struct uvcg_mjpeg {
struct uvcg_format fmt;
struct uvc_format_mjpeg desc;
.ct_owner = THIS_MODULE,
};
-/* streaming/color_matching/default */
+/* -----------------------------------------------------------------------------
+ * streaming/color_matching/default
+ */
+
static struct config_group uvcg_default_color_matching_grp;
#define UVCG_DEFAULT_COLOR_MATCHING_ATTR(cname, aname, conv) \
.ct_owner = THIS_MODULE,
};
-/* struct uvcg_color_matching {}; */
+/* -----------------------------------------------------------------------------
+ * streaming/color_matching
+ */
-/* streaming/color_matching */
static struct config_group uvcg_color_matching_grp;
static const struct config_item_type uvcg_color_matching_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* streaming/class/{fs|hs|ss} */
+/* -----------------------------------------------------------------------------
+ * streaming/class/{fs|hs|ss}
+ */
+
static struct config_group uvcg_streaming_class_fs_grp;
static struct config_group uvcg_streaming_class_hs_grp;
static struct config_group uvcg_streaming_class_ss_grp;
.ct_owner = THIS_MODULE,
};
-/* streaming/class */
+/* -----------------------------------------------------------------------------
+ * streaming/class
+ */
+
static struct config_group uvcg_streaming_class_grp;
static const struct config_item_type uvcg_streaming_class_grp_type = {
.ct_owner = THIS_MODULE,
};
-/* streaming */
+/* -----------------------------------------------------------------------------
+ * streaming
+ */
+
static struct config_group uvcg_streaming_grp;
static const struct config_item_type uvcg_streaming_grp_type = {
.ct_owner = THIS_MODULE,
};
+/* -----------------------------------------------------------------------------
+ * UVC function
+ */
+
static void uvc_attr_release(struct config_item *item)
{
struct f_uvc_opts *opts = to_f_uvc_opts(item);