diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/ir-common.h | 2 | ||||
-rw-r--r-- | include/media/v4l2-common.h | 26 | ||||
-rw-r--r-- | include/media/v4l2-i2c-drv.h | 5 | ||||
-rw-r--r-- | include/media/v4l2-subdev.h | 7 |
4 files changed, 38 insertions, 2 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 7b5b91f6042..9dcb632f608 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h @@ -162,6 +162,8 @@ extern IR_KEYTAB_TYPE ir_codes_ati_tv_wonder_hd_600[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE]; + #endif /* diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index c48c24e4d0f..33a18426ab9 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, struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, const char *module_name, const char *client_type, u8 addr); + +/* Load an i2c module and return an initialized v4l2_subdev struct. + Only call request_module if module_name != NULL. + The client_type argument is the name of the chip that's on the adapter. */ +struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, + struct i2c_adapter *adapter, + const char *module_name, const char *client_type, + int irq, void *platform_data, + u8 addr, const unsigned short *probe_addrs); + +struct i2c_board_info; + +struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, + struct i2c_adapter *adapter, const char *module_name, + struct i2c_board_info *info, const unsigned short *probe_addrs); + /* Initialize an v4l2_subdev with data from an i2c_client struct */ void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, const struct v4l2_subdev_ops *ops); @@ -193,4 +209,14 @@ struct v4l2_routing { u32 output; }; +/* ------------------------------------------------------------------------- */ + +/* Miscellaneous helper functions */ + +void v4l_bound_align_image(unsigned int *w, unsigned int wmin, + unsigned int wmax, unsigned int walign, + unsigned int *h, unsigned int hmin, + unsigned int hmax, unsigned int halign, + unsigned int salign); + #endif /* V4L2_COMMON_H_ */ diff --git a/include/media/v4l2-i2c-drv.h b/include/media/v4l2-i2c-drv.h index 10a2882c3cb..74bf741d1a9 100644 --- a/include/media/v4l2-i2c-drv.h +++ b/include/media/v4l2-i2c-drv.h @@ -22,7 +22,7 @@ */ /* NOTE: the full version of this header is in the v4l-dvb repository - * and allows v4l i2c drivers to be compiled on older kernels as well. + * and allows v4l i2c drivers to be compiled on pre-2.6.26 kernels. * The version of this header as it appears in the kernel is a stripped * version (without all the backwards compatibility stuff) and so it * looks a bit odd. @@ -30,6 +30,9 @@ * If you look at the full version then you will understand the reason * for introducing this header since you really don't want to have all * the tricky backwards compatibility code in each and every i2c driver. + * + * If the i2c driver will never be compiled for pre-2.6.26 kernels, then + * DO NOT USE this header! Just write it as a regular i2c driver. */ #ifndef __V4L2_I2C_DRV_H__ diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index a503e1cee78..5dcb3678552 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -79,7 +79,11 @@ struct v4l2_decode_vbi_line { not yet implemented) since ops provide proper type-checking. */ -/* init: initialize the sensor registors to some sort of reasonable default +/* s_config: if set, then it is always called by the v4l2_i2c_new_subdev* + functions after the v4l2_subdev was registered. It is used to pass + platform data to the subdev which can be used during initialization. + + init: initialize the sensor registors to some sort of reasonable default values. Do not use for new drivers and should be removed in existing drivers. @@ -96,6 +100,7 @@ struct v4l2_decode_vbi_line { struct v4l2_subdev_core_ops { int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); int (*log_status)(struct v4l2_subdev *sd); + int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data); int (*init)(struct v4l2_subdev *sd, u32 val); int (*load_fw)(struct v4l2_subdev *sd); int (*reset)(struct v4l2_subdev *sd, u32 val); |