X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Fmedia%2Fv4l2-common.h;h=6eaeec98ed8908fc819193a7226002a4218e5ac4;hb=72728b3b17bb1ee52531ccfd891b3a906ce0ad22;hp=aecc946980a3a7da00ce0f7b90fbaf70248bf7a1;hpb=f2a49bc72bd2993356b3640cc105646ae56b10b8;p=linux-2.6-omap-h63xx.git diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index aecc946980a..6eaeec98ed8 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -64,9 +64,6 @@ /* Prints the ioctl in a human-readable format */ extern void v4l_printk_ioctl(unsigned int cmd); -/* Prints the ioctl and arg in a human-readable format */ -extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); - /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ #define v4l_print_ioctl(name, cmd) \ do { \ @@ -97,14 +94,15 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); /* ------------------------------------------------------------------------- */ -/* Internal ioctls */ +/* Register/chip ident helper function */ -/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ -struct v4l2_register { - u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */ - unsigned long reg; - u32 val; -}; +struct i2c_client; /* forward reference */ +int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id); +int v4l2_chip_match_host(u32 id_type, u32 chip_id); + +/* ------------------------------------------------------------------------- */ + +/* Internal ioctls */ /* VIDIOC_INT_DECODE_VBI_LINE */ struct v4l2_decode_vbi_line { @@ -144,6 +142,9 @@ enum v4l2_chip_ident { V4L2_IDENT_CX25841 = 241, V4L2_IDENT_CX25842 = 242, V4L2_IDENT_CX25843 = 243, + + /* OmniVision sensors - range 250-299 */ + V4L2_IDENT_OV7670 = 250, }; /* audio ioctls */ @@ -172,9 +173,7 @@ enum v4l2_chip_ident { Replacement of TUNER_SET_STANDBY. */ #define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) -/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ -#define VIDIOC_INT_S_REGISTER _IOW ('d', 100, struct v4l2_register) -#define VIDIOC_INT_G_REGISTER _IOWR('d', 101, struct v4l2_register) +/* 100, 101 used by VIDIOC_DBG_[SG]_REGISTER */ /* Generic reset command. The argument selects which subsystems to reset. Passing 0 will always reset the whole chip. */ @@ -251,4 +250,8 @@ struct v4l2_crystal_freq { If the frequency is not supported, then -EINVAL is returned. */ #define VIDIOC_INT_S_CRYSTAL_FREQ _IOW ('d', 113, struct v4l2_crystal_freq) +/* Initialize the sensor registors to some sort of reasonable + default values. */ +#define VIDIOC_INT_INIT _IOW ('d', 114, u32) + #endif /* V4L2_COMMON_H_ */