aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-31 18:42:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-31 18:42:54 -0400
commit1eb63378354ac37b7e27d256bbf84684751bac32 (patch)
tree0775591a2dced778d1ba0bd8a946831e424d02d7 /include/media
parent1a4ceab195e66bce9c1638fdded6d92988100ba4 (diff)
parentbac2dacd5fb9ddad093d7a2dc5ab44e764874821 (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (348 commits) [media] pctv452e: Remove bogus code [media] adv7175: Make use of media bus pixel codes [media] media: vb2: fix incorrect return value [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES [media] cx23885: Stop the risc video fifo before reconfiguring it [media] cx23885: Avoid incorrect error handling and reporting [media] cx23885: Avoid stopping the risc engine during buffer timeout [media] cx23885: Removed a spurious function cx23885_set_scale() [media] cx23885: v4l2 api compliance, set the audioset field correctly [media] cx23885: hook the audio selection functions into the main driver [media] cx23885: add generic functions for dealing with audio input selection [media] cx23885: fixes related to maximum number of inputs and range checking [media] cx23885: Initial support for the MPX-885 mini-card [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband use [media] cx23885: Enable audio line in support from the back panel [media] cx23885: Allow the audio mux config to be specified on a per input basis [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs [media] cx23885: Name an internal i2c part and declare a bitfield by name [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs during streaming [media] cx23885: remove channel dump diagnostics when a vbi buffer times out ... Fix up trivial conflicts in drivers/misc/altera-stapl/altera.c (header file rename vs add)
Diffstat (limited to 'include/media')
-rw-r--r--include/media/m5mols.h4
-rw-r--r--include/media/mt9p031.h19
-rw-r--r--include/media/mt9t001.h8
-rw-r--r--include/media/omap3isp.h140
-rw-r--r--include/media/rc-core.h7
-rw-r--r--include/media/rc-map.h3
-rw-r--r--include/media/s5p_fimc.h18
-rw-r--r--include/media/saa7146.h36
-rw-r--r--include/media/v4l2-chip-ident.h3
-rw-r--r--include/media/v4l2-ctrls.h15
-rw-r--r--include/media/v4l2-mediabus.h12
-rw-r--r--include/media/videobuf2-core.h23
-rw-r--r--include/media/videobuf2-dma-contig.h6
13 files changed, 242 insertions, 52 deletions
diff --git a/include/media/m5mols.h b/include/media/m5mols.h
index aac2c0e06d5e..4a825ae5c6c8 100644
--- a/include/media/m5mols.h
+++ b/include/media/m5mols.h
@@ -18,15 +18,13 @@
18 18
19/** 19/**
20 * struct m5mols_platform_data - platform data for M-5MOLS driver 20 * struct m5mols_platform_data - platform data for M-5MOLS driver
21 * @irq: GPIO getting the irq pin of M-5MOLS
22 * @gpio_reset: GPIO driving the reset pin of M-5MOLS 21 * @gpio_reset: GPIO driving the reset pin of M-5MOLS
23 * @reset_polarity: active state for gpio_rst pin, 0 or 1 22 * @reset_polarity: active state for gpio_reset pin, 0 or 1
24 * @set_power: an additional callback to the board setup code 23 * @set_power: an additional callback to the board setup code
25 * to be called after enabling and before disabling 24 * to be called after enabling and before disabling
26 * the sensor's supply regulators 25 * the sensor's supply regulators
27 */ 26 */
28struct m5mols_platform_data { 27struct m5mols_platform_data {
29 int irq;
30 int gpio_reset; 28 int gpio_reset;
31 u8 reset_polarity; 29 u8 reset_polarity;
32 int (*set_power)(struct device *dev, int on); 30 int (*set_power)(struct device *dev, int on);
diff --git a/include/media/mt9p031.h b/include/media/mt9p031.h
new file mode 100644
index 000000000000..96448c7a318b
--- /dev/null
+++ b/include/media/mt9p031.h
@@ -0,0 +1,19 @@
1#ifndef MT9P031_H
2#define MT9P031_H
3
4struct v4l2_subdev;
5
6enum {
7 MT9P031_COLOR_VERSION,
8 MT9P031_MONOCHROME_VERSION,
9};
10
11struct mt9p031_platform_data {
12 int (*set_xclk)(struct v4l2_subdev *subdev, int hz);
13 int (*reset)(struct v4l2_subdev *subdev, int active);
14 int ext_freq; /* input frequency to the mt9p031 for PLL dividers */
15 int target_freq; /* frequency target for the PLL */
16 int version; /* MT9P031_COLOR_VERSION or MT9P031_MONOCHROME_VERSION */
17};
18
19#endif
diff --git a/include/media/mt9t001.h b/include/media/mt9t001.h
new file mode 100644
index 000000000000..e839a78bb9c5
--- /dev/null
+++ b/include/media/mt9t001.h
@@ -0,0 +1,8 @@
1#ifndef _MEDIA_MT9T001_H
2#define _MEDIA_MT9T001_H
3
4struct mt9t001_platform_data {
5 unsigned int clk_pol:1;
6};
7
8#endif
diff --git a/include/media/omap3isp.h b/include/media/omap3isp.h
new file mode 100644
index 000000000000..e917b1da6577
--- /dev/null
+++ b/include/media/omap3isp.h
@@ -0,0 +1,140 @@
1/*
2 * omap3isp.h
3 *
4 * TI OMAP3 ISP - Platform data
5 *
6 * Copyright (C) 2011 Nokia Corporation
7 *
8 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 * Sakari Ailus <sakari.ailus@iki.fi>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 * 02110-1301 USA
24 */
25
26#ifndef __MEDIA_OMAP3ISP_H__
27#define __MEDIA_OMAP3ISP_H__
28
29struct i2c_board_info;
30struct isp_device;
31
32enum isp_interface_type {
33 ISP_INTERFACE_PARALLEL,
34 ISP_INTERFACE_CSI2A_PHY2,
35 ISP_INTERFACE_CCP2B_PHY1,
36 ISP_INTERFACE_CCP2B_PHY2,
37 ISP_INTERFACE_CSI2C_PHY1,
38};
39
40enum {
41 ISP_BRIDGE_DISABLE = 0,
42 ISP_BRIDGE_LITTLE_ENDIAN = 2,
43 ISP_BRIDGE_BIG_ENDIAN = 3,
44};
45
46enum {
47 ISP_LANE_SHIFT_0 = 0,
48 ISP_LANE_SHIFT_2 = 1,
49 ISP_LANE_SHIFT_4 = 2,
50 ISP_LANE_SHIFT_6 = 3,
51};
52
53/**
54 * struct isp_parallel_platform_data - Parallel interface platform data
55 * @data_lane_shift: Data lane shifter
56 * ISP_LANE_SHIFT_0 - CAMEXT[13:0] -> CAM[13:0]
57 * ISP_LANE_SHIFT_2 - CAMEXT[13:2] -> CAM[11:0]
58 * ISP_LANE_SHIFT_4 - CAMEXT[13:4] -> CAM[9:0]
59 * ISP_LANE_SHIFT_6 - CAMEXT[13:6] -> CAM[7:0]
60 * @clk_pol: Pixel clock polarity
61 * 0 - Non Inverted, 1 - Inverted
62 * @hs_pol: Horizontal synchronization polarity
63 * 0 - Active high, 1 - Active low
64 * @vs_pol: Vertical synchronization polarity
65 * 0 - Active high, 1 - Active low
66 * @bridge: CCDC Bridge input control
67 * ISP_BRIDGE_DISABLE - Disable
68 * ISP_BRIDGE_LITTLE_ENDIAN - Little endian
69 * ISP_BRIDGE_BIG_ENDIAN - Big endian
70 */
71struct isp_parallel_platform_data {
72 unsigned int data_lane_shift:2;
73 unsigned int clk_pol:1;
74 unsigned int hs_pol:1;
75 unsigned int vs_pol:1;
76 unsigned int bridge:2;
77};
78
79enum {
80 ISP_CCP2_PHY_DATA_CLOCK = 0,
81 ISP_CCP2_PHY_DATA_STROBE = 1,
82};
83
84enum {
85 ISP_CCP2_MODE_MIPI = 0,
86 ISP_CCP2_MODE_CCP2 = 1,
87};
88
89/**
90 * struct isp_ccp2_platform_data - CCP2 interface platform data
91 * @strobe_clk_pol: Strobe/clock polarity
92 * 0 - Non Inverted, 1 - Inverted
93 * @crc: Enable the cyclic redundancy check
94 * @ccp2_mode: Enable CCP2 compatibility mode
95 * ISP_CCP2_MODE_MIPI - MIPI-CSI1 mode
96 * ISP_CCP2_MODE_CCP2 - CCP2 mode
97 * @phy_layer: Physical layer selection
98 * ISP_CCP2_PHY_DATA_CLOCK - Data/clock physical layer
99 * ISP_CCP2_PHY_DATA_STROBE - Data/strobe physical layer
100 * @vpclk_div: Video port output clock control
101 */
102struct isp_ccp2_platform_data {
103 unsigned int strobe_clk_pol:1;
104 unsigned int crc:1;
105 unsigned int ccp2_mode:1;
106 unsigned int phy_layer:1;
107 unsigned int vpclk_div:2;
108};
109
110/**
111 * struct isp_csi2_platform_data - CSI2 interface platform data
112 * @crc: Enable the cyclic redundancy check
113 * @vpclk_div: Video port output clock control
114 */
115struct isp_csi2_platform_data {
116 unsigned crc:1;
117 unsigned vpclk_div:2;
118};
119
120struct isp_subdev_i2c_board_info {
121 struct i2c_board_info *board_info;
122 int i2c_adapter_id;
123};
124
125struct isp_v4l2_subdevs_group {
126 struct isp_subdev_i2c_board_info *subdevs;
127 enum isp_interface_type interface;
128 union {
129 struct isp_parallel_platform_data parallel;
130 struct isp_ccp2_platform_data ccp2;
131 struct isp_csi2_platform_data csi2;
132 } bus; /* gcc < 4.6.0 chokes on anonymous union initializers */
133};
134
135struct isp_platform_data {
136 struct isp_v4l2_subdevs_group *subdevs;
137 void (*set_constraints)(struct isp_device *isp, bool enable);
138};
139
140#endif /* __MEDIA_OMAP3ISP_H__ */
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index b1f19b77ecd4..b0c494a69079 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -23,8 +23,11 @@
23#include <media/rc-map.h> 23#include <media/rc-map.h>
24 24
25extern int rc_core_debug; 25extern int rc_core_debug;
26#define IR_dprintk(level, fmt, arg...) if (rc_core_debug >= level) \ 26#define IR_dprintk(level, fmt, ...) \
27 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) 27do { \
28 if (rc_core_debug >= level) \
29 pr_debug("%s: " fmt, __func__, ##__VA_ARGS__); \
30} while (0)
28 31
29enum rc_driver_type { 32enum rc_driver_type {
30 RC_DRIVER_SCANCODE = 0, /* Driver or hardware generates a scancode */ 33 RC_DRIVER_SCANCODE = 0, /* Driver or hardware generates a scancode */
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index 17c9759ae77b..26a3bd0fe57c 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -61,6 +61,7 @@ void rc_map_init(void);
61#define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp" 61#define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp"
62#define RC_MAP_ASUS_PC39 "rc-asus-pc39" 62#define RC_MAP_ASUS_PC39 "rc-asus-pc39"
63#define RC_MAP_ATI_TV_WONDER_HD_600 "rc-ati-tv-wonder-hd-600" 63#define RC_MAP_ATI_TV_WONDER_HD_600 "rc-ati-tv-wonder-hd-600"
64#define RC_MAP_ATI_X10 "rc-ati-x10"
64#define RC_MAP_AVERMEDIA_A16D "rc-avermedia-a16d" 65#define RC_MAP_AVERMEDIA_A16D "rc-avermedia-a16d"
65#define RC_MAP_AVERMEDIA_CARDBUS "rc-avermedia-cardbus" 66#define RC_MAP_AVERMEDIA_CARDBUS "rc-avermedia-cardbus"
66#define RC_MAP_AVERMEDIA_DVBT "rc-avermedia-dvbt" 67#define RC_MAP_AVERMEDIA_DVBT "rc-avermedia-dvbt"
@@ -106,6 +107,7 @@ void rc_map_init(void);
106#define RC_MAP_LIRC "rc-lirc" 107#define RC_MAP_LIRC "rc-lirc"
107#define RC_MAP_LME2510 "rc-lme2510" 108#define RC_MAP_LME2510 "rc-lme2510"
108#define RC_MAP_MANLI "rc-manli" 109#define RC_MAP_MANLI "rc-manli"
110#define RC_MAP_MEDION_X10 "rc-medion-x10"
109#define RC_MAP_MSI_DIGIVOX_II "rc-msi-digivox-ii" 111#define RC_MAP_MSI_DIGIVOX_II "rc-msi-digivox-ii"
110#define RC_MAP_MSI_DIGIVOX_III "rc-msi-digivox-iii" 112#define RC_MAP_MSI_DIGIVOX_III "rc-msi-digivox-iii"
111#define RC_MAP_MSI_TVANYWHERE_PLUS "rc-msi-tvanywhere-plus" 113#define RC_MAP_MSI_TVANYWHERE_PLUS "rc-msi-tvanywhere-plus"
@@ -130,6 +132,7 @@ void rc_map_init(void);
130#define RC_MAP_RC5_TV "rc-rc5-tv" 132#define RC_MAP_RC5_TV "rc-rc5-tv"
131#define RC_MAP_RC6_MCE "rc-rc6-mce" 133#define RC_MAP_RC6_MCE "rc-rc6-mce"
132#define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys" 134#define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys"
135#define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly"
133#define RC_MAP_STREAMZAP "rc-streamzap" 136#define RC_MAP_STREAMZAP "rc-streamzap"
134#define RC_MAP_TBS_NEC "rc-tbs-nec" 137#define RC_MAP_TBS_NEC "rc-tbs-nec"
135#define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2" 138#define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2"
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h
index 9fdff8a4ed26..688fb3f1dc35 100644
--- a/include/media/s5p_fimc.h
+++ b/include/media/s5p_fimc.h
@@ -19,11 +19,6 @@ enum cam_bus_type {
19 FIMC_LCD_WB, /* FIFO link from LCD mixer */ 19 FIMC_LCD_WB, /* FIFO link from LCD mixer */
20}; 20};
21 21
22#define FIMC_CLK_INV_PCLK (1 << 0)
23#define FIMC_CLK_INV_VSYNC (1 << 1)
24#define FIMC_CLK_INV_HREF (1 << 2)
25#define FIMC_CLK_INV_HSYNC (1 << 3)
26
27struct i2c_board_info; 22struct i2c_board_info;
28 23
29/** 24/**
@@ -36,7 +31,8 @@ struct i2c_board_info;
36 * @csi_data_align: MIPI-CSI interface data alignment in bits 31 * @csi_data_align: MIPI-CSI interface data alignment in bits
37 * @i2c_bus_num: i2c control bus id the sensor is attached to 32 * @i2c_bus_num: i2c control bus id the sensor is attached to
38 * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) 33 * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU)
39 * @flags: flags defining bus signals polarity inversion (High by default) 34 * @clk_id: index of the SoC peripheral clock for sensors
35 * @flags: the parallel bus flags defining signals polarity (V4L2_MBUS_*)
40 */ 36 */
41struct s5p_fimc_isp_info { 37struct s5p_fimc_isp_info {
42 struct i2c_board_info *board_info; 38 struct i2c_board_info *board_info;
@@ -46,6 +42,7 @@ struct s5p_fimc_isp_info {
46 u16 i2c_bus_num; 42 u16 i2c_bus_num;
47 u16 mux_id; 43 u16 mux_id;
48 u16 flags; 44 u16 flags;
45 u8 clk_id;
49}; 46};
50 47
51/** 48/**
@@ -58,4 +55,13 @@ struct s5p_platform_fimc {
58 struct s5p_fimc_isp_info *isp_info; 55 struct s5p_fimc_isp_info *isp_info;
59 int num_clients; 56 int num_clients;
60}; 57};
58
59/*
60 * v4l2_device notification id. This is only for internal use in the kernel.
61 * Sensor subdevs should issue S5P_FIMC_TX_END_NOTIFY notification in single
62 * frame capture mode when there is only one VSYNC pulse issued by the sensor
63 * at begining of the frame transmission.
64 */
65#define S5P_FIMC_TX_END_NOTIFY _IO('e', 0)
66
61#endif /* S5P_FIMC_H_ */ 67#endif /* S5P_FIMC_H_ */
diff --git a/include/media/saa7146.h b/include/media/saa7146.h
index 79827143d5ac..5017500eda1b 100644
--- a/include/media/saa7146.h
+++ b/include/media/saa7146.h
@@ -25,24 +25,32 @@
25 25
26extern unsigned int saa7146_debug; 26extern unsigned int saa7146_debug;
27 27
28//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__func__)
29
30#ifndef DEBUG_VARIABLE 28#ifndef DEBUG_VARIABLE
31 #define DEBUG_VARIABLE saa7146_debug 29 #define DEBUG_VARIABLE saa7146_debug
32#endif 30#endif
33 31
34#define DEBUG_PROLOG printk("%s: %s(): ",KBUILD_MODNAME, __func__) 32#define ERR(fmt, ...) pr_err("%s: " fmt, __func__, ##__VA_ARGS__)
35#define INFO(x) { printk("%s: ",KBUILD_MODNAME); printk x; } 33
36 34#define _DBG(mask, fmt, ...) \
37#define ERR(x) { DEBUG_PROLOG; printk x; } 35do { \
38 36 if (DEBUG_VARIABLE & mask) \
39#define DEB_S(x) if (0!=(DEBUG_VARIABLE&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */ 37 pr_debug("%s(): " fmt, __func__, ##__VA_ARGS__); \
40#define DEB_D(x) if (0!=(DEBUG_VARIABLE&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */ 38} while (0)
41#define DEB_EE(x) if (0!=(DEBUG_VARIABLE&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */ 39
42#define DEB_I2C(x) if (0!=(DEBUG_VARIABLE&0x08)) { DEBUG_PROLOG; printk x; } /* i2c debug messages */ 40/* simple debug messages */
43#define DEB_VBI(x) if (0!=(DEBUG_VARIABLE&0x10)) { DEBUG_PROLOG; printk x; } /* vbi debug messages */ 41#define DEB_S(fmt, ...) _DBG(0x01, fmt, ##__VA_ARGS__)
44#define DEB_INT(x) if (0!=(DEBUG_VARIABLE&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */ 42/* more detailed debug messages */
45#define DEB_CAP(x) if (0!=(DEBUG_VARIABLE&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */ 43#define DEB_D(fmt, ...) _DBG(0x02, fmt, ##__VA_ARGS__)
44/* print enter and exit of functions */
45#define DEB_EE(fmt, ...) _DBG(0x04, fmt, ##__VA_ARGS__)
46/* i2c debug messages */
47#define DEB_I2C(fmt, ...) _DBG(0x08, fmt, ##__VA_ARGS__)
48/* vbi debug messages */
49#define DEB_VBI(fmt, ...) _DBG(0x10, fmt, ##__VA_ARGS__)
50/* interrupt debug messages */
51#define DEB_INT(fmt, ...) _DBG(0x20, fmt, ##__VA_ARGS__)
52/* capture debug messages */
53#define DEB_CAP(fmt, ...) _DBG(0x40, fmt, ##__VA_ARGS__)
46 54
47#define SAA7146_ISR_CLEAR(x,y) \ 55#define SAA7146_ISR_CLEAR(x,y) \
48 saa7146_write(x, ISR, (y)); 56 saa7146_write(x, ISR, (y));
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index 63fd9d3db296..810a20928a21 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -212,9 +212,6 @@ enum {
212 /* module sn9c20x: just ident 10000 */ 212 /* module sn9c20x: just ident 10000 */
213 V4L2_IDENT_SN9C20X = 10000, 213 V4L2_IDENT_SN9C20X = 10000,
214 214
215 /* Siliconfile sensors: reserved range 10100 - 10199 */
216 V4L2_IDENT_NOON010PC30 = 10100,
217
218 /* module cx231xx and cx25840 */ 215 /* module cx231xx and cx25840 */
219 V4L2_IDENT_CX2310X_AV = 23099, /* Integrated A/V decoder; not in '100 */ 216 V4L2_IDENT_CX2310X_AV = 23099, /* Integrated A/V decoder; not in '100 */
220 V4L2_IDENT_CX23100 = 23100, 217 V4L2_IDENT_CX23100 = 23100,
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 13fe4d744aba..eeb3df637144 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -65,14 +65,12 @@ struct v4l2_ctrl_ops {
65 * @is_private: If set, then this control is private to its handler and it 65 * @is_private: If set, then this control is private to its handler and it
66 * will not be added to any other handlers. Drivers can set 66 * will not be added to any other handlers. Drivers can set
67 * this flag. 67 * this flag.
68 * @is_volatile: If set, then this control is volatile. This means that the
69 * control's current value cannot be cached and needs to be
70 * retrieved through the g_volatile_ctrl op. Drivers can set
71 * this flag.
72 * @is_auto: If set, then this control selects whether the other cluster 68 * @is_auto: If set, then this control selects whether the other cluster
73 * members are in 'automatic' mode or 'manual' mode. This is 69 * members are in 'automatic' mode or 'manual' mode. This is
74 * used for autogain/gain type clusters. Drivers should never 70 * used for autogain/gain type clusters. Drivers should never
75 * set this flag directly. 71 * set this flag directly.
72 * @has_volatiles: If set, then one or more members of the cluster are volatile.
73 * Drivers should never touch this flag.
76 * @manual_mode_value: If the is_auto flag is set, then this is the value 74 * @manual_mode_value: If the is_auto flag is set, then this is the value
77 * of the auto control that determines if that control is in 75 * of the auto control that determines if that control is in
78 * manual mode. So if the value of the auto control equals this 76 * manual mode. So if the value of the auto control equals this
@@ -118,8 +116,8 @@ struct v4l2_ctrl {
118 116
119 unsigned int is_new:1; 117 unsigned int is_new:1;
120 unsigned int is_private:1; 118 unsigned int is_private:1;
121 unsigned int is_volatile:1;
122 unsigned int is_auto:1; 119 unsigned int is_auto:1;
120 unsigned int has_volatiles:1;
123 unsigned int manual_mode_value:8; 121 unsigned int manual_mode_value:8;
124 122
125 const struct v4l2_ctrl_ops *ops; 123 const struct v4l2_ctrl_ops *ops;
@@ -208,9 +206,6 @@ struct v4l2_ctrl_handler {
208 * must be NULL. 206 * must be NULL.
209 * @is_private: If set, then this control is private to its handler and it 207 * @is_private: If set, then this control is private to its handler and it
210 * will not be added to any other handlers. 208 * will not be added to any other handlers.
211 * @is_volatile: If set, then this control is volatile. This means that the
212 * control's current value cannot be cached and needs to be
213 * retrieved through the g_volatile_ctrl op.
214 */ 209 */
215struct v4l2_ctrl_config { 210struct v4l2_ctrl_config {
216 const struct v4l2_ctrl_ops *ops; 211 const struct v4l2_ctrl_ops *ops;
@@ -225,7 +220,6 @@ struct v4l2_ctrl_config {
225 u32 menu_skip_mask; 220 u32 menu_skip_mask;
226 const char * const *qmenu; 221 const char * const *qmenu;
227 unsigned int is_private:1; 222 unsigned int is_private:1;
228 unsigned int is_volatile:1;
229}; 223};
230 224
231/** v4l2_ctrl_fill() - Fill in the control fields based on the control ID. 225/** v4l2_ctrl_fill() - Fill in the control fields based on the control ID.
@@ -389,8 +383,7 @@ void v4l2_ctrl_cluster(unsigned ncontrols, struct v4l2_ctrl **controls);
389 * @manual_val: The value for the first control in the cluster that equals the 383 * @manual_val: The value for the first control in the cluster that equals the
390 * manual setting. 384 * manual setting.
391 * @set_volatile: If true, then all controls except the first auto control will 385 * @set_volatile: If true, then all controls except the first auto control will
392 * have is_volatile set to true. If false, then is_volatile will not 386 * be volatile.
393 * be touched.
394 * 387 *
395 * Use for control groups where one control selects some automatic feature and 388 * Use for control groups where one control selects some automatic feature and
396 * the other controls are only active whenever the automatic feature is turned 389 * the other controls are only active whenever the automatic feature is turned
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
index 6114007c8c74..83ae07e53350 100644
--- a/include/media/v4l2-mediabus.h
+++ b/include/media/v4l2-mediabus.h
@@ -22,8 +22,12 @@
22 */ 22 */
23#define V4L2_MBUS_MASTER (1 << 0) 23#define V4L2_MBUS_MASTER (1 << 0)
24#define V4L2_MBUS_SLAVE (1 << 1) 24#define V4L2_MBUS_SLAVE (1 << 1)
25/* Which signal polarities it supports */ 25/*
26/* Note: in BT.656 mode HSYNC and VSYNC are unused */ 26 * Signal polarity flags
27 * Note: in BT.656 mode HSYNC, FIELD, and VSYNC are unused
28 * V4L2_MBUS_[HV]SYNC* flags should be also used for specifying
29 * configuration of hardware that uses [HV]REF signals
30 */
27#define V4L2_MBUS_HSYNC_ACTIVE_HIGH (1 << 2) 31#define V4L2_MBUS_HSYNC_ACTIVE_HIGH (1 << 2)
28#define V4L2_MBUS_HSYNC_ACTIVE_LOW (1 << 3) 32#define V4L2_MBUS_HSYNC_ACTIVE_LOW (1 << 3)
29#define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1 << 4) 33#define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1 << 4)
@@ -32,6 +36,10 @@
32#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1 << 7) 36#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1 << 7)
33#define V4L2_MBUS_DATA_ACTIVE_HIGH (1 << 8) 37#define V4L2_MBUS_DATA_ACTIVE_HIGH (1 << 8)
34#define V4L2_MBUS_DATA_ACTIVE_LOW (1 << 9) 38#define V4L2_MBUS_DATA_ACTIVE_LOW (1 << 9)
39/* FIELD = 0/1 - Field1 (odd)/Field2 (even) */
40#define V4L2_MBUS_FIELD_EVEN_HIGH (1 << 10)
41/* FIELD = 1/0 - Field1 (odd)/Field2 (even) */
42#define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11)
35 43
36/* Serial flags */ 44/* Serial flags */
37/* How many lanes the client can use */ 45/* How many lanes the client can use */
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index f87472acbc51..ea55c08eddfb 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -75,7 +75,6 @@ struct vb2_mem_ops {
75 75
76struct vb2_plane { 76struct vb2_plane {
77 void *mem_priv; 77 void *mem_priv;
78 int mapped:1;
79}; 78};
80 79
81/** 80/**
@@ -147,7 +146,6 @@ struct vb2_queue;
147 * @done_entry: entry on the list that stores all buffers ready to 146 * @done_entry: entry on the list that stores all buffers ready to
148 * be dequeued to userspace 147 * be dequeued to userspace
149 * @planes: private per-plane information; do not change 148 * @planes: private per-plane information; do not change
150 * @num_planes_mapped: number of mapped planes; do not change
151 */ 149 */
152struct vb2_buffer { 150struct vb2_buffer {
153 struct v4l2_buffer v4l2_buf; 151 struct v4l2_buffer v4l2_buf;
@@ -164,7 +162,6 @@ struct vb2_buffer {
164 struct list_head done_entry; 162 struct list_head done_entry;
165 163
166 struct vb2_plane planes[VIDEO_MAX_PLANES]; 164 struct vb2_plane planes[VIDEO_MAX_PLANES];
167 unsigned int num_planes_mapped;
168}; 165};
169 166
170/** 167/**
@@ -199,19 +196,28 @@ struct vb2_buffer {
199 * before userspace accesses the buffer; optional 196 * before userspace accesses the buffer; optional
200 * @buf_cleanup: called once before the buffer is freed; drivers may 197 * @buf_cleanup: called once before the buffer is freed; drivers may
201 * perform any additional cleanup; optional 198 * perform any additional cleanup; optional
202 * @start_streaming: called once before entering 'streaming' state; enables 199 * @start_streaming: called once to enter 'streaming' state; the driver may
203 * driver to receive buffers over buf_queue() callback 200 * receive buffers with @buf_queue callback before
201 * @start_streaming is called; the driver gets the number
202 * of already queued buffers in count parameter; driver
203 * can return an error if hardware fails or not enough
204 * buffers has been queued, in such case all buffers that
205 * have been already given by the @buf_queue callback are
206 * invalidated.
204 * @stop_streaming: called when 'streaming' state must be disabled; driver 207 * @stop_streaming: called when 'streaming' state must be disabled; driver
205 * should stop any DMA transactions or wait until they 208 * should stop any DMA transactions or wait until they
206 * finish and give back all buffers it got from buf_queue() 209 * finish and give back all buffers it got from buf_queue()
207 * callback; may use vb2_wait_for_all_buffers() function 210 * callback; may use vb2_wait_for_all_buffers() function
208 * @buf_queue: passes buffer vb to the driver; driver may start 211 * @buf_queue: passes buffer vb to the driver; driver may start
209 * hardware operation on this buffer; driver should give 212 * hardware operation on this buffer; driver should give
210 * the buffer back by calling vb2_buffer_done() function 213 * the buffer back by calling vb2_buffer_done() function;
214 * it is allways called after calling STREAMON ioctl;
215 * might be called before start_streaming callback if user
216 * pre-queued buffers before calling STREAMON
211 */ 217 */
212struct vb2_ops { 218struct vb2_ops {
213 int (*queue_setup)(struct vb2_queue *q, unsigned int *num_buffers, 219 int (*queue_setup)(struct vb2_queue *q, unsigned int *num_buffers,
214 unsigned int *num_planes, unsigned long sizes[], 220 unsigned int *num_planes, unsigned int sizes[],
215 void *alloc_ctxs[]); 221 void *alloc_ctxs[]);
216 222
217 void (*wait_prepare)(struct vb2_queue *q); 223 void (*wait_prepare)(struct vb2_queue *q);
@@ -222,7 +228,7 @@ struct vb2_ops {
222 int (*buf_finish)(struct vb2_buffer *vb); 228 int (*buf_finish)(struct vb2_buffer *vb);
223 void (*buf_cleanup)(struct vb2_buffer *vb); 229 void (*buf_cleanup)(struct vb2_buffer *vb);
224 230
225 int (*start_streaming)(struct vb2_queue *q); 231 int (*start_streaming)(struct vb2_queue *q, unsigned int count);
226 int (*stop_streaming)(struct vb2_queue *q); 232 int (*stop_streaming)(struct vb2_queue *q);
227 233
228 void (*buf_queue)(struct vb2_buffer *vb); 234 void (*buf_queue)(struct vb2_buffer *vb);
@@ -276,6 +282,7 @@ struct vb2_queue {
276 wait_queue_head_t done_wq; 282 wait_queue_head_t done_wq;
277 283
278 void *alloc_ctx[VIDEO_MAX_PLANES]; 284 void *alloc_ctx[VIDEO_MAX_PLANES];
285 unsigned int plane_sizes[VIDEO_MAX_PLANES];
279 286
280 unsigned int streaming:1; 287 unsigned int streaming:1;
281 288
diff --git a/include/media/videobuf2-dma-contig.h b/include/media/videobuf2-dma-contig.h
index 7e6c68b23773..19ae1e350567 100644
--- a/include/media/videobuf2-dma-contig.h
+++ b/include/media/videobuf2-dma-contig.h
@@ -17,11 +17,11 @@
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18 18
19static inline dma_addr_t 19static inline dma_addr_t
20vb2_dma_contig_plane_paddr(struct vb2_buffer *vb, unsigned int plane_no) 20vb2_dma_contig_plane_dma_addr(struct vb2_buffer *vb, unsigned int plane_no)
21{ 21{
22 dma_addr_t *paddr = vb2_plane_cookie(vb, plane_no); 22 dma_addr_t *addr = vb2_plane_cookie(vb, plane_no);
23 23
24 return *paddr; 24 return *addr;
25} 25}
26 26
27void *vb2_dma_contig_init_ctx(struct device *dev); 27void *vb2_dma_contig_init_ctx(struct device *dev);