diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 21:21:51 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 21:21:51 +0400 |
commit | ab11ca34eea8fda7a1a9302d86f6ef6108ffd68f (patch) | |
tree | 987ec6c263f3dfa4a7a6f9ce4d5ece47cbc12e29 /drivers/media/video/cpia2/cpia2.h | |
parent | f9369910a6225b8d4892c3f20ae740a711cd5ace (diff) | |
parent | 71006fb22b0f5a2045605b3887ee99a0e9adafe4 (diff) | |
download | linux-ab11ca34eea8fda7a1a9302d86f6ef6108ffd68f.tar.xz |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- some V4L2 API updates needed by embedded devices
- DVB API extensions for ATSC-MH delivery system, used in US for mobile
TV
- new tuners for fc0011/0012/0013 and tua9001
- a new dvb driver for af9033/9035
- a new ATSC-MH frontend (lg2160)
- new remote controller keymaps
- Removal of a few legacy webcam driver that got replaced by gspca on
several kernel versions ago
- a new driver for Exynos 4/5 webcams(s5pp fimc-lite)
- a new webcam sensor driver (smiapp)
- a new video input driver for embedded (sta2x1xx)
- several improvements, fixes, cleanups, etc inside the drivers.
Manually fix up conflicts due to err() -> dev_err() conversion in
drivers/staging/media/easycap/easycap_main.c
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (484 commits)
[media] saa7134-cards: Remove a PCI entry added by mistake
[media] radio-sf16fmi: add support for SF16-FMD
[media] rc-loopback: remove duplicate line
[media] patch for Asus My Cinema PS3-100 (1043:48cd)
[media] au0828: Move the Kconfig knob under V4L_USB_DRIVERS
[media] em28xx: simple comment fix
[media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2
[media] smiapp: Use v4l2_ctrl_new_int_menu() instead of v4l2_ctrl_new_custom()
[media] smiapp: Add support for 8-bit uncompressed formats
[media] smiapp: Allow generic quirk registers
[media] smiapp: Use non-binning limits if the binning limit is zero
[media] smiapp: Initialise rval in smiapp_read_nvm()
[media] smiapp: Round minimum pre_pll up rather than down in ip_clk_freq check
[media] smiapp: Use 8-bit reads only before identifying the sensor
[media] smiapp: Quirk for sensors that only do 8-bit reads
[media] smiapp: Pass struct sensor to register writing commands instead of i2c_client
[media] smiapp: Allow using external clock from the clock framework
[media] zl10353: change .read_snr() to report SNR as a 0.1 dB
[media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300)
[media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
...
Diffstat (limited to 'drivers/media/video/cpia2/cpia2.h')
-rw-r--r-- | drivers/media/video/cpia2/cpia2.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/drivers/media/video/cpia2/cpia2.h b/drivers/media/video/cpia2/cpia2.h index ab252188981b..cdef677d57ec 100644 --- a/drivers/media/video/cpia2/cpia2.h +++ b/drivers/media/video/cpia2/cpia2.h @@ -32,11 +32,12 @@ #define __CPIA2_H__ #include <linux/videodev2.h> -#include <media/v4l2-common.h> #include <linux/usb.h> #include <linux/poll.h> +#include <media/v4l2-common.h> +#include <media/v4l2-device.h> +#include <media/v4l2-ctrls.h> -#include "cpia2dev.h" #include "cpia2_registers.h" /* define for verbose debug output */ @@ -65,7 +66,6 @@ /* Flicker Modes */ #define NEVER_FLICKER 0 -#define ANTI_FLICKER_ON 1 #define FLICKER_60 60 #define FLICKER_50 50 @@ -148,7 +148,6 @@ enum { #define DEFAULT_BRIGHTNESS 0x46 #define DEFAULT_CONTRAST 0x93 #define DEFAULT_SATURATION 0x7f -#define DEFAULT_TARGET_KB 0x30 /* Power state */ #define HI_POWER_MODE CPIA2_SYSTEM_CONTROL_HIGH_POWER @@ -287,7 +286,6 @@ struct camera_params { struct { u8 cam_register; u8 flicker_mode_req; /* 1 if flicker on, else never flicker */ - int mains_frequency; } flicker_control; struct { @@ -337,7 +335,7 @@ struct camera_params { u8 vc_control; u8 vc_mp_direction; u8 vc_mp_data; - u8 target_kb; + u8 quality; } vc_params; struct { @@ -366,23 +364,23 @@ struct framebuf { struct framebuf *next; }; -struct cpia2_fh { - enum v4l2_priority prio; - u8 mmapped; -}; - struct camera_data { /* locks */ + struct v4l2_device v4l2_dev; struct mutex v4l2_lock; /* serialize file operations */ - struct v4l2_prio_state prio; + struct v4l2_ctrl_handler hdl; + struct { + /* Lights control cluster */ + struct v4l2_ctrl *top_light; + struct v4l2_ctrl *bottom_light; + }; + struct v4l2_ctrl *usb_alt; /* camera status */ - volatile int present; /* Is the camera still present? */ - int open_count; /* # of process that have camera open */ int first_image_seen; - u8 mains_freq; /* for flicker control */ enum sensors sensor_type; u8 flush; + struct v4l2_fh *stream_fh; u8 mmapped; int streaming; /* 0 = no, 1 = yes */ int xfer_mode; /* XFER_BULK or XFER_ISOC */ @@ -390,7 +388,7 @@ struct camera_data { /* v4l */ int video_size; /* VIDEO_SIZE_ */ - struct video_device *vdev; /* v4l videodev */ + struct video_device vdev; /* v4l videodev */ u32 width; u32 height; /* Its size */ __u32 pixelformat; /* Format fourcc */ @@ -425,6 +423,7 @@ struct camera_data { /* v4l */ int cpia2_register_camera(struct camera_data *cam); void cpia2_unregister_camera(struct camera_data *cam); +void cpia2_camera_release(struct v4l2_device *v4l2_dev); /* core */ int cpia2_reset_camera(struct camera_data *cam); @@ -443,7 +442,7 @@ int cpia2_send_command(struct camera_data *cam, struct cpia2_command *cmd); int cpia2_do_command(struct camera_data *cam, unsigned int command, unsigned char direction, unsigned char param); -struct camera_data *cpia2_init_camera_struct(void); +struct camera_data *cpia2_init_camera_struct(struct usb_interface *intf); int cpia2_init_camera(struct camera_data *cam); int cpia2_allocate_buffers(struct camera_data *cam); void cpia2_free_buffers(struct camera_data *cam); @@ -454,7 +453,6 @@ unsigned int cpia2_poll(struct camera_data *cam, int cpia2_remap_buffer(struct camera_data *cam, struct vm_area_struct *vma); void cpia2_set_property_flip(struct camera_data *cam, int prop_val); void cpia2_set_property_mirror(struct camera_data *cam, int prop_val); -int cpia2_set_target_kb(struct camera_data *cam, unsigned char value); int cpia2_set_gpio(struct camera_data *cam, unsigned char setting); int cpia2_set_fps(struct camera_data *cam, int framerate); |