summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
Commit message (Collapse)AuthorAgeFilesLines
* rc: print correct variable for z8f0811Arnd Bergmann2016-11-111-1/+1
| | | | | | | | | | | | | | | A recent rework accidentally left a debugging printk untouched while changing the meaning of the variables, leading to an uninitialized variable being printed: drivers/media/i2c/ir-kbd-i2c.c: In function 'get_key_haup_common': drivers/media/i2c/ir-kbd-i2c.c:62:2: error: 'toggle' may be used uninitialized in this function [-Werror=maybe-uninitialized] This prints the correct one instead, as we did before the patch. Fixes: 00bb820755ed ("[media] rc: Hauppauge z8f0811 can decode RC6") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [media] rc: Hauppauge z8f0811 can decode RC6Sean Young2016-09-221-30/+60
| | | | | | | The hardware does not decode the 16, 20 or 24 bit variety. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] s5c73m3: Fix entity function assignment for the OIF subdevSylwester Nawrocki2016-09-221-1/+1
| | | | | | | | Suppresses warnings like: s5p-fimc-md camera: Entity type for entity S5C73M3-OIF was not initialized! Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] s5k6a3: Add missing entity function initializationSylwester Nawrocki2016-09-221-0/+1
| | | | | | | | Suppresses warning like: s5p-fimc-md camera: Entity type for entity S5K6A3 13-0010 was not initialized! Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: adv7180: fill in mbus format in set_fmtNiklas Söderlund2016-09-191-2/+4
| | | | | | | | | If the V4L2_SUBDEV_FORMAT_TRY is used in set_fmt the width, height etc would not be filled. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7180: rcar-vin: change mbus format to UYVYNiklas Söderlund2016-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The media bus format reported by the adv7180 is wrong. Steve Longerbeam posted a patch which changed the format to UYVY8_2X8 with the commit message: Change the media bus format from YUYV8_2X8 to UYVY8_2X8. Colors now look correct when capturing with the i.mx6 backend. The other option is to set the SWPC bit in register 0x27 to swap the Cr and Cb output samples. The rcar-vin driver was developed and tested with the adv7180 and therefor suffers from the same issue, looking for the wrong media bus format. The two errors corrected each other. This patch takes Steve's patch and merge it with a fix for rcar-vin driver. The rcar-vin driver is used used in together with the adv7180 och Koelsch and this ensures it will not break while fixing the adv7180 issue. I checked wit Steve and he was fine with me merging the patches. ADV7180 parts: Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Suggested-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ad5820: use __maybe_unused for PM functionsArnd Bergmann2016-09-191-11/+2
| | | | | | | | | | | | | | | | | | The new ad5820 driver uses #ifdef to hide the suspend/resume functions, but gets it wrong when CONFIG_PM_SLEEP is disabled: drivers/media/i2c/ad5820.c:286:12: error: 'ad5820_resume' defined but not used [-Werror=unused-function] drivers/media/i2c/ad5820.c:274:12: error: 'ad5820_suspend' defined but not used [-Werror=unused-function] This replaces the #ifdef with a __maybe_unused annotation that is simpler and harder to get wrong, avoiding the warning. Fixes: bee3d5115611 ("[media] ad5820: Add driver for auto-focus coil") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] constify local structuresJulia Lawall2016-09-191-1/+1
| | | | | | | | | | | | | | | | | | | For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches <joe@perches.com>. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ov9650: add support for asynchronous probingJavier Martinez Canillas2016-09-191-1/+6
| | | | | | | | | | Allow the sub-device to be probed asynchronously so a bridge driver that's waiting for the device can be notified and its .bound callback executed. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: H . Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media Kconfig: improve the spi integrationHans Verkuil2016-09-191-1/+1
| | | | | | | | The SPI driver looked a bit lonely in the config menu, and it didn't support the autoselect. Shift things around a bit so it looks more logical. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ad5820: Use bool for boolean valuesSakari Ailus2016-09-091-9/+10
| | | | | | | | The driver used integers for what boolean would have been a better fit. Use boolean instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Add support for 14 and 16 bits per sample depthsSakari Ailus2016-09-092-1/+9
| | | | | | | | SMIA++ supports 14 and 16 bits per pixel formats as well. Add support to these formats in the driver. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: mt9m111: move mt9m111 out of soc_cameraRobert Jarzmik2016-09-095-3/+13
| | | | | | | | | | As the mt9m111 is now working as a standalone v4l2 subdevice sensor, move it out of soc_camera directory and sever its dependency on soc_camera. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: mt9m111: use only the SRGB colorspaceRobert Jarzmik2016-09-091-4/+4
| | | | | | | | | mt9m111 being a camera sensor, its colorspace should always be SRGB, for both RGB based formats or YCbCr based ones. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: mt9m111: make a standalone v4l2 subdeviceRobert Jarzmik2016-09-091-36/+15
| | | | | | | | | | | | | | | | | Remove the soc_camera adherence. Mostly the change removes the power manipulation provided by soc_camera, and instead : - powers on the sensor when the s_power control is activated - powers on the sensor in initial probe - enables and disables the MCLK provided to it in power on/off This patch also drops support for inverters on synchronisation and clock lines. It is assumed, if any board ever needs such inverters, support for them can be added in the future Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media/i2c: Delete owner assignmentMarkus Elfring2016-09-0611-11/+0
| | | | | | | | | | The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Remove set_xclk() callback from hwconfigSakari Ailus2016-09-051-32/+17
| | | | | | | | | The clock framework is generally so well supported that there's no reason to keep this one around. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Switch to gpiod API for GPIO controlSakari Ailus2016-09-052-25/+12
| | | | | | | | Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Constify the regs argument to smiapp_write_8s()Sakari Ailus2016-09-051-7/+5
| | | | | | | | The data may now be const as well. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Return -EPROBE_DEFER if the clock cannot be obtainedSakari Ailus2016-09-051-2/+3
| | | | | | | | | The clock may be provided by a driver which is yet to probe. Print the actual error code as well. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Rename smiapp_platform_data as smiapp_hwconfigSakari Ailus2016-09-053-73/+73
| | | | | | | | | This is really configuration to the driver originating from DT or elsewhere. Do not call it platform data. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] smiapp: Unify enforced and need-based 8-bit readSakari Ailus2016-09-051-11/+11
| | | | | | | | Unify enforced 8-bit read access with that based on actual need. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] tvp5150: use sd internal ops .registered instead .registered_asyncJavier Martinez Canillas2016-08-241-2/+6
| | | | | | | | | | | | | | | | | The driver is using the struct v4l2_subdev_core_ops .registered_async callback to register the connector entities and create the pad links after the subdev entity has been registered with the media device. But the .registered_async callback isn't needed since the v4l2 core already calls the struct v4l2_subdev_internal_ops .registered callback in v4l2_device_register_subdev(), after media_device_register_entity(). So, use the .registered() callback instead of the .registered_async() that is going to be removed in a following patch since isn't needed. Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7511: fix error return code in adv7511_probe()Wei Yongjun2016-08-241-0/+1
| | | | | | | | Fix to return error code -ENOMEM from the i2c client register error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] v4l2-subdev: rename cropcap to g_pixelaspectHans Verkuil2016-08-241-6/+6
| | | | | | | | The old cropcap video op is now only used to pass the pixelaspect ratio, so rename it. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] v4l2: remove g/s_crop from video opsHans Verkuil2016-08-2416-426/+427
| | | | | | | | | | | | | | Replace all calls to g/s_crop by calls to the get/set_selection pad ops. Remove the old g/s_crop video ops since they are now no longer used. The cropcap video op is now only used to pass pixelaspect information, and is only needed if the pixelaspect is not 1:1. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: adv7180: add power pin controlSteve Longerbeam2016-08-242-1/+28
| | | | | | | | | | | Some targets control the ADV7180 power pin via a gpio, so add optional support for "powerdown" pin control. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Tested-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: adv7180: define more registersSteve Longerbeam2016-08-241-24/+49
| | | | | | | | | | Replace hard-coded addresses with new register macro defines. No functional changes. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ad9389b: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar2016-08-241-18/+4
| | | | | | | | | | | | | | | | | | | | | The workqueue work_queue is involved in EDID (Extended Display Identification Data) handling. It has a single work item(&state->edid_handler) and hence doesn't require ordering. It is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. &state->edid_handler is a self requeueing work item and it has been been sync cancelled in ad9389b_remove() to ensure that nothing is pending when the driver is disconnected. The unused label err_unreg has also been dropped. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ad5820: fix one smatch warningMauro Carvalho Chehab2016-08-241-1/+1
| | | | | | drivers/media/i2c/ad5820.c:61:24: error: dubious one-bit signed bitfield Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ad5820: Add driver for auto-focus coilPavel Machek2016-08-243-0/+388
| | | | | | | | | | This adds support for AD5820 autofocus coil, found for example in Nokia N900 smartphone. Signed-off-by: Pavel Machek <pavel@ucw.cz> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: adv7180: Fix broken interrupt register accessSteve Longerbeam2016-07-281-9/+9
| | | | | | | | | | | | | Access to the interrupt page registers has been broken since at least commit 3999e5d01da7 ("[media] adv7180: Do implicit register paging"). That commit forgot to add the interrupt page number to the register defines. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Tested-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7511: fix VIC autodetectHans Verkuil2016-07-281-4/+20
| | | | | | | | | | | The adv7511 will automatically fill in the VIC code in the AVI InfoFrame based on the timings of the incoming pixelport signals. However, to have this work correctly it needs to specify the fps value in a register. After doing this the proper VIC code is filled in. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7511: the h/vsync polarities were always positiveHans Verkuil2016-07-121-0/+5
| | | | | | | | Correctly set the h/vsync polarities instead of keeping to the default (positive). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7604/adv7842: fix quantization range handlingHans Verkuil2016-07-122-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of bugs that appeared when support for mediabus formats was added: - Support for V4L2_DV_RGB_RANGE_FULL/LIMITED should only be enabled for HDMI RGB formats, not for YCbCr formats. Since, as the name says, this setting is for RGB only. So read the InfoFrame to check the format. - the quantization range for the pixelport depends on whether the mediabus code is RGB or not: if it is RGB, then produce full range RGB values, otherwise produce limited range YCbCr values. This means that the op_656_range and alt_data_sat fields of the platform data are no longer used and these will be removed in a following patch. - when setting up a new format the RGB quantization range settings were never updated. Do so, since this depends on the format. - fix the log_status output which was confusing and incorrect. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7511: fix quantization range handlingHans Verkuil2016-07-121-13/+17
| | | | | | | | | | | | | | | | | | | | Commit 1fb69bfd29e4b2e5e93922105326dd6cbd5ef6eb (adv7511: improve colorspace handling) introduced a number of bugs, specifically with regards to YCbCr output and quantization range handling: - if the output is not RGB, then disable the full-to-limited range CSC matrix since that is meant for RGB formats. YCbCr formats are always limited range, so there is nothing to convert. (OK, full range YCbCr is possible, but we don't support that right now). - the mediabus code that was passed to adv7511_set_fmt was always cleared by the memset in adv7511_fill_format. This made it effectively impossible to select YCbCr output. - adv7511_set_fmt never updated the rgb quantization range. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] adv7511: drop adv7511_set_IT_content_AVI_InfoFrameHans Verkuil2016-07-121-15/+0
| | | | | | | | | | The IT Content bit has nothing to do with CE vs IT timings. Delete this code. This will also fix a bug where this could override the 'content type' control, which is actually the correct place to set/clear the ITC bit. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media/i2c: drop the last users of the ctrl core opsHans Verkuil2016-07-126-42/+0
| | | | | | | | | Nobody is using these ops anymore, so remove these callbacks from the subdev drivers that still have them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* Merge branch 'topic/cec' into patchworkMauro Carvalho Chehab2016-07-084-107/+1018
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * topic/cec: [media] DocBook/media: add CEC documentation [media] s5p_cec: get rid of an unused var [media] move s5p-cec to staging [media] vivid: add CEC emulation [media] cec: s5p-cec: Add s5p-cec driver [media] cec: adv7511: add cec support [media] cec: adv7842: add cec support [media] cec: adv7604: add cec support [media] cec: add compat32 ioctl support [media] cec/TODO: add TODO file so we know why this is still in staging [media] cec: add HDMI CEC framework (api) [media] cec: add HDMI CEC framework (adapter) [media] cec: add HDMI CEC framework (core) [media] cec-funcs.h: static inlines to pack/unpack CEC messages [media] cec.h: add cec header [media] cec-edid: add module for EDID CEC helper functions [media] cec.txt: add CEC framework documentation [media] rc: Add HDMI CEC protocol handling
| * [media] cec: adv7511: add cec supportHans Verkuil2016-06-282-8/+401
| | | | | | | | | | | | | | | | | | | | | | Add CEC support to the adv7511 driver. Signed-off-by: Hans Verkuil <hansverk@cisco.com> [k.debski@samsung.com: Merged changes from CEC Updates commit by Hans Verkuil] Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] cec: adv7842: add cec supportHans Verkuil2016-06-282-63/+313
| | | | | | | | | | | | | | Add CEC support to the adv7842 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] cec: adv7604: add cec supportHans Verkuil2016-06-282-36/+304
| | | | | | | | | | | | | | | | | | | | | | | | Add CEC support to the adv7604 driver. Signed-off-by: Hans Verkuil <hansverk@cisco.com> [k.debski@samsung.com: Merged changes from CEC Updates commit by Hans Verkuil] [k.debski@samsung.com: add missing methods cec/io_write_and_or] [k.debski@samsung.com: change adv7604 to adv76xx in added functions] [hansverk@cisco.com: use _clr_set instead of _and_or] Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] adv7604: Add support for hardware resetDragos Bogdan2016-07-081-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The part can be reset by a low pulse on the RESET pin (i.e. a hardware reset) with a minimum width of 5 ms. It is recommended to wait 5 ms after the low pulse before an I2C write is performed to the part. For safety reasons, the delays will be between 5 and 10 ms. The RESET pin can be tied high, so the GPIO is optional. Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] adv7604: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar2016-07-081-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The workqueue "work_queues" enables hotplugging. It has a single work item(&state->delayed_work_enable_hotplug) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been sync cancelled in adv76xx_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tc358743: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar2016-07-081-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The workqueue "work_queues" enables hotplugging. It has a single work item(&state->delayed_work_enable_hotplug) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been sync cancelled in tc358743_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] adv7842: Remove deprecated create_singlethread_workqueueBhaktipriya Shridhar2016-07-081-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The workqueue "work_queues" enables hotplugging. It has a single work item(&state->delayed_work_enable_hotplug) and hence doesn't require ordering. Also, it is not being used on a memory reclaim path. Hence, the singlethreaded workqueue has been replaced with the use of system_wq. System workqueues have been able to handle high level of concurrency for a long time now and hence it's not required to have a singlethreaded workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue created with create_singlethread_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantee unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. Work item has been sync cancelled in adv7842_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] adv7604: Don't ignore pad number in subdev DV timings pad operationsLaurent Pinchart2016-06-281-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dv_timings_cap() and enum_dv_timings() pad operations take a pad number as an input argument and return the DV timings capabilities and list of supported DV timings for that pad. Commit bd3e275f3ec0 ("[media] media: i2c: adv7604: Use v4l2-dv-timings helpers") broke this as it started ignoring the pad number, always returning the information associated with the currently selected input. Fix it. Fixes: bd3e275f3ec0 ("[media] media: i2c: adv7604: Use v4l2-dv-timings helpers") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9v032: Add V4L2 controls for AEC and AGCMarkus Pargmann2016-06-281-58/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds V4L2 controls for Auto Exposure Control and Auto Gain Control settings. These settings include low pass filter, update frequency of these settings and the update interval for those units. [Avoid forward declarations] [Fix 80 columns limit violation] [Rename controls to avoid underscores in names] [Fix the AEC maximum shutter width on MT9V032] Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9v032: Do not unset master_modeMarkus Pargmann2016-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power_on function of the driver resets the chip and sets the CHIP_CONTROL register to 0. This switches the operating mode to slave. The s_stream function sets the correct mode. But this caused problems on a board where the camera chip is operated as master. The camera started after a random amount of time streaming an image, I observed between 10 and 300 seconds. The STRFM_OUT and STLN_OUT pins are not connected on this board which may cause some issues in slave mode. I could not find any documentation about this. Keeping the chip in master mode after the reset helped to fix this issue for me. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9v032: Remove duplicate test for I2C_FUNC_SMBUS_WORD_DATA ↵Axel Lin2016-06-281-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality Since commit b42261078a91 ("regmap: i2c: fallback to SMBus if the adapter does not support standard I2C"), regmap-i2c will check the I2C_FUNC_SMBUS_[BYTE|WORD]_DATA functionality based on the regmap_config setting if the adapter does not support standard I2C. So remove the I2C_FUNC_SMBUS_WORD_DATA functionality check in the driver code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>