Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
sn9c102.h File Reference
#include <linux/usb.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/types.h>
#include <linux/param.h>
#include <linux/rwsem.h>
#include <linux/mutex.h>
#include <linux/string.h>
#include <linux/stddef.h>
#include <linux/kref.h>
#include "sn9c102_config.h"
#include "sn9c102_sensor.h"
#include "sn9c102_devtable.h"

Go to the source code of this file.

Data Structures

struct  sn9c102_frame_t
 
struct  sn9c102_sof_t
 
struct  sn9c102_sysfs_attr
 
struct  sn9c102_module_param
 
struct  sn9c102_device
 

Macros

#define DBG(level, fmt, args...)
 
#define V4LDBG(level, name, cmd)
 
#define KDBG(level, fmt, args...)
 
#define PDBG(fmt, args...)
 
#define PDBGG(fmt, args...)   do {;} while(0) /* placeholder */
 

Typedefs

typedef char sn9c102_sof_header_t [62]
 

Enumerations

enum  sn9c102_frame_state {
  F_UNUSED, F_QUEUED, F_GRABBING, F_DONE,
  F_ERROR
}
 
enum  sn9c102_dev_state { DEV_INITIALIZED = 0x01, DEV_DISCONNECTED = 0x02, DEV_MISCONFIGURED = 0x04 }
 
enum  sn9c102_io_method { IO_NONE, IO_READ, IO_MMAP }
 
enum  sn9c102_stream_state { STREAM_OFF, STREAM_INTERRUPT, STREAM_ON }
 

Functions

struct sn9c102_devicesn9c102_match_id (struct sn9c102_device *cam, const struct usb_device_id *id)
 
void sn9c102_attach_sensor (struct sn9c102_device *cam, const struct sn9c102_sensor *sensor)
 
enum sn9c102_bridge sn9c102_get_bridge (struct sn9c102_device *cam)
 
struct sn9c102_sensorsn9c102_get_sensor (struct sn9c102_device *cam)
 

Macro Definition Documentation

#define DBG (   level,
  fmt,
  args... 
)
Value:
do { \
if (debug >= (level)) { \
if ((level) == 1) \
dev_err(&cam->usbdev->dev, fmt "\n", ## args); \
else if ((level) == 2) \
dev_info(&cam->usbdev->dev, fmt "\n", ## args); \
else if ((level) >= 3) \
dev_info(&cam->usbdev->dev, "[%s:%d] " fmt "\n", \
__func__, __LINE__ , ## args); \
} \
} while (0)

Definition at line 170 of file sn9c102.h.

#define KDBG (   level,
  fmt,
  args... 
)
Value:
do { \
if (debug >= (level)) { \
if ((level) == 1 || (level) == 2) \
pr_info("sn9c102: " fmt "\n", ## args); \
else if ((level) == 3) \
pr_debug("sn9c102: [%s:%d] " fmt "\n", \
__func__, __LINE__ , ## args); \
} \
} while (0)

Definition at line 187 of file sn9c102.h.

#define PDBG (   fmt,
  args... 
)
Value:
dev_info(&cam->usbdev->dev, "[%s:%s:%d] " fmt "\n", __FILE__, __func__, \
__LINE__ , ## args)

Definition at line 204 of file sn9c102.h.

#define PDBGG (   fmt,
  args... 
)    do {;} while(0) /* placeholder */

Definition at line 209 of file sn9c102.h.

#define V4LDBG (   level,
  name,
  cmd 
)
Value:
do { \
if (debug >= (level)) \
v4l_printk_ioctl(name, cmd); \
} while (0)

Definition at line 182 of file sn9c102.h.

Typedef Documentation

typedef char sn9c102_sof_header_t[62]

Definition at line 80 of file sn9c102.h.

Enumeration Type Documentation

Enumerator:
DEV_INITIALIZED 
DEV_DISCONNECTED 
DEV_MISCONFIGURED 

Definition at line 62 of file sn9c102.h.

Enumerator:
F_UNUSED 
F_QUEUED 
F_GRABBING 
F_DONE 
F_ERROR 

Definition at line 46 of file sn9c102.h.

Enumerator:
IO_NONE 
IO_READ 
IO_MMAP 

Definition at line 68 of file sn9c102.h.

Enumerator:
STREAM_OFF 
STREAM_INTERRUPT 
STREAM_ON 

Definition at line 74 of file sn9c102.h.

Function Documentation

void sn9c102_attach_sensor ( struct sn9c102_device cam,
const struct sn9c102_sensor sensor 
)

Definition at line 146 of file sn9c102.h.

enum sn9c102_bridge sn9c102_get_bridge ( struct sn9c102_device cam)

Definition at line 154 of file sn9c102.h.

struct sn9c102_sensor* sn9c102_get_sensor ( struct sn9c102_device cam)
read

Definition at line 160 of file sn9c102.h.

struct sn9c102_device* sn9c102_match_id ( struct sn9c102_device cam,
const struct usb_device_id id 
)
read

Definition at line 139 of file sn9c102.h.