#include <linux/errno.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/slab.h>
#ifdef CONFIG_USB_PWC_INPUT_EVDEV
#include <linux/usb/input.h>
#endif
#include <linux/vmalloc.h>
#include <asm/io.h>
#include <linux/kernel.h>
#include "pwc.h"
#include "pwc-kiara.h"
#include "pwc-timon.h"
#include "pwc-dec23.h"
#include "pwc-dec1.h"
#define CREATE_TRACE_POINTS
#include <trace/events/pwc.h>
static const struct usb_device_id pwc_device_table [] = …;
MODULE_DEVICE_TABLE(usb, pwc_device_table);
static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id *id);
static void usb_pwc_disconnect(struct usb_interface *intf);
static void pwc_isoc_cleanup(struct pwc_device *pdev);
static struct usb_driver pwc_driver = …;
#define MAX_DEV_HINTS …
#define MAX_ISOC_ERRORS …
#ifdef CONFIG_USB_PWC_DEBUG
int pwc_trace = …;
#endif
static int power_save = …;
static int leds[2] = …;
static const struct v4l2_file_operations pwc_fops = …;
static const struct video_device pwc_template = …;
static void *pwc_alloc_urb_buffer(struct usb_device *dev,
size_t size, dma_addr_t *dma_handle)
{ … }
static void pwc_free_urb_buffer(struct usb_device *dev,
size_t size,
void *buffer,
dma_addr_t dma_handle)
{ … }
static struct pwc_frame_buf *pwc_get_next_fill_buf(struct pwc_device *pdev)
{ … }
static void pwc_snapshot_button(struct pwc_device *pdev, int down)
{ … }
static void pwc_frame_complete(struct pwc_device *pdev)
{ … }
static void pwc_isoc_handler(struct urb *urb)
{ … }
static int pwc_isoc_init(struct pwc_device *pdev)
{ … }
static void pwc_iso_stop(struct pwc_device *pdev)
{ … }
static void pwc_iso_free(struct pwc_device *pdev)
{ … }
static void pwc_isoc_cleanup(struct pwc_device *pdev)
{ … }
static void pwc_cleanup_queued_bufs(struct pwc_device *pdev,
enum vb2_buffer_state state)
{ … }
#ifdef CONFIG_USB_PWC_DEBUG
static const char *pwc_sensor_type_to_string(unsigned int sensor_type)
{ … }
#endif
static void pwc_video_release(struct v4l2_device *v)
{ … }
static int queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers, unsigned int *nplanes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int buffer_init(struct vb2_buffer *vb)
{ … }
static int buffer_prepare(struct vb2_buffer *vb)
{ … }
static void buffer_finish(struct vb2_buffer *vb)
{ … }
static void buffer_cleanup(struct vb2_buffer *vb)
{ … }
static void buffer_queue(struct vb2_buffer *vb)
{ … }
static int start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void stop_streaming(struct vb2_queue *vq)
{ … }
static const struct vb2_ops pwc_vb_queue_ops = …;
static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id *id)
{ … }
static void usb_pwc_disconnect(struct usb_interface *intf)
{ … }
static unsigned int leds_nargs;
#ifdef CONFIG_USB_PWC_DEBUG
module_param_named(trace, pwc_trace, int, 0644);
#endif
module_param(power_save, int, 0644);
module_param_array(…);
#ifdef CONFIG_USB_PWC_DEBUG
MODULE_PARM_DESC(…) …;
#endif
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;
MODULE_VERSION(…);
module_usb_driver(…) …;