#include <linux/atomic.h>
#include <linux/bits.h>
#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/quirks.h>
#include <linux/usb/uvc.h>
#include <linux/videodev2.h>
#include <linux/vmalloc.h>
#include <linux/wait.h>
#include <asm/unaligned.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include "uvcvideo.h"
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
unsigned int uvc_clock_param = …;
unsigned int uvc_hw_timestamps_param;
unsigned int uvc_no_drop_param;
static unsigned int uvc_quirks_param = …;
unsigned int uvc_dbg_param;
unsigned int uvc_timeout_param = …;
struct usb_host_endpoint *uvc_find_endpoint(struct usb_host_interface *alts,
u8 epaddr)
{ … }
static enum v4l2_colorspace uvc_colorspace(const u8 primaries)
{ … }
static enum v4l2_xfer_func uvc_xfer_func(const u8 transfer_characteristics)
{ … }
static enum v4l2_ycbcr_encoding uvc_ycbcr_enc(const u8 matrix_coefficients)
{ … }
struct uvc_entity *uvc_entity_by_id(struct uvc_device *dev, int id)
{ … }
static struct uvc_entity *uvc_entity_by_reference(struct uvc_device *dev,
int id, struct uvc_entity *entity)
{ … }
static struct uvc_streaming *uvc_stream_by_id(struct uvc_device *dev, int id)
{ … }
static void uvc_stream_delete(struct uvc_streaming *stream)
{ … }
static struct uvc_streaming *uvc_stream_new(struct uvc_device *dev,
struct usb_interface *intf)
{ … }
static int uvc_parse_format(struct uvc_device *dev,
struct uvc_streaming *streaming, struct uvc_format *format,
struct uvc_frame *frames, u32 **intervals, const unsigned char *buffer,
int buflen)
{ … }
static int uvc_parse_streaming(struct uvc_device *dev,
struct usb_interface *intf)
{ … }
static const u8 uvc_camera_guid[16] = …;
static const u8 uvc_gpio_guid[16] = …;
static const u8 uvc_media_transport_input_guid[16] = …;
static const u8 uvc_processing_guid[16] = …;
static struct uvc_entity *uvc_alloc_entity(u16 type, u16 id,
unsigned int num_pads, unsigned int extra_size)
{ … }
static void uvc_entity_set_name(struct uvc_device *dev, struct uvc_entity *entity,
const char *type_name, u8 string_id)
{ … }
static int uvc_parse_vendor_control(struct uvc_device *dev,
const unsigned char *buffer, int buflen)
{ … }
static int uvc_parse_standard_control(struct uvc_device *dev,
const unsigned char *buffer, int buflen)
{ … }
static int uvc_parse_control(struct uvc_device *dev)
{ … }
static void uvc_gpio_event(struct uvc_device *dev)
{ … }
static int uvc_gpio_get_cur(struct uvc_device *dev, struct uvc_entity *entity,
u8 cs, void *data, u16 size)
{ … }
static int uvc_gpio_get_info(struct uvc_device *dev, struct uvc_entity *entity,
u8 cs, u8 *caps)
{ … }
static irqreturn_t uvc_gpio_irq(int irq, void *data)
{ … }
static int uvc_gpio_parse(struct uvc_device *dev)
{ … }
static int uvc_gpio_init_irq(struct uvc_device *dev)
{ … }
static int uvc_scan_chain_entity(struct uvc_video_chain *chain,
struct uvc_entity *entity)
{ … }
static int uvc_scan_chain_forward(struct uvc_video_chain *chain,
struct uvc_entity *entity, struct uvc_entity *prev)
{ … }
static int uvc_scan_chain_backward(struct uvc_video_chain *chain,
struct uvc_entity **_entity)
{ … }
static int uvc_scan_chain(struct uvc_video_chain *chain,
struct uvc_entity *term)
{ … }
static unsigned int uvc_print_terms(struct list_head *terms, u16 dir,
char *buffer)
{ … }
static const char *uvc_print_chain(struct uvc_video_chain *chain)
{ … }
static struct uvc_video_chain *uvc_alloc_chain(struct uvc_device *dev)
{ … }
static int uvc_scan_fallback(struct uvc_device *dev)
{ … }
static int uvc_scan_device(struct uvc_device *dev)
{ … }
static void uvc_delete(struct kref *kref)
{ … }
static void uvc_release(struct video_device *vdev)
{ … }
static void uvc_unregister_video(struct uvc_device *dev)
{ … }
int uvc_register_video_device(struct uvc_device *dev,
struct uvc_streaming *stream,
struct video_device *vdev,
struct uvc_video_queue *queue,
enum v4l2_buf_type type,
const struct v4l2_file_operations *fops,
const struct v4l2_ioctl_ops *ioctl_ops)
{ … }
static int uvc_register_video(struct uvc_device *dev,
struct uvc_streaming *stream)
{ … }
static int uvc_register_terms(struct uvc_device *dev,
struct uvc_video_chain *chain)
{ … }
static int uvc_register_chains(struct uvc_device *dev)
{ … }
static const struct uvc_device_info uvc_quirk_none = …;
static int uvc_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void uvc_disconnect(struct usb_interface *intf)
{ … }
static int uvc_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int __uvc_resume(struct usb_interface *intf, int reset)
{ … }
static int uvc_resume(struct usb_interface *intf)
{ … }
static int uvc_reset_resume(struct usb_interface *intf)
{ … }
static int uvc_clock_param_get(char *buffer, const struct kernel_param *kp)
{ … }
static int uvc_clock_param_set(const char *val, const struct kernel_param *kp)
{ … }
module_param_call(…);
MODULE_PARM_DESC(…) …;
module_param_named(hwtimestamps, uvc_hw_timestamps_param, uint, 0644);
MODULE_PARM_DESC(…) …;
module_param_named(nodrop, uvc_no_drop_param, uint, 0644);
MODULE_PARM_DESC(…) …;
module_param_named(quirks, uvc_quirks_param, uint, 0644);
MODULE_PARM_DESC(…) …;
module_param_named(trace, uvc_dbg_param, uint, 0644);
MODULE_PARM_DESC(…) …;
module_param_named(timeout, uvc_timeout_param, uint, 0644);
MODULE_PARM_DESC(…) …;
static const struct uvc_device_info uvc_quirk_probe_minmax = …;
static const struct uvc_device_info uvc_quirk_fix_bandwidth = …;
static const struct uvc_device_info uvc_quirk_probe_def = …;
static const struct uvc_device_info uvc_quirk_stream_no_fid = …;
static const struct uvc_device_info uvc_quirk_force_y8 = …;
#define UVC_INFO_QUIRK(q) …
#define UVC_INFO_META(m) …
static const struct usb_device_id uvc_ids[] = …;
MODULE_DEVICE_TABLE(usb, uvc_ids);
struct uvc_driver uvc_driver = …;
static int __init uvc_init(void)
{ … }
static void __exit uvc_cleanup(void)
{ … }
module_init(…) …;
module_exit(uvc_cleanup);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
MODULE_VERSION(…);