aboutsummaryrefslogtreecommitdiffstats
path: root/include/media (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-08-16[media] v4l: omap3isp: Drop platform data supportLaurent Pinchart1-158/+0
Platforms using the OMAP3 ISP have all switched to DT, drop platform data support. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-16[media] media: vb2: Remove unused functionsJan Kara1-6/+0
Conversion to the use of pinned pfns made some functions unused. Remove them. Also there's no need to lock mmap_sem in __buf_prepare() anymore. Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-16[media] vb2: Provide helpers for mapping virtual addressesJan Kara1-0/+5
Provide simple helper functions to map virtual address range into an array of pfns / pages. Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-07treewide: fix typos in comment blocksMasahiro Yamada1-1/+1
Looks like the word "contiguous" is often mistyped. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2015-07-17[media] Driver for Toshiba TC358743 HDMI to CSI-2 bridgeMats Randgaard1-0/+131
The driver is tested on our hardware and all the implemented features works as expected. Missing features: - CEC support - HDCP repeater support - IR support Signed-off-by: Mats Randgaard <matrandg@cisco.com> [hans.verkuil@cisco.com: updated copyright year to 2015] [hans.verkuil@cisco.com: update confusing confctl_mutex comment] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17[media] Add helper function for subdev event notificationsLars-Peter Clausen1-0/+4
Add a new helper function called v4l2_subdev_notify_event() which will deliver the specified event to both the v4l2 subdev event queue as well as to the notify callback. The former is typically used by userspace applications to listen to notification events while the later is used by bridge drivers. Combining both into the same function avoids boilerplate code in subdev drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17[media] vb2: Only requeue buffers immediately once streaming is startedSakari Ailus1-0/+2
Buffers can be returned back to videobuf2 in driver's streamon handler. In this case vb2_buffer_done() with buffer state VB2_BUF_STATE_QUEUED will cause the driver's buf_queue vb2 operation to be called, queueing the same buffer again only to be returned to videobuf2 using vb2_buffer_done() and so on. Add a new buffer state VB2_BUF_STATE_REQUEUEING which, when used as the state argument to vb2_buffer_done(), will result in buffers queued to the driver. Using VB2_BUF_STATE_QUEUED will leave the buffer to videobuf2, as it was before "[media] vb2: allow requeuing buffers while streaming". Fixes: ce0eff016f72 ("[media] vb2: allow requeuing buffers while streaming") [mchehab@osg.samsung.com: fix warning: enumeration value 'VB2_BUF_STATE_REQUEUEING' not handled in switch] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v4.1 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-06[media] rc-core: remove the LIRC "protocol"David Härdeman1-20/+18
The LIRC protocol was always a bad fit and if we're ever going to expose protocol numbers in a user-space API, it'd be better to get rid of the LIRC "protocol" first. The sysfs API is kept backwards compatible by always listing the lirc protocol as present and enabled. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-06[media] rc-core: use an IDA rather than a bitmapDavid Härdeman1-2/+2
This patch changes rc-core to use the kernel facilities that are already available for handling unique numbers instead of rolling its own bitmap stuff. Signed-off-by: David Härdeman <david@hardeman.nu> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-06[media] v4l2-dv-timings: add support for reduced blanking v2Prashant Laddha1-1/+5
Added support for reduced blanking version 2 (RB v2) in cvt timings. Standard specifies a fixed vsync pulse of 8 lines to indicate RB v2 timings. Vertical back porch is fixed at 6 lines and vertical front porch is remainder of vertical blanking time. For RB v2, horizontal blanking is fixed at 80 pixels. Horizontal sync is fixed at 32. All horizontal timing counts (active pixels, front, back porches) can be specified upto a precision of 1. RB v2 allows for non standard aspect ratios. In RB v2 vsync does not indicate aspect ratio. In absence of aspect ratio v4l2_detect_cvt() cannot calculate image width from image height. Hence extending the v4l2_detect_cvt() to pass image width in case of RB v2. Signed-off-by: Prashant Laddha <prladdha@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-01Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-ledsLinus Torvalds2-0/+150
Pull LED subsystem updates from Bryan Wu: "In this cycle, we finished to merge patches for LED Flash class driver. Other than that we have some bug fixes and new drivers for LED controllers" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits) leds:lp55xx: fix firmware loading error leds: fix max77693-led build errors leds: fix aat1290 build errors leds: aat1290: pass flags parameter to devm_gpiod_get leds: ktd2692: pass flags parameter to devm_gpiod_get drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c leds: aat1290: add support for V4L2 Flash sub-device DT: aat1290: Document handling external strobe sources leds: max77693: add support for V4L2 Flash sub-device media: Add registration helpers for V4L2 flash sub-devices v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it Documentation: leds: Add description of v4l2-flash sub-device leds: add BCM6358 LED driver leds: add DT binding for BCM6358 LED controller leds: fix brightness changing when software blinking is active Documentation: leds-lp5523: describe master fader attributes leds: lp5523: add master_fader support leds: leds-gpio: Allow compile test if !GPIOLIB leds: leds-gpio: Add missing #include <linux/of.h> gpiolib: Add missing dummies for the unified device properties interface ...
2015-06-22media: Add registration helpers for V4L2 flash sub-devicesJacek Anaszewski1-0/+148
This patch adds helper functions for registering/unregistering LED Flash class devices as V4L2 sub-devices. The functions should be called from the LED subsystem device driver. In case the support for V4L2 Flash sub-devices is disabled in the kernel config the functions' empty versions will be used. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-15v4l: async: Add a pointer to of_node to struct v4l2_subdev, match itSakari Ailus1-0/+2
V4L2 async sub-devices are currently matched (OF case) based on the struct device_node pointer in struct device. LED devices may have more than one LED, and in that case the OF node to match is not directly the device's node, but a LED's node. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-10[media] rc/keymaps: add keytable for Twinhan DTV CAB CIJan Klötzke1-0/+1
This RC map was taken from Christoph Pinkl's patch (http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective mantis based card because the encoding is not known. Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10[media] rc/keymaps: add keytable for Terratec Cinergy S2 HDJan Klötzke1-0/+1
This RC map was taken from Christoph Pinkl's patch (http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective mantis based card because the encoding is not known. Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10[media] rc/keymaps: add keytable for Terratec Cinergy C PCIJan Klötzke1-0/+1
This RC map was taken from Christoph Pinkl's patch (http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective mantis based card because the encoding is not known. Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10[media] rc/keymaps: add RC keytable for TechniSat TS35Jan Klötzke1-0/+1
The TS35 remote is distributed with TechniSat CableStar HD2 cards (mantis chipset). The exact protocol type is unknown, making this rc map probably only usable by mantis cards. Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09[media] v4l2-dv-timings: add interlace support in detect cvt/gtfPrashant Laddha1-2/+4
Extend detect_cvt/gtf API to indicate the format type (interlaced or progressive). In case of interlaced, the vertical front and back porch and vsync values for both (odd,even) fields are considered to derive image height. Populated vsync, vertical front, back porch values in bt timing structure for even and odd fields and updated the flags appropriately. Also modified the functions calling the detect_cvt/gtf(). As of now these functions are calling detect_cvt/gtf() with interlaced flag set to false. Cc: Martin Bugge <marbugge@cisco.com> Cc: Mats Randgaard <matrandg@cisco.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Prashant Laddha <prladdha@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09[media] adv7511: log the currently set infoframesHans Verkuil1-0/+1
The adv7511 sets up InfoFrames that are used when transmitting video. Log the contents of those InfoFrames so it is possible to see exactly what the transmitter is sending. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09[media] adv7842: replace uintX_t by uX for consistencyHans Verkuil1-25/+25
Currently this driver mixes u8/u32 and uint8_t/uint32_t. Standardize on u8/u32. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09[media] adv7511: replace uintX_t by uX for consistencyHans Verkuil1-3/+3
Currently this driver mixes u8/u16 and uint8_t/uint16_t. Standardize on u8/u16. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09[media] v4l2-mem2mem: add support for prepare_bufHans Verkuil1-0/+4
This was never added for some reason, so add it now. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] videodev2.h: add support for transfer functionsHans Verkuil1-0/+2
In the past the transfer function was implied by the colorspace. However, it is an independent entity in its own right. Add support for explicitly choosing the transfer function. This change will allow us to represent linear RGB (as is used by openGL), and it will make it easier to work with decoded video material since most codecs store the transfer function as a separate property as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] rc: set IR_MAX_DURATION to 500 msMauro Carvalho Chehab1-1/+1
The current definition is weird, and produce lots of sparse warnings: drivers/media/i2c/cx25840/cx25840-ir.c:448 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)' drivers/media/i2c/cx25840/cx25840-ir.c:461 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)' drivers/media/i2c/cx25840/cx25840-ir.c:706 cx25840_ir_rx_read() warn: impossible condition '(v > 4294967295) => (0-u32max > u32max)' drivers/media/pci/ivtv/ivtv-queue.c:145 ivtv_queue_move() error: we previously assumed 'steal' could be null (see line 138) drivers/media/rc/streamzap.c:155 sz_push_full_pulse() warn: impossible condition '(rawir.duration > 4294967295) => (0-u32max > u32max)' drivers/media/rc/streamzap.c:169 sz_push_full_pulse() warn: impossible condition '(rawir.duration > 4294967295) => (0-u32max > u32max)' drivers/media/rc/redrat3.c:325 redrat3_us_to_len() warn: impossible condition '(microsec > 4294967295) => (0-u32max > u32max)' drivers/media/rc/redrat3.c:383 redrat3_process_ir_data() warn: impossible condition '(rawir.duration > 4294967295) => (0-u32max > u32max)' drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3676 pvr2_send_request_ex() error: we previously assumed 'write_data' could be null (see line 3648) drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3829 pvr2_send_request_ex() error: we previously assumed 'read_data' could be null (see line 3649) drivers/media/pci/cx23885/cx23888-ir.c:463 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)' drivers/media/pci/cx23885/cx23888-ir.c:476 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)' drivers/media/pci/cx23885/cx23888-ir.c:696 cx23888_ir_rx_read() warn: impossible condition '(v > 4294967295) => (0-u32max > u32max)' Use a more realistic value for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] adv7604/adv7842: replace FMT_CHANGED by V4L2_DEVICE_NOTIFY_EVENTHans Verkuil2-4/+0
This makes it easier for the bridge driver to just passthrough such events to the corresponding device node. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] v4l2-subdev: allow subdev to send an event to the v4l2_device notify functionjean-michel.hautbois@vodalys.com1-0/+2
All drivers use custom notifications, in particular when source changes. The bridge only has to map the subdev that sends it to whatever video node it is connected to. Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] adv7842: Make output format configurable through pad format operationsHans Verkuil1-52/+37
Replace the dummy video format operations by pad format operations that configure the output format. Copied from the adv7604 driver. Note: while arch/blackfin/mach-bf609/boards/ezkit.c uses adv7842_platform_data this source has not been updated because it is broken since the very beginning. It depends on a struct adv7842_output_format that does not exist. And besides that gcc has no support for bf609 so nobody can compile it except by installing a toolchain from ADI. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14[media] rc: nuvoton-cir: Add support for writing wakeup samples via sysfs filter callbackAntti Seppälä1-0/+1
Nuvoton-cir utilizes the encoding capabilities of rc-core to convert scancodes from user space to pulse/space format understood by the underlying hardware. Converted samples are then written to the wakeup fifo along with other necessary configuration to enable wake up functionality. Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: James Hogan <james@albanarts.com> Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14[media] rc: rc-core: Add support for encode_wakeup driversJames Hogan1-0/+3
Add support in rc-core for drivers which implement the wakeup scancode filter by encoding the scancode using the raw IR encoders. This is by way of rc_dev::encode_wakeup which should be set to true to make the allowed wakeup protocols the same as the set of raw IR encoders. As well as updating the sysfs interface to know which wakeup protocols are allowed for encode_wakeup drivers, also ensure that the IR decoders/encoders are loaded when an encode_wakeup driver is registered. Signed-off-by: James Hogan <james@albanarts.com> Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Cc: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14[media] rc: rc-ir-raw: Add scancode encoder callbackJames Hogan1-0/+3
Add a callback to raw ir handlers for encoding and modulating a scancode to a set of raw events. This could be used for transmit, or for converting a wakeup scancode filter to a form that is more suitable for raw hardware wake up filters. Signed-off-by: James Hogan <james@albanarts.com> Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Cc: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12[media] videobuf2: return -EPIPE from DQBUF after the last bufferPhilipp Zabel1-0/+13
If the last buffer was dequeued from a capture queue, let poll return immediately and let DQBUF return -EPIPE to signal there will no more buffers to dequeue until STREAMOFF. The driver signals the last buffer by setting the V4L2_BUF_FLAG_LAST. To reenable dequeuing on the capture queue, the driver must explicitly call vb2_clear_last_buffer_queued. The last buffer queued flag is cleared automatically during STREAMOFF. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace s_mbus_fmt by set_fmt in bridge driversHans Verkuil1-8/+0
Replace all calls to s_mbus_fmt in bridge drivers by calls to the set_fmt pad op. Remove the old try/s_mbus_fmt video ops since they are now no longer used. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace video op g_mbus_fmt by pad op get_fmtHans Verkuil1-4/+0
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses by the get_fmt pad op and remove the video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace enum_mbus_fmt by enum_mbus_codeHans Verkuil1-4/+0
Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kamil Debski <k.debski@samsung.com> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-28[media] v4l2-of: fix compiler errors if CONFIG_OF is undefinedHans Verkuil1-2/+2
You must use static inline otherwise you get these errors if CONFIG_OF is not defined: In file included from drivers/media/platform/soc_camera/soc_camera.c:39:0: include/media/v4l2-of.h:112:13: warning: 'v4l2_of_free_endpoint' defined but not used [-Wunused-function] static void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint) ^ In file included from drivers/media/platform/soc_camera/atmel-isi.c:28:0: include/media/v4l2-of.h:112:13: warning: 'v4l2_of_free_endpoint' defined but not used [-Wunused-function] static void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint) ^ In file included from drivers/media/platform/soc_camera/rcar_vin.c:36:0: include/media/v4l2-of.h:112:13: warning: 'v4l2_of_free_endpoint' defined but not used [-Wunused-function] static void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint) ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-27[media] media: i2c/adp1653: Devicetree support for adp1653Pavel Machek1-3/+5
Add device tree support for adp1653 flash LED driver. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-27[media] v4l: of: Parse variable length properties --- link-frequenciesSakari Ailus1-0/+17
The link-frequencies property is a variable length array of link frequencies in an endpoint. The array is needed by an increasing number of drivers, so it makes sense to add it to struct v4l2_of_endpoint. However, the length of the array is variable and the size of struct v4l2_of_endpoint is fixed since it is allocated by the caller. The options here are 1. to define a fixed maximum limit of link frequencies that has to be the global maximum of all boards. This is seen as problematic since the maximum could be largish, and everyone hitting the problem would need to submit a patch to fix it, or 2. parse the property in every driver. This doesn't sound appealing as two of the three implementations submitted to linux-media were wrong, and one of them was even merged before this was noticed, or 3. change the interface so that allocating and releasing memory according to the size of the array is possible. This is what the patch does. v4l2_of_alloc_parse_endpoint() is just like v4l2_of_parse_endpoint(), but it will allocate the memory resources needed to store struct v4l2_of_endpoint and the additional arrays pointed to by this struct. A corresponding release function v4l2_of_free_endpoint() is provided to release the memory allocated by v4l2_of_alloc_parse_endpoint(). In addition to this, the link-frequencies property is parsed as well, and the result is stored to struct v4l2_of_endpoint field link_frequencies. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-27[media] v4l: of: Instead of zeroing bus_type and bus field separately, unify thisSakari Ailus1-0/+1
Zero the entire struct starting from bus_type. As more fields are added, no changes will be needed in the function to reset their value explicitly. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-27[media] v4l: of: Remove the head field in struct v4l2_of_endpointSakari Ailus1-2/+0
The field is unused. Remove it. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-21Merge branch 'patchwork' into v4l_for_linusMauro Carvalho Chehab14-129/+179
* patchwork: (404 commits) [media] uvcvideo: add support for VIDIOC_QUERY_EXT_CTRL [media] uvcvideo: fix cropcap v4l2-compliance failure [media] media: omap3isp: remove unused clkdev [media] coda: Add tracing support [media] coda: drop dma_sync_single_for_device in coda_bitstream_queue [media] coda: fix fill bitstream errors in nonstreaming case [media] coda: call SEQ_END when the first queue is stopped [media] coda: fail to start streaming if userspace set invalid formats [media] coda: remove duplicate error messages for buffer allocations [media] coda: move parameter buffer in together with context buffer allocation [media] coda: allocate bitstream buffer from REQBUFS, size depends on the format [media] coda: allocate per-context buffers from REQBUFS [media] coda: use strlcpy instead of snprintf [media] coda: bitstream payload is unsigned [media] coda: fix double call to debugfs_remove [media] coda: check kasprintf return value in coda_open [media] coda: bitrate can only be set in kbps steps [media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_remove [media] s5p-mfc: set allow_zero_bytesused flag for vb2_queue_init [media] coda: set allow_zero_bytesused flag for vb2_queue_init ...
2015-04-10[media] media: omap3isp: remove unused clkdevRussell King1-6/+0
No merged platform supplies xclks via platform data. As we want to slightly change the clkdev interface, rather than fixing this unused code, remove it instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-10[media] vb2: add allow_zero_bytesused flag to the vb2_queue structKamil Debski1-0/+2
The vb2: fix bytesused == 0 handling (8a75ffb) patch changed the behavior of __fill_vb2_buffer function, so that if bytesused is 0 it is set to the size of the buffer. However, bytesused set to 0 is used by older codec drivers as as indication used to mark the end of stream. To keep backward compatibility, this patch adds a flag passed to the vb2_queue_init function - allow_zero_bytesused. If the flag is set upon initialization of the queue, the videobuf2 keeps the value of bytesused intact in the OUTPUT queue and passes it to the driver. Reported-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-10[media] vb2: split the io_flags member of vb2_queue into a bit fieldKamil Debski1-13/+5
This patch splits the io_flags member of vb2_queue into a bit field. Instead of an enum with flags separate bit fields were introduced. Signed-off-by: Kamil Debski <k.debski@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] v4l: of: Add v4l2_of_parse_link() functionLaurent Pinchart1-0/+27
The function fills a link data structure with the device node and port number at both the local and remote ends of a link defined by one of its endpoint nodes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] media: entity: Document the media_entity_ops structureLaurent Pinchart1-0/+9
Currently, there's no documentation for the structure. Add a kernel-doc nano documentation to it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] media: davinci: vpfe_capture: embed video_deviceLad, Prabhakar1-1/+1
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] saa7146: embed video_deviceHans Verkuil1-2/+2
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] media: i2c: add support for omnivision's ov2659 sensorBenoit Parrot1-0/+34
this patch adds support for omnivision's ov2659 sensor, the driver supports following features: 1: Asynchronous probing 2: DT support 3: Media controller support Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] v4l: mt9p031: Convert to the gpiod APILaurent Pinchart1-2/+0
This simplifies platform data and DT integration. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] V4L: add CCF support to the v4l2_clk APIGuennadi Liakhovetski1-0/+2
V4L2 clocks, e.g. used by camera sensors for their master clock, do not have to be supplied by a different V4L2 driver, they can also be supplied by an independent source. In this case the standart kernel clock API should be used to handle such clocks. This patch adds support for such cases. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>