From 1351a58ce0481afd80b756ecd9307c9fbe9f39b4 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 16 Apr 2009 13:30:38 -0300 Subject: V4L/DVB (11517): v4l: remove driver-core BUS_ID_SIZE The name size limit is gone from the driver core, the BUS_ID_SIZE value will be removed. Acked-by: Greg Kroah-Hartman Signed-off-by: Kay Sievers Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index 0dd3e8e8653..9afd39fb2cf 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h @@ -30,7 +30,7 @@ basic V4L2 device-level support. */ -#define V4L2_DEVICE_NAME_SIZE (BUS_ID_SIZE + 16) +#define V4L2_DEVICE_NAME_SIZE (20 + 16) struct v4l2_device { /* dev->driver_data points to this struct. -- cgit v1.2.3 From 594bb46dbc63934bc65fa95743f83204bd26a641 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 24 Apr 2009 12:53:51 -0300 Subject: V4L/DVB (11607): soc-camera: add a free_bus method to struct soc_camera_link Currently pcm990 camera bus-width management functions request a GPIO and never free it again. With this approach the GPIO extender driver cannot be unloaded once camera drivers have been loaded, also unloading theb i2c-pxa bus driver produces errors, because the GPIO extender driver cannot unregister properly. Another problem is, that if camera drivers are once loaded before the GPIO extender driver, the platform code marks the GPIO unavailable and only a reboot helps to recover. Adding an explicit free_bus method and using it in mt9m001 and mt9v022 drivers fixes these problems. Signed-off-by: Guennadi Liakhovetski Acked-by: Eric Miao Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 37013688af4..396c32550e0 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -107,6 +107,7 @@ struct soc_camera_link { */ int (*set_bus_param)(struct soc_camera_link *, unsigned long flags); unsigned long (*query_bus_param)(struct soc_camera_link *); + void (*free_bus)(struct soc_camera_link *); }; static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev) -- cgit v1.2.3 From eff505fa1511b753b7cfb397a754b8ff4367cd55 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 24 Apr 2009 12:55:48 -0300 Subject: V4L/DVB (11609): soc-camera: remove an extra device generation from struct soc_camera_host Make camera devices direct children of host platform devices, move the inheritance management into the soc_camera.c core driver. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 396c32550e0..bef5e81d693 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -60,7 +60,7 @@ struct soc_camera_file { struct soc_camera_host { struct list_head list; - struct device dev; + struct device *dev; unsigned char nr; /* Host number */ void *priv; const char *drv_name; @@ -117,7 +117,7 @@ static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev) static inline struct soc_camera_host *to_soc_camera_host(struct device *dev) { - return container_of(dev, struct soc_camera_host, dev); + return dev_get_drvdata(dev); } extern int soc_camera_host_register(struct soc_camera_host *ici); -- cgit v1.2.3 From 102e78136446faca7d7d241b628c5bd0e0d61d5d Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 2 May 2009 10:12:50 -0300 Subject: V4L/DVB (11671): v4l2: add v4l2_device_set_name() Add a utility function that can be used to setup the v4l2_device's name field in a standard manner. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-device.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include') diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index 9afd39fb2cf..5d5d550e63a 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h @@ -53,10 +53,31 @@ struct v4l2_device { dev may be NULL in rare cases (ISA devices). In that case you must fill in the v4l2_dev->name field before calling this function. */ int __must_check v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); + +/* Optional function to initialize the name field of struct v4l2_device using + the driver name and a driver-global atomic_t instance. + This function will increment the instance counter and returns the instance + value used in the name. + + Example: + + static atomic_t drv_instance = ATOMIC_INIT(0); + + ... + + instance = v4l2_device_set_name(&v4l2_dev, "foo", &drv_instance); + + The first time this is called the name field will be set to foo0 and + this function returns 0. If the name ends with a digit (e.g. cx18), + then the name will be set to cx18-0 since cx180 looks really odd. */ +int v4l2_device_set_name(struct v4l2_device *v4l2_dev, const char *basename, + atomic_t *instance); + /* Set v4l2_dev->dev to NULL. Call when the USB parent disconnects. Since the parent disappears this ensures that v4l2_dev doesn't have an invalid parent pointer. */ void v4l2_device_disconnect(struct v4l2_device *v4l2_dev); + /* Unregister all sub-devices and any other resources related to v4l2_dev. */ void v4l2_device_unregister(struct v4l2_device *v4l2_dev); -- cgit v1.2.3 From b5b2b7ed569cedac4f5da38e08b01c88443187bd Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 2 May 2009 10:58:51 -0300 Subject: V4L/DVB (11673): v4l2-device: unregister i2c_clients when unregistering the v4l2_device. Until now I relied on i2c_del_adapter to unregister the i2c_clients for me, however, if the i2c bus is a platform bus then it is never deleted. So instead I need to unregister i2c clients when unregistering the v4l2_device. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 17856081c80..a503e1cee78 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -230,12 +230,16 @@ struct v4l2_subdev_ops { #define V4L2_SUBDEV_NAME_SIZE 32 +/* Set this flag if this subdev is a i2c device. */ +#define V4L2_SUBDEV_FL_IS_I2C (1U << 0) + /* Each instance of a subdev driver should create this struct, either stand-alone or embedded in a larger struct. */ struct v4l2_subdev { struct list_head list; struct module *owner; + u32 flags; struct v4l2_device *v4l2_dev; const struct v4l2_subdev_ops *ops; /* name must be unique */ @@ -264,6 +268,7 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd, BUG_ON(!ops || !ops->core); sd->ops = ops; sd->v4l2_dev = NULL; + sd->flags = 0; sd->name[0] = '\0'; sd->grp_id = 0; sd->priv = NULL; -- cgit v1.2.3 From 0fd327bd0d1b508eb64da3876098f6f43bfc1509 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Thu, 7 May 2009 13:25:32 -0300 Subject: V4L/DVB (11705): soc-camera: prepare for the platform driver conversion Add a platform driver to soc_camera.c. This way we preserve backwards compatibility with existing platforms and can start converting them one by one to the new platform-device soc-camera interface. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index bef5e81d693..23ecead35e7 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -92,11 +92,16 @@ struct soc_camera_host_ops { #define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) #define SOCAM_SENSOR_INVERT_DATA (1 << 4) +struct i2c_board_info; + struct soc_camera_link { /* Camera bus id, used to match a camera and a bus */ int bus_id; /* Per camera SOCAM_SENSOR_* bus flags */ unsigned long flags; + int i2c_adapter_id; + struct i2c_board_info *board_info; + const char *module_name; /* Optional callbacks to power on or off and reset the sensor */ int (*power)(struct device *, int); int (*reset)(struct device *); -- cgit v1.2.3 From 40199c50b891d24d1a8f1d480f886680a3ac9b74 Mon Sep 17 00:00:00 2001 From: Chaithrika U S Date: Thu, 7 May 2009 09:29:25 -0300 Subject: V4L/DVB (11742): TI THS7303 video amplifier driver code This patch adds driver for TI THS7303 video amplifier. This driver is implemented as a v4l2 sub device. Tested on TI DM646x EVM. This version has updates based on review comments by Mauro Chehab. Signed-off-by: Chaithrika U S Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-chip-ident.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 1be461a2907..fbeb98f8ee2 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h @@ -137,6 +137,9 @@ enum { /* module saa7191: just ident 7191 */ V4L2_IDENT_SAA7191 = 7191, + /* module ths7303: just ident 7303 */ + V4L2_IDENT_THS7303 = 7303, + /* module wm8739: just ident 8739 */ V4L2_IDENT_WM8739 = 8739, -- cgit v1.2.3 From 06e61f8d5f5df68104168ac20d0527ecee13638a Mon Sep 17 00:00:00 2001 From: Chaithrika U S Date: Thu, 7 May 2009 09:30:01 -0300 Subject: V4L/DVB (11743): Analog Devices ADV7343 video encoder driver Add ADV7343 I2C based video encoder driver. This follows the v4l2-subdev framework. This driver has been tested on TI DM646x EVM. It has been tested for Composite and Component outputs. Updates as per review by Mauro Chehab, added support for more standards supported by the encoder. Also adding the missed out signed-offs.Tested only NTSC and PAL standards. [hverkuil@xs4all.nl: s_routing API changed, updated driver to use new API] Signed-off-by: Manjunath Hadli Signed-off-by: Brijesh Jadav Signed-off-by: Chaithrika U S Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/adv7343.h | 23 +++++++++++++++++++++++ include/media/v4l2-chip-ident.h | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 include/media/adv7343.h (limited to 'include') diff --git a/include/media/adv7343.h b/include/media/adv7343.h new file mode 100644 index 00000000000..d6f8a4e1a1f --- /dev/null +++ b/include/media/adv7343.h @@ -0,0 +1,23 @@ +/* + * ADV7343 header file + * + * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed .as is. WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef ADV7343_H +#define ADV7343_H + +#define ADV7343_COMPOSITE_ID (0) +#define ADV7343_COMPONENT_ID (1) +#define ADV7343_SVIDEO_ID (2) + +#endif /* End of #ifndef ADV7343_H */ diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index fbeb98f8ee2..4d7e2272c42 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h @@ -140,6 +140,9 @@ enum { /* module ths7303: just ident 7303 */ V4L2_IDENT_THS7303 = 7303, + /* module adv7343: just ident 7343 */ + V4L2_IDENT_ADV7343 = 7343, + /* module wm8739: just ident 8739 */ V4L2_IDENT_WM8739 = 8739, -- cgit v1.2.3 From 8475cbcb0f885189969915eb3680d10fc525d722 Mon Sep 17 00:00:00 2001 From: Dmitri Belimov Date: Mon, 11 May 2009 08:16:06 -0300 Subject: V4L/DVB (11775): tuner: add support Philips MK5 tuner Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index 7d4e2db7807..735a2a94116 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -124,6 +124,7 @@ #define TUNER_XC5000 76 /* Xceive Silicon Tuner */ #define TUNER_TCL_MF02GIP_5N 77 /* TCL MF02GIP_5N */ #define TUNER_PHILIPS_FMD1216MEX_MK3 78 +#define TUNER_PHILIPS_FM1216MK5 79 /* tv card specific */ #define TDA9887_PRESENT (1<<0) -- cgit v1.2.3 From 1df8e9861cf9fac5737ccb61c7f7fefa77711d40 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 13 May 2009 16:48:07 -0300 Subject: V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needs In the standard device driver binding model, the name field of struct i2c_client is used to match devices to their drivers, so we must stop using it for internal purposes. Define a separate field in struct IR_i2c as a replacement, and use it. Signed-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- include/media/ir-kbd-i2c.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 07963d70540..6a9719c8e90 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h @@ -15,6 +15,7 @@ struct IR_i2c { unsigned char old; struct delayed_work work; + char name[32]; char phys[32]; int (*get_key)(struct IR_i2c*, u32*, u32*); }; -- cgit v1.2.3 From c668f32dca105d876e51862a003a302fa61e4ae4 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 13 May 2009 16:48:50 -0300 Subject: V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model Let card drivers probe for IR receiver devices and instantiate them if found. Ultimately it would be better if we could stop probing completely, but I suspect this won't be possible for all card types. There's certainly room for cleanups. For example, some drivers are sharing I2C adapter IDs, so they also had to share the list of I2C addresses being probed for an IR receiver. Now that each driver explicitly says which addresses should be probed, maybe some addresses can be dropped from some drivers. Also, the special cases in saa7134-i2c should probably be handled on a per-board basis. This would be more efficient and less risky than always probing extra addresses on all boards. I'll give it a try later. Signed-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- include/media/ir-kbd-i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 6a9719c8e90..94a77b15a30 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h @@ -7,7 +7,7 @@ struct IR_i2c; struct IR_i2c { IR_KEYTAB_TYPE *ir_codes; - struct i2c_client c; + struct i2c_client *c; struct input_dev *input; struct ir_input_state ir; -- cgit v1.2.3 From 4d7a2d6721a6380d4ffc26d81d2c8232fd0d2dfc Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 13 May 2009 16:49:32 -0300 Subject: V4L/DVB (11845): ir-kbd-i2c: Use initialization data For specific boards, pass initialization data to ir-kbd-i2c instead of modifying the settings after the device is initialized. This is more efficient and easier to read. Signed-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- include/media/ir-kbd-i2c.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 94a77b15a30..3ad4ed5402f 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h @@ -19,4 +19,11 @@ struct IR_i2c { char phys[32]; int (*get_key)(struct IR_i2c*, u32*, u32*); }; + +/* Can be passed when instantiating an ir_video i2c device */ +struct IR_i2c_init_data { + IR_KEYTAB_TYPE *ir_codes; + const char *name; + int (*get_key)(struct IR_i2c*, u32*, u32*); +}; #endif -- cgit v1.2.3 From 5ddc9b100fc96e8f3c6d435cecd9d09e5b9673f9 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sun, 7 Jun 2009 21:39:03 -0300 Subject: V4L/DVB (11933): tuner-simple, tveeprom: Add Philips FQ1216LME MK3 analog tuner Signed-off-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index 735a2a94116..cbf97f45fbe 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -125,6 +125,7 @@ #define TUNER_TCL_MF02GIP_5N 77 /* TCL MF02GIP_5N */ #define TUNER_PHILIPS_FMD1216MEX_MK3 78 #define TUNER_PHILIPS_FM1216MK5 79 +#define TUNER_PHILIPS_FQ1216LME_MK3 80 /* Active loopthrough, no FM */ /* tv card specific */ #define TDA9887_PRESENT (1<<0) -- cgit v1.2.3 From 49809d6a511960e5ccfb85b780894f45ac119065 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 7 Jun 2009 12:10:39 -0300 Subject: V4L/DVB (11970): gspca - ov519: Add support for the ov518 bridge. Signed-off-by: Hans de Goede Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ebb2ea6b499..f24eceecc5a 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -347,7 +347,8 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ -#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ +#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ +#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ /* * F O R M A T E N U M E R A T I O N -- cgit v1.2.3 From ecfe0cfa3cae9a8402df12d81b159d851b61cf29 Mon Sep 17 00:00:00 2001 From: Uri Shkolnik Date: Thu, 12 Mar 2009 10:10:40 -0300 Subject: V4L/DVB (11239): sdio: add cards ids for sms (Siano Mobile Silicon) MDTV receivers sdio: add cards id for sms (Siano Mobile Silicon) MDTV receivers Add SDIO vendor ID, and multiple device IDs for various SMS-based MDTV SDIO adapters. Signed-off-by: Uri Shkolnik Signed-off-by: Mauro Carvalho Chehab --- include/linux/mmc/sdio_ids.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index c7211ab6dd4..39751c8cde9 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -28,4 +28,12 @@ #define SDIO_DEVICE_ID_MARVELL_8688WLAN 0x9104 #define SDIO_DEVICE_ID_MARVELL_8688BT 0x9105 +#define SDIO_VENDOR_ID_SIANO 0x039a +#define SDIO_DEVICE_ID_SIANO_NOVA_B0 0x0201 +#define SDIO_DEVICE_ID_SIANO_NICE 0x0202 +#define SDIO_DEVICE_ID_SIANO_VEGA_A0 0x0300 +#define SDIO_DEVICE_ID_SIANO_VENICE 0x0301 +#define SDIO_DEVICE_ID_SIANO_NOVA_A0 0x1100 +#define SDIO_DEVICE_ID_SIANO_STELLAR 0x5347 + #endif -- cgit v1.2.3