diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 20 | ||||
-rw-r--r-- | include/linux/dvb/version.h | 2 | ||||
-rw-r--r-- | include/linux/uvcvideo.h | 69 | ||||
-rw-r--r-- | include/linux/v4l2-mediabus.h | 3 | ||||
-rw-r--r-- | include/linux/videodev2.h | 4 | ||||
-rw-r--r-- | include/media/mt9v032.h | 12 | ||||
-rw-r--r-- | include/media/rc-core.h | 7 | ||||
-rw-r--r-- | include/media/rc-map.h | 1 | ||||
-rw-r--r-- | include/media/soc_camera.h | 15 | ||||
-rw-r--r-- | include/media/soc_camera_platform.h | 50 | ||||
-rw-r--r-- | include/media/soc_mediabus.h | 25 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 2 |
13 files changed, 201 insertions, 10 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 75cf611641e6..cb1ded2bd545 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -372,6 +372,7 @@ header-y += unistd.h | |||
372 | header-y += usbdevice_fs.h | 372 | header-y += usbdevice_fs.h |
373 | header-y += utime.h | 373 | header-y += utime.h |
374 | header-y += utsname.h | 374 | header-y += utsname.h |
375 | header-y += uvcvideo.h | ||
375 | header-y += v4l2-mediabus.h | 376 | header-y += v4l2-mediabus.h |
376 | header-y += v4l2-subdev.h | 377 | header-y += v4l2-subdev.h |
377 | header-y += veth.h | 378 | header-y += veth.h |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 493a2bf85f62..36a3ed63f571 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode { | |||
175 | TRANSMISSION_MODE_2K, | 175 | TRANSMISSION_MODE_2K, |
176 | TRANSMISSION_MODE_8K, | 176 | TRANSMISSION_MODE_8K, |
177 | TRANSMISSION_MODE_AUTO, | 177 | TRANSMISSION_MODE_AUTO, |
178 | TRANSMISSION_MODE_4K | 178 | TRANSMISSION_MODE_4K, |
179 | TRANSMISSION_MODE_1K, | ||
180 | TRANSMISSION_MODE_16K, | ||
181 | TRANSMISSION_MODE_32K, | ||
179 | } fe_transmit_mode_t; | 182 | } fe_transmit_mode_t; |
180 | 183 | ||
181 | typedef enum fe_bandwidth { | 184 | typedef enum fe_bandwidth { |
182 | BANDWIDTH_8_MHZ, | 185 | BANDWIDTH_8_MHZ, |
183 | BANDWIDTH_7_MHZ, | 186 | BANDWIDTH_7_MHZ, |
184 | BANDWIDTH_6_MHZ, | 187 | BANDWIDTH_6_MHZ, |
185 | BANDWIDTH_AUTO | 188 | BANDWIDTH_AUTO, |
189 | BANDWIDTH_5_MHZ, | ||
190 | BANDWIDTH_10_MHZ, | ||
191 | BANDWIDTH_1_712_MHZ, | ||
186 | } fe_bandwidth_t; | 192 | } fe_bandwidth_t; |
187 | 193 | ||
188 | 194 | ||
@@ -191,7 +197,10 @@ typedef enum fe_guard_interval { | |||
191 | GUARD_INTERVAL_1_16, | 197 | GUARD_INTERVAL_1_16, |
192 | GUARD_INTERVAL_1_8, | 198 | GUARD_INTERVAL_1_8, |
193 | GUARD_INTERVAL_1_4, | 199 | GUARD_INTERVAL_1_4, |
194 | GUARD_INTERVAL_AUTO | 200 | GUARD_INTERVAL_AUTO, |
201 | GUARD_INTERVAL_1_128, | ||
202 | GUARD_INTERVAL_19_128, | ||
203 | GUARD_INTERVAL_19_256, | ||
195 | } fe_guard_interval_t; | 204 | } fe_guard_interval_t; |
196 | 205 | ||
197 | 206 | ||
@@ -305,7 +314,9 @@ struct dvb_frontend_event { | |||
305 | 314 | ||
306 | #define DTV_ISDBS_TS_ID 42 | 315 | #define DTV_ISDBS_TS_ID 42 |
307 | 316 | ||
308 | #define DTV_MAX_COMMAND DTV_ISDBS_TS_ID | 317 | #define DTV_DVBT2_PLP_ID 43 |
318 | |||
319 | #define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID | ||
309 | 320 | ||
310 | typedef enum fe_pilot { | 321 | typedef enum fe_pilot { |
311 | PILOT_ON, | 322 | PILOT_ON, |
@@ -337,6 +348,7 @@ typedef enum fe_delivery_system { | |||
337 | SYS_DMBTH, | 348 | SYS_DMBTH, |
338 | SYS_CMMB, | 349 | SYS_CMMB, |
339 | SYS_DAB, | 350 | SYS_DAB, |
351 | SYS_DVBT2, | ||
340 | } fe_delivery_system_t; | 352 | } fe_delivery_system_t; |
341 | 353 | ||
342 | struct dtv_cmds_h { | 354 | struct dtv_cmds_h { |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 5a7546c12688..1421cc84afaa 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -24,6 +24,6 @@ | |||
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 5 | 26 | #define DVB_API_VERSION 5 |
27 | #define DVB_API_VERSION_MINOR 2 | 27 | #define DVB_API_VERSION_MINOR 3 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |
diff --git a/include/linux/uvcvideo.h b/include/linux/uvcvideo.h new file mode 100644 index 000000000000..f46a53f060d7 --- /dev/null +++ b/include/linux/uvcvideo.h | |||
@@ -0,0 +1,69 @@ | |||
1 | #ifndef __LINUX_UVCVIDEO_H_ | ||
2 | #define __LINUX_UVCVIDEO_H_ | ||
3 | |||
4 | #include <linux/ioctl.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | /* | ||
8 | * Dynamic controls | ||
9 | */ | ||
10 | |||
11 | /* Data types for UVC control data */ | ||
12 | #define UVC_CTRL_DATA_TYPE_RAW 0 | ||
13 | #define UVC_CTRL_DATA_TYPE_SIGNED 1 | ||
14 | #define UVC_CTRL_DATA_TYPE_UNSIGNED 2 | ||
15 | #define UVC_CTRL_DATA_TYPE_BOOLEAN 3 | ||
16 | #define UVC_CTRL_DATA_TYPE_ENUM 4 | ||
17 | #define UVC_CTRL_DATA_TYPE_BITMASK 5 | ||
18 | |||
19 | /* Control flags */ | ||
20 | #define UVC_CTRL_FLAG_SET_CUR (1 << 0) | ||
21 | #define UVC_CTRL_FLAG_GET_CUR (1 << 1) | ||
22 | #define UVC_CTRL_FLAG_GET_MIN (1 << 2) | ||
23 | #define UVC_CTRL_FLAG_GET_MAX (1 << 3) | ||
24 | #define UVC_CTRL_FLAG_GET_RES (1 << 4) | ||
25 | #define UVC_CTRL_FLAG_GET_DEF (1 << 5) | ||
26 | /* Control should be saved at suspend and restored at resume. */ | ||
27 | #define UVC_CTRL_FLAG_RESTORE (1 << 6) | ||
28 | /* Control can be updated by the camera. */ | ||
29 | #define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7) | ||
30 | |||
31 | #define UVC_CTRL_FLAG_GET_RANGE \ | ||
32 | (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | \ | ||
33 | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | \ | ||
34 | UVC_CTRL_FLAG_GET_DEF) | ||
35 | |||
36 | struct uvc_menu_info { | ||
37 | __u32 value; | ||
38 | __u8 name[32]; | ||
39 | }; | ||
40 | |||
41 | struct uvc_xu_control_mapping { | ||
42 | __u32 id; | ||
43 | __u8 name[32]; | ||
44 | __u8 entity[16]; | ||
45 | __u8 selector; | ||
46 | |||
47 | __u8 size; | ||
48 | __u8 offset; | ||
49 | __u32 v4l2_type; | ||
50 | __u32 data_type; | ||
51 | |||
52 | struct uvc_menu_info __user *menu_info; | ||
53 | __u32 menu_count; | ||
54 | |||
55 | __u32 reserved[4]; | ||
56 | }; | ||
57 | |||
58 | struct uvc_xu_control_query { | ||
59 | __u8 unit; | ||
60 | __u8 selector; | ||
61 | __u8 query; | ||
62 | __u16 size; | ||
63 | __u8 __user *data; | ||
64 | }; | ||
65 | |||
66 | #define UVCIOC_CTRL_MAP _IOWR('u', 0x20, struct uvc_xu_control_mapping) | ||
67 | #define UVCIOC_CTRL_QUERY _IOWR('u', 0x21, struct uvc_xu_control_query) | ||
68 | |||
69 | #endif | ||
diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h index de5c15921025..5ea7f753a348 100644 --- a/include/linux/v4l2-mediabus.h +++ b/include/linux/v4l2-mediabus.h | |||
@@ -89,6 +89,9 @@ enum v4l2_mbus_pixelcode { | |||
89 | V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, | 89 | V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, |
90 | V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, | 90 | V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, |
91 | V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, | 91 | V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, |
92 | |||
93 | /* JPEG compressed formats - next is 0x4002 */ | ||
94 | V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, | ||
92 | }; | 95 | }; |
93 | 96 | ||
94 | /** | 97 | /** |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index be82c8ead1af..8a4c309d2344 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -311,6 +311,9 @@ struct v4l2_pix_format { | |||
311 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ | 311 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ |
312 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 312 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
313 | 313 | ||
314 | /* Grey bit-packed formats */ | ||
315 | #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ | ||
316 | |||
314 | /* Palette formats */ | 317 | /* Palette formats */ |
315 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ | 318 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ |
316 | 319 | ||
@@ -333,6 +336,7 @@ struct v4l2_pix_format { | |||
333 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ | 336 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ |
334 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */ | 337 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */ |
335 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */ | 338 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */ |
339 | #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */ | ||
336 | 340 | ||
337 | /* two planes -- one Y, one Cr + Cb interleaved */ | 341 | /* two planes -- one Y, one Cr + Cb interleaved */ |
338 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ | 342 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
diff --git a/include/media/mt9v032.h b/include/media/mt9v032.h new file mode 100644 index 000000000000..5e27f9be6b95 --- /dev/null +++ b/include/media/mt9v032.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _MEDIA_MT9V032_H | ||
2 | #define _MEDIA_MT9V032_H | ||
3 | |||
4 | struct v4l2_subdev; | ||
5 | |||
6 | struct mt9v032_platform_data { | ||
7 | unsigned int clk_pol:1; | ||
8 | |||
9 | void (*set_clock)(struct v4l2_subdev *subdev, unsigned int rate); | ||
10 | }; | ||
11 | |||
12 | #endif | ||
diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 2963263f31e2..60536c74c1ea 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h | |||
@@ -40,10 +40,12 @@ enum rc_driver_type { | |||
40 | * @driver_name: name of the hardware driver which registered this device | 40 | * @driver_name: name of the hardware driver which registered this device |
41 | * @map_name: name of the default keymap | 41 | * @map_name: name of the default keymap |
42 | * @rc_map: current scan/key table | 42 | * @rc_map: current scan/key table |
43 | * @lock: used to ensure we've filled in all protocol details before | ||
44 | * anyone can call show_protocols or store_protocols | ||
43 | * @devno: unique remote control device number | 45 | * @devno: unique remote control device number |
44 | * @raw: additional data for raw pulse/space devices | 46 | * @raw: additional data for raw pulse/space devices |
45 | * @input_dev: the input child device used to communicate events to userspace | 47 | * @input_dev: the input child device used to communicate events to userspace |
46 | * @driver_type: specifies if protocol decoding is done in hardware or software | 48 | * @driver_type: specifies if protocol decoding is done in hardware or software |
47 | * @idle: used to keep track of RX state | 49 | * @idle: used to keep track of RX state |
48 | * @allowed_protos: bitmask with the supported RC_TYPE_* protocols | 50 | * @allowed_protos: bitmask with the supported RC_TYPE_* protocols |
49 | * @scanmask: some hardware decoders are not capable of providing the full | 51 | * @scanmask: some hardware decoders are not capable of providing the full |
@@ -86,7 +88,8 @@ struct rc_dev { | |||
86 | struct input_id input_id; | 88 | struct input_id input_id; |
87 | char *driver_name; | 89 | char *driver_name; |
88 | const char *map_name; | 90 | const char *map_name; |
89 | struct rc_map rc_map; | 91 | struct rc_map rc_map; |
92 | struct mutex lock; | ||
90 | unsigned long devno; | 93 | unsigned long devno; |
91 | struct ir_raw_event_ctrl *raw; | 94 | struct ir_raw_event_ctrl *raw; |
92 | struct input_dev *input_dev; | 95 | struct input_dev *input_dev; |
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 9184751f19c0..4e1409ec2613 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -136,6 +136,7 @@ void rc_map_init(void); | |||
136 | #define RC_MAP_TERRATEC_SLIM "rc-terratec-slim" | 136 | #define RC_MAP_TERRATEC_SLIM "rc-terratec-slim" |
137 | #define RC_MAP_TERRATEC_SLIM_2 "rc-terratec-slim-2" | 137 | #define RC_MAP_TERRATEC_SLIM_2 "rc-terratec-slim-2" |
138 | #define RC_MAP_TEVII_NEC "rc-tevii-nec" | 138 | #define RC_MAP_TEVII_NEC "rc-tevii-nec" |
139 | #define RC_MAP_TIVO "rc-tivo" | ||
139 | #define RC_MAP_TOTAL_MEDIA_IN_HAND "rc-total-media-in-hand" | 140 | #define RC_MAP_TOTAL_MEDIA_IN_HAND "rc-total-media-in-hand" |
140 | #define RC_MAP_TREKSTOR "rc-trekstor" | 141 | #define RC_MAP_TREKSTOR "rc-trekstor" |
141 | #define RC_MAP_TT_1500 "rc-tt-1500" | 142 | #define RC_MAP_TT_1500 "rc-tt-1500" |
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index f80b5372baf3..238bd334fd83 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -80,6 +80,11 @@ struct soc_camera_host_ops { | |||
80 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); | 80 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); |
81 | int (*get_crop)(struct soc_camera_device *, struct v4l2_crop *); | 81 | int (*get_crop)(struct soc_camera_device *, struct v4l2_crop *); |
82 | int (*set_crop)(struct soc_camera_device *, struct v4l2_crop *); | 82 | int (*set_crop)(struct soc_camera_device *, struct v4l2_crop *); |
83 | /* | ||
84 | * The difference to .set_crop() is, that .set_livecrop is not allowed | ||
85 | * to change the output sizes | ||
86 | */ | ||
87 | int (*set_livecrop)(struct soc_camera_device *, struct v4l2_crop *); | ||
83 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); | 88 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); |
84 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); | 89 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |
85 | void (*init_videobuf)(struct videobuf_queue *, | 90 | void (*init_videobuf)(struct videobuf_queue *, |
@@ -104,6 +109,12 @@ struct soc_camera_host_ops { | |||
104 | #define SOCAM_SENSOR_INVERT_HSYNC (1 << 2) | 109 | #define SOCAM_SENSOR_INVERT_HSYNC (1 << 2) |
105 | #define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) | 110 | #define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) |
106 | #define SOCAM_SENSOR_INVERT_DATA (1 << 4) | 111 | #define SOCAM_SENSOR_INVERT_DATA (1 << 4) |
112 | #define SOCAM_MIPI_1LANE (1 << 5) | ||
113 | #define SOCAM_MIPI_2LANE (1 << 6) | ||
114 | #define SOCAM_MIPI_3LANE (1 << 7) | ||
115 | #define SOCAM_MIPI_4LANE (1 << 8) | ||
116 | #define SOCAM_MIPI (SOCAM_MIPI_1LANE | SOCAM_MIPI_2LANE | \ | ||
117 | SOCAM_MIPI_3LANE | SOCAM_MIPI_4LANE) | ||
107 | 118 | ||
108 | struct i2c_board_info; | 119 | struct i2c_board_info; |
109 | struct regulator_bulk_data; | 120 | struct regulator_bulk_data; |
@@ -268,6 +279,7 @@ static inline unsigned long soc_camera_bus_param_compatible( | |||
268 | unsigned long camera_flags, unsigned long bus_flags) | 279 | unsigned long camera_flags, unsigned long bus_flags) |
269 | { | 280 | { |
270 | unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode; | 281 | unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode; |
282 | unsigned long mipi; | ||
271 | 283 | ||
272 | common_flags = camera_flags & bus_flags; | 284 | common_flags = camera_flags & bus_flags; |
273 | 285 | ||
@@ -277,8 +289,9 @@ static inline unsigned long soc_camera_bus_param_compatible( | |||
277 | data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); | 289 | data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); |
278 | mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); | 290 | mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); |
279 | buswidth = common_flags & SOCAM_DATAWIDTH_MASK; | 291 | buswidth = common_flags & SOCAM_DATAWIDTH_MASK; |
292 | mipi = common_flags & SOCAM_MIPI; | ||
280 | 293 | ||
281 | return (!hsync || !vsync || !pclk || !data || !mode || !buswidth) ? 0 : | 294 | return ((!hsync || !vsync || !pclk || !data || !mode || !buswidth) && !mipi) ? 0 : |
282 | common_flags; | 295 | common_flags; |
283 | } | 296 | } |
284 | 297 | ||
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h index 0ecefe227b76..6d7a4fd00fc0 100644 --- a/include/media/soc_camera_platform.h +++ b/include/media/soc_camera_platform.h | |||
@@ -25,4 +25,54 @@ struct soc_camera_platform_info { | |||
25 | int (*set_capture)(struct soc_camera_platform_info *info, int enable); | 25 | int (*set_capture)(struct soc_camera_platform_info *info, int enable); |
26 | }; | 26 | }; |
27 | 27 | ||
28 | static inline void soc_camera_platform_release(struct platform_device **pdev) | ||
29 | { | ||
30 | *pdev = NULL; | ||
31 | } | ||
32 | |||
33 | static inline int soc_camera_platform_add(const struct soc_camera_link *icl, | ||
34 | struct device *dev, | ||
35 | struct platform_device **pdev, | ||
36 | struct soc_camera_link *plink, | ||
37 | void (*release)(struct device *dev), | ||
38 | int id) | ||
39 | { | ||
40 | struct soc_camera_platform_info *info = plink->priv; | ||
41 | int ret; | ||
42 | |||
43 | if (icl != plink) | ||
44 | return -ENODEV; | ||
45 | |||
46 | if (*pdev) | ||
47 | return -EBUSY; | ||
48 | |||
49 | *pdev = platform_device_alloc("soc_camera_platform", id); | ||
50 | if (!*pdev) | ||
51 | return -ENOMEM; | ||
52 | |||
53 | info->dev = dev; | ||
54 | |||
55 | (*pdev)->dev.platform_data = info; | ||
56 | (*pdev)->dev.release = release; | ||
57 | |||
58 | ret = platform_device_add(*pdev); | ||
59 | if (ret < 0) { | ||
60 | platform_device_put(*pdev); | ||
61 | *pdev = NULL; | ||
62 | info->dev = NULL; | ||
63 | } | ||
64 | |||
65 | return ret; | ||
66 | } | ||
67 | |||
68 | static inline void soc_camera_platform_del(const struct soc_camera_link *icl, | ||
69 | struct platform_device *pdev, | ||
70 | const struct soc_camera_link *plink) | ||
71 | { | ||
72 | if (icl != plink || !pdev) | ||
73 | return; | ||
74 | |||
75 | platform_device_unregister(pdev); | ||
76 | } | ||
77 | |||
28 | #endif /* __SOC_CAMERA_H__ */ | 78 | #endif /* __SOC_CAMERA_H__ */ |
diff --git a/include/media/soc_mediabus.h b/include/media/soc_mediabus.h index b338108ec305..fae432544b41 100644 --- a/include/media/soc_mediabus.h +++ b/include/media/soc_mediabus.h | |||
@@ -16,18 +16,24 @@ | |||
16 | 16 | ||
17 | /** | 17 | /** |
18 | * enum soc_mbus_packing - data packing types on the media-bus | 18 | * enum soc_mbus_packing - data packing types on the media-bus |
19 | * @SOC_MBUS_PACKING_NONE: no packing, bit-for-bit transfer to RAM | 19 | * @SOC_MBUS_PACKING_NONE: no packing, bit-for-bit transfer to RAM, one |
20 | * sample represents one pixel | ||
20 | * @SOC_MBUS_PACKING_2X8_PADHI: 16 bits transferred in 2 8-bit samples, in the | 21 | * @SOC_MBUS_PACKING_2X8_PADHI: 16 bits transferred in 2 8-bit samples, in the |
21 | * possibly incomplete byte high bits are padding | 22 | * possibly incomplete byte high bits are padding |
22 | * @SOC_MBUS_PACKING_2X8_PADLO: as above, but low bits are padding | 23 | * @SOC_MBUS_PACKING_2X8_PADLO: as above, but low bits are padding |
23 | * @SOC_MBUS_PACKING_EXTEND16: sample width (e.g., 10 bits) has to be extended | 24 | * @SOC_MBUS_PACKING_EXTEND16: sample width (e.g., 10 bits) has to be extended |
24 | * to 16 bits | 25 | * to 16 bits |
26 | * @SOC_MBUS_PACKING_VARIABLE: compressed formats with variable packing | ||
27 | * @SOC_MBUS_PACKING_1_5X8: used for packed YUV 4:2:0 formats, where 4 | ||
28 | * pixels occupy 6 bytes in RAM | ||
25 | */ | 29 | */ |
26 | enum soc_mbus_packing { | 30 | enum soc_mbus_packing { |
27 | SOC_MBUS_PACKING_NONE, | 31 | SOC_MBUS_PACKING_NONE, |
28 | SOC_MBUS_PACKING_2X8_PADHI, | 32 | SOC_MBUS_PACKING_2X8_PADHI, |
29 | SOC_MBUS_PACKING_2X8_PADLO, | 33 | SOC_MBUS_PACKING_2X8_PADLO, |
30 | SOC_MBUS_PACKING_EXTEND16, | 34 | SOC_MBUS_PACKING_EXTEND16, |
35 | SOC_MBUS_PACKING_VARIABLE, | ||
36 | SOC_MBUS_PACKING_1_5X8, | ||
31 | }; | 37 | }; |
32 | 38 | ||
33 | /** | 39 | /** |
@@ -57,9 +63,24 @@ struct soc_mbus_pixelfmt { | |||
57 | u8 bits_per_sample; | 63 | u8 bits_per_sample; |
58 | }; | 64 | }; |
59 | 65 | ||
66 | /** | ||
67 | * struct soc_mbus_lookup - Lookup FOURCC IDs by mediabus codes for pass-through | ||
68 | * @code: mediabus pixel-code | ||
69 | * @fmt: pixel format description | ||
70 | */ | ||
71 | struct soc_mbus_lookup { | ||
72 | enum v4l2_mbus_pixelcode code; | ||
73 | struct soc_mbus_pixelfmt fmt; | ||
74 | }; | ||
75 | |||
76 | const struct soc_mbus_pixelfmt *soc_mbus_find_fmtdesc( | ||
77 | enum v4l2_mbus_pixelcode code, | ||
78 | const struct soc_mbus_lookup *lookup, | ||
79 | int n); | ||
60 | const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc( | 80 | const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc( |
61 | enum v4l2_mbus_pixelcode code); | 81 | enum v4l2_mbus_pixelcode code); |
62 | s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf); | 82 | s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf); |
63 | int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf); | 83 | int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf, |
84 | unsigned int *numerator, unsigned int *denominator); | ||
64 | 85 | ||
65 | #endif | 86 | #endif |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 8266d5ade2ff..93e96fb93452 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -62,6 +62,8 @@ struct v4l2_file_operations { | |||
62 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 62 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
63 | long (*ioctl) (struct file *, unsigned int, unsigned long); | 63 | long (*ioctl) (struct file *, unsigned int, unsigned long); |
64 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 64 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
65 | unsigned long (*get_unmapped_area) (struct file *, unsigned long, | ||
66 | unsigned long, unsigned long, unsigned long); | ||
65 | int (*mmap) (struct file *, struct vm_area_struct *); | 67 | int (*mmap) (struct file *, struct vm_area_struct *); |
66 | int (*open) (struct file *); | 68 | int (*open) (struct file *); |
67 | int (*release) (struct file *); | 69 | int (*release) (struct file *); |