aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r--include/media/v4l2-common.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index c48c24e4d0fa..33a18426ab9b 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -153,6 +153,22 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev,
153struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, 153struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev,
154 struct i2c_adapter *adapter, 154 struct i2c_adapter *adapter,
155 const char *module_name, const char *client_type, u8 addr); 155 const char *module_name, const char *client_type, u8 addr);
156
157/* Load an i2c module and return an initialized v4l2_subdev struct.
158 Only call request_module if module_name != NULL.
159 The client_type argument is the name of the chip that's on the adapter. */
160struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
161 struct i2c_adapter *adapter,
162 const char *module_name, const char *client_type,
163 int irq, void *platform_data,
164 u8 addr, const unsigned short *probe_addrs);
165
166struct i2c_board_info;
167
168struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
169 struct i2c_adapter *adapter, const char *module_name,
170 struct i2c_board_info *info, const unsigned short *probe_addrs);
171
156/* Initialize an v4l2_subdev with data from an i2c_client struct */ 172/* Initialize an v4l2_subdev with data from an i2c_client struct */
157void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, 173void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
158 const struct v4l2_subdev_ops *ops); 174 const struct v4l2_subdev_ops *ops);
@@ -193,4 +209,14 @@ struct v4l2_routing {
193 u32 output; 209 u32 output;
194}; 210};
195 211
212/* ------------------------------------------------------------------------- */
213
214/* Miscellaneous helper functions */
215
216void v4l_bound_align_image(unsigned int *w, unsigned int wmin,
217 unsigned int wmax, unsigned int walign,
218 unsigned int *h, unsigned int hmin,
219 unsigned int hmax, unsigned int halign,
220 unsigned int salign);
221
196#endif /* V4L2_COMMON_H_ */ 222#endif /* V4L2_COMMON_H_ */