Re: [PATCH] v4l-ioctl: Fix typo on v4l_print_frmsizeenum

2017-09-12 Thread Laurent Pinchart
Hi Ricardo, Thank you for the patch. On Friday, 8 September 2017 18:47:10 EEST Ricardo Ribalda Delgado wrote: > max_width and max_height are swap with step_width and step_height. > > Signed-off-by: Ricardo Ribalda Delgado > --- > > Since that this bug has been here

cron job: media_tree daily build: WARNINGS

2017-09-12 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Wed Sep 13 05:00:26 CEST 2017 media-tree git hash:1efdf1776e2253b77413c997bed862410e4b6aaf media_build

Re: [PATCH v3 4/6] [media] exynos-gsc: Add hardware rotation limits

2017-09-12 Thread Hoegeun Kwon
Hi Sylwester, On 09/11/2017 06:35 PM, Sylwester Nawrocki wrote: On 09/08/2017 08:02 AM, Hoegeun Kwon wrote: The hardware rotation limits of gsc depends on SOC (Exynos 5250/5420/5433). Distinguish them and add them to the driver data. Signed-off-by: Hoegeun Kwon ---

Re: [PATCH v2 3/8] v4l: vsp1: Convert display lists to use new fragment pool

2017-09-12 Thread Laurent Pinchart
Hi Kieran, On Monday, 11 September 2017 23:27:39 EEST Kieran Bingham wrote: > On 17/08/17 13:13, Laurent Pinchart wrote: > > On Monday 14 Aug 2017 16:13:26 Kieran Bingham wrote: > >> Adapt the dl->body0 object to use an object from the fragment pool. > >> This greatly reduces the pressure on the

Re: [PATCH v2 2/8] v4l: vsp1: Provide a fragment pool

2017-09-12 Thread Laurent Pinchart
Hi Kieran, On Monday, 11 September 2017 23:30:25 EEST Kieran Bingham wrote: > On 17/08/17 13:13, Laurent Pinchart wrote: > > On Monday 14 Aug 2017 16:13:25 Kieran Bingham wrote: > >> Each display list allocates a body to store register values in a dma > >> accessible buffer from a dma_alloc_wc()

Re: as3645a flash userland interface

2017-09-12 Thread Pavel Machek
On Tue 2017-09-12 20:53:33, Jacek Anaszewski wrote: > Hi Pavel, > > On 09/12/2017 12:36 PM, Pavel Machek wrote: > > Hi! > > > > There were some changes to as3645a flash controller. Before we have > > stable interface we have to keep forever I want to ask: > > Note that we have already two LED

Re: [media] s5p-mfc: Adjust a null pointer check in four functions

2017-09-12 Thread SF Markus Elfring
> Generating patch is only part of the story, I can follow this view in principle. > it seems the patch is not sent properly I got an other impression. > and tags which should be in SMTP header end up in the message body. I agree that extra message fields were presented by the git software

[PATCH] [media] s3c-camif: fix out-of-bounds array access

2017-09-12 Thread Arnd Bergmann
While experimenting with older compiler versions, I ran into a warning that no longer shows up on gcc-4.8 or newer: drivers/media/platform/s3c-camif/camif-capture.c: In function '__camif_subdev_try_format': drivers/media/platform/s3c-camif/camif-capture.c:1265:25: error: array subscript is

Re: [PATCH v2 5/8] v4l: vsp1: Refactor display list configure operations

2017-09-12 Thread Laurent Pinchart
Hi Kieran, On Tuesday, 12 September 2017 00:16:50 EEST Kieran Bingham wrote: > On 17/08/17 19:13, Laurent Pinchart wrote: > > On Monday 14 Aug 2017 16:13:28 Kieran Bingham wrote: > >> The entities provide a single .configure operation which configures the > >> object into the target display list,

Re: [PATCH v2 6/8] v4l: vsp1: Adapt entities to configure into a body

2017-09-12 Thread Laurent Pinchart
Hi Kieran, On Tuesday, 12 September 2017 00:42:09 EEST Kieran Bingham wrote: > On 17/08/17 18:58, Laurent Pinchart wrote: > > On Monday 14 Aug 2017 16:13:29 Kieran Bingham wrote: > >> Currently the entities store their configurations into a display list. > >> Adapt this such that the code can be

Re: [PATCH v3 2/2] v4l: cadence: Add Cadence MIPI-CSI2 RX driver

2017-09-12 Thread Benoit Parrot
Benoit Parrot wrote on Tue [2017-Sep-12 13:23:39 -0500]: > > +static int csi2rx_start(struct csi2rx_priv *csi2rx) > > +{ > > + unsigned int i; > > + u32 reg; > > + int ret; > > + > > + /* > > +* We're not the first users, there's no need to enable the > > +*

Re: as3645a flash userland interface

2017-09-12 Thread Jacek Anaszewski
Hi Pavel, On 09/12/2017 12:36 PM, Pavel Machek wrote: > Hi! > > There were some changes to as3645a flash controller. Before we have > stable interface we have to keep forever I want to ask: Note that we have already two LED flash class drivers - leds-max77693 and leds-aat1290. They have been

Re: [PATCH] media: dvb_frontend: only use kref after initialized

2017-09-12 Thread Laurent Pinchart
Hi Mauro, Thank you for the patch. On Tuesday, 12 September 2017 13:19:10 EEST Mauro Carvalho Chehab wrote: > As reported by Laurent, when a DVB frontend need to register > two drivers (e. g. a tuner and a demod), if the second driver > fails to register (for example because it was not

Re: [PATCH v3 2/2] v4l: cadence: Add Cadence MIPI-CSI2 RX driver

2017-09-12 Thread Benoit Parrot
Maxime, Thanks for the patch. Maxime Ripard wrote on Mon [2017-Sep-04 15:03:35 +0200]: > The Cadence CSI-2 RX Controller is an hardware block meant to be used as a > bridge between a CSI-2 bus and pixel grabbers. > > It supports operating with internal or

Re: IR driver support for tango platforms

2017-09-12 Thread Sean Young
On Tue, Sep 12, 2017 at 05:56:11PM +0200, Mason wrote: > On 11/09/2017 23:12, Sean Young wrote: > > > On Sep 11, 2017 at 04:37, Mason wrote: > > > > > I'm confused. Does this mean a keymap is mandatory? > > > I thought it was possible to handle the "scancode to keycode" > > > step in user-space?

Re: [media] s5p-mfc: Adjust a null pointer check in four functions

2017-09-12 Thread Sylwester Nawrocki
On 09/12/2017 05:00 PM, SF Markus Elfring wrote: * Do you care to preserve an information like the author date? In this case not, but actually the Date line is not an issue. Thanks for your information. It seems then that you quoted a line too much. Anyway the patch is malformed, … > I

Re: [PATCHv3 1/3] drm: add support for DisplayPort CEC-Tunneling-over-AUX

2017-09-12 Thread Ville Syrjälä
On Mon, Sep 11, 2017 at 01:25:45PM +0200, Hans Verkuil wrote: > From: Hans Verkuil > > This adds support for the DisplayPort CEC-Tunneling-over-AUX > feature that is part of the DisplayPort 1.3 standard. > > Unfortunately, not all DisplayPort/USB-C to HDMI adapters with

Kindly please view the attach document and get back to me

2017-09-12 Thread Mr. David
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus Desk of Mr.pdf Description: Adobe PDF document

Re: [PATCH v4 1/2] media:imx274 device tree binding file

2017-09-12 Thread Rob Herring
On Fri, Sep 01, 2017 at 01:32:42PM -0700, Leon Luo wrote: > The binding file for imx274 CMOS sensor V4l2 driver > > Signed-off-by: Leon Luo > --- > v4: > - no changes > v3: > - remove redundant properties and references > - document 'reg' property > v2: > - no

Re: IR driver support for tango platforms

2017-09-12 Thread Mason
On 11/09/2017 23:12, Sean Young wrote: On Sep 11, 2017 at 04:37, Mason wrote: I'm confused. Does this mean a keymap is mandatory? I thought it was possible to handle the "scancode to keycode" step in user-space? The handling could be better here, but for nec repeats, yes a matching keycode

Re: Duplicated debug message in drivers/media/rc/rc-main.c

2017-09-12 Thread Sean Young
Hi Mason, On Tue, Sep 12, 2017 at 02:39:14PM +0200, Mason wrote: > Hello, > > I enabled all debug messages, and I see: > > [1.931214] Allocated space for 1 keycode entries (8 bytes) > [1.936822] Allocated space for 1 keycode entries (8 bytes) > > One comes from ir_create_table() > The

Re: [media] s5p-mfc: Adjust a null pointer check in four functions

2017-09-12 Thread SF Markus Elfring
>> * Do you care to preserve an information like the author date? > > In this case not, but actually the Date line is not an issue. Thanks for your information. It seems then that you quoted a line too much. > Anyway the patch is malformed, … I have got doubts for this view because the file

Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings

2017-09-12 Thread Rob Herring
On Thu, Aug 31, 2017 at 01:01:54PM +0200, Hans Verkuil wrote: > From: Hans Verkuil > > Document the bindings for the cec-gpio module for hardware where the > CEC line and optionally the HPD line are connected to GPIO lines. > > Signed-off-by: Hans Verkuil

Re: [Outreachy kernel] [PATCH] Staging: media: atomisp: Merge assignment with return

2017-09-12 Thread Julia Lawall
On Tue, 12 Sep 2017, Srishti Sharma wrote: > Merge the assignment and the return statements to return the value > directly. Done using the following semantic patch by coccinelle. > > @@ > local idexpression ret; > expression e; > @@ > > -ret = > +return > e; > -return ret; > >

[PATCH] Staging: media: atomisp: Merge assignment with return

2017-09-12 Thread Srishti Sharma
Merge the assignment and the return statements to return the value directly. Done using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma ---

Re: [Outreachy kernel] [PATCH] Staging: media: atomisp: Merge assignment with return

2017-09-12 Thread Julia Lawall
On Tue, 12 Sep 2017, Srishti Sharma wrote: > Merge the assignment and the return statements to return the value > directly. Done using the following semantic patch by coccinelle. > > @@ > local idexpression ret; > expression e; > @@ > > -ret = > +return > e; > -return ret; > >

[PATCH] Staging: media: atomisp: Merge assignment with return

2017-09-12 Thread Srishti Sharma
Merge the assignment and the return statements to return the value directly. Done using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma ---

[PATCH v12 14/26] v4l: async: Allow async notifier register call succeed with no subdevs

2017-09-12 Thread Sakari Ailus
The information on how many async sub-devices would be bindable to a notifier is typically dependent on information from platform firmware and it's not driver's business to be aware of that. Many V4L2 main drivers are perfectly usable (and useful) without async sub-devices and so if there aren't

[PATCH v12 00/30] Unified fwnode endpoint parser, async sub-device notifier support, N9 flash DTS

2017-09-12 Thread Sakari Ailus
Hi folks, We have a large influx of new, unmerged, drivers that are now parsing fwnode endpoints and each one of them is doing this a little bit differently. The needs are still exactly the same for the graph data structure is device independent. This is still a non-trivial task and the majority

[PATCH v12 16/26] dt: bindings: Add a binding for flash LED devices associated to a sensor

2017-09-12 Thread Sakari Ailus
Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Acked-by: Hans

[PATCH v12 15/26] v4l: async: Allow binding notifiers to sub-devices

2017-09-12 Thread Sakari Ailus
Registering a notifier has required the knowledge of struct v4l2_device for the reason that sub-devices generally are registered to the v4l2_device (as well as the media device, also available through v4l2_device). This information is not available for sub-device drivers at probe time. What this

[PATCH v12 06/26] v4l: fwnode: Support generic parsing of graph endpoints, per port

2017-09-12 Thread Sakari Ailus
This is just like like v4l2_async_notifier_parse_fwnode_endpoints but it only parses endpoints on a single port. The behaviour is useful on devices that have both sinks and sources, in other words only some of these should be parsed. Signed-off-by: Sakari Ailus ---

[PATCH v12 13/26] v4l: async: Register sub-devices before calling bound callback

2017-09-12 Thread Sakari Ailus
Register the sub-device before calling the notifier's bound callback. Doing this the other way around is problematic as the struct v4l2_device has not assigned for the sub-device yet and may be required by the bound callback. Signed-off-by: Sakari Ailus Acked-by:

[PATCH v12 01/26] v4l: fwnode: Move KernelDoc documentation to the header

2017-09-12 Thread Sakari Ailus
In V4L2 the practice is to have the KernelDoc documentation in the header and not in .c source code files. This consequently makes the V4L2 fwnode function documentation part of the Media documentation build. Also correct the link related function and argument naming in documentation.

[PATCH v12 04/26] v4l: async: Add V4L2 async documentation to the documentation build

2017-09-12 Thread Sakari Ailus
The V4L2 async wasn't part of the documentation build. Fix this. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart

[PATCH v12 03/26] v4l: async: Use more intuitive names for internal functions

2017-09-12 Thread Sakari Ailus
Rename internal functions to make the names of the functions better describe what they do. Old nameNew name v4l2_async_test_notify v4l2_async_match_notify v4l2_async_belongs v4l2_async_find_match Signed-off-by: Sakari Ailus

[PATCH v12 17/26] dt: bindings: Add lens-focus binding for image sensors

2017-09-12 Thread Sakari Ailus
The lens-focus property contains a phandle to the lens voice coil driver that is associated to the sensor; typically both are contained in the same camera module. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel

[PATCH v12 07/26] omap3isp: Use generic parser for parsing fwnode endpoints

2017-09-12 Thread Sakari Ailus
Instead of using driver implementation, use v4l2_async_notifier_parse_fwnode_endpoints() to parse the fwnode endpoints of the device. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/platform/omap3isp/isp.c | 115

[PATCH v12 19/26] v4l: fwnode: Add a helper function to obtain device / interger references

2017-09-12 Thread Sakari Ailus
v4l2_fwnode_reference_parse_int_prop() will find an fwnode such that under the device's own fwnode, it will follow child fwnodes with the given property -- value pair and return the resulting fwnode. Signed-off-by: Sakari Ailus ---

[PATCH v12 18/26] v4l: fwnode: Add a helper function for parsing generic references

2017-09-12 Thread Sakari Ailus
Add function v4l2_fwnode_reference_count() for counting external references and v4l2_fwnode_reference_parse() for parsing them as async sub-devices. This can be done on e.g. flash or lens async sub-devices that are not part of but are associated with a sensor. struct

[PATCH v12 20/26] v4l: fwnode: Add convenience function for parsing common external refs

2017-09-12 Thread Sakari Ailus
Add v4l2_fwnode_parse_reference_sensor_common for parsing common sensor properties that refer to adjacent devices such as flash or lens driver chips. As this is an association only, there's little a regular driver needs to know about these devices as such. Signed-off-by: Sakari Ailus

[PATCH v12 25/26] ov13858: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/i2c/ov13858.c | 26 +++--- 1 file changed, 23 insertions(+), 3

[PATCH v12 21/26] dt: bindings: smiapp: Document lens-focus and flash-leds properties

2017-09-12 Thread Sakari Ailus
Document optional lens-focus and flash-leds properties for the smiapp driver. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek --- Documentation/devicetree/bindings/media/i2c/nokia,smia.txt | 2 ++ 1

[PATCH v12 22/26] smiapp: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). These types devices aren't directly related to the sensor, but are nevertheless handled by the smiapp driver due to the relationship of these component to the main part of the camera module --- the sensor. This

[PATCH v12 23/26] et8ek8: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
From: Pavel Machek Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). These types devices aren't directly related to the sensor, but are nevertheless handled by the et8ek8 driver due to the relationship of these component to the main part of the

[PATCH v12 08/26] rcar-vin: Use generic parser for parsing fwnode endpoints

2017-09-12 Thread Sakari Ailus
Instead of using driver implementation, use v4l2_async_notifier_parse_fwnode_endpoints() to parse the fwnode endpoints of the device. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-core.c | 112

[PATCH v12 24/26] ov5670: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/i2c/ov5670.c | 33 + 1 file changed, 25 insertions(+),

[PATCH v12 26/26] arm: dts: omap3: N9/N950: Add flash references to the camera

2017-09-12 Thread Sakari Ailus
Add flash and indicator LED phandles to the sensor node. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek --- arch/arm/boot/dts/omap3-n9.dts | 1 + arch/arm/boot/dts/omap3-n950-n9.dtsi | 4 ++--

[PATCH v12 05/26] v4l: fwnode: Support generic parsing of graph endpoints in a device

2017-09-12 Thread Sakari Ailus
The current practice is that drivers iterate over their endpoints and parse each endpoint separately. This is very similar in a number of drivers, implement a generic function for the job. Driver specific matters can be taken into account in the driver specific callback. Signed-off-by: Sakari

[PATCH v12 09/26] omap3isp: Fix check for our own sub-devices

2017-09-12 Thread Sakari Ailus
We only want to link sub-devices that were bound to the async notifier the isp driver registered but there may be other sub-devices in the v4l2_device as well. Check for the correct async notifier. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil

[PATCH v12 10/26] omap3isp: Print the name of the entity where no source pads could be found

2017-09-12 Thread Sakari Ailus
If no source pads are found in an entity, print the name of the entity. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek --- drivers/media/platform/omap3isp/isp.c | 4 ++-- 1 file changed, 2

[PATCH v12 12/26] v4l: async: Introduce helpers for calling async ops callbacks

2017-09-12 Thread Sakari Ailus
Add three helper functions to call async operations callbacks. Besides simplifying callbacks, this allows async notifiers to have no ops set, i.e. it can be left NULL. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil ---

[PATCH v12 11/26] v4l: async: Move async subdev notifier operations to a separate structure

2017-09-12 Thread Sakari Ailus
From: Laurent Pinchart The async subdev notifier .bound(), .unbind() and .complete() operations are function pointers stored directly in the v4l2_async_subdev structure. As the structure isn't immutable, this creates a potential security risk as the function

[PATCH v12 02/26] v4l: async: Remove re-probing support

2017-09-12 Thread Sakari Ailus
Remove V4L2 async re-probing support. The re-probing support has been there to support cases where the sub-devices require resources provided by the main driver's hardware to function, such as clocks. Reprobing has allowed unbinding and again binding the main driver without explicilty unbinding

Re: [media] s5p-mfc: Adjust a null pointer check in four functions

2017-09-12 Thread Sylwester Nawrocki
On 09/11/2017 09:21 PM, SF Markus Elfring wrote: Date: Fri, 8 Sep 2017 22:37:00 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Can you resend with that 4 lines removed? * Do you care to preserve an information like the author date? In this

Duplicated debug message in drivers/media/rc/rc-main.c

2017-09-12 Thread Mason
Hello, I enabled all debug messages, and I see: [1.931214] Allocated space for 1 keycode entries (8 bytes) [1.936822] Allocated space for 1 keycode entries (8 bytes) One comes from ir_create_table() The other from ir_setkeytable() ir_setkeytable() calls ir_create_table() It looks

Re: as3645a flash userland interface

2017-09-12 Thread Sakari Ailus
Ahoy! On Tue, Sep 12, 2017 at 01:40:51PM +0200, Pavel Machek wrote: > Hi! > > > On Tue, Sep 12, 2017 at 12:36:28PM +0200, Pavel Machek wrote: > > > Hi! > > > > > > There were some changes to as3645a flash controller. Before we have > > > stable interface we have to keep forever I want to ask: >

Re: as3645a flash userland interface

2017-09-12 Thread Pavel Machek
Hi! > On Tue, Sep 12, 2017 at 12:36:28PM +0200, Pavel Machek wrote: > > Hi! > > > > There were some changes to as3645a flash controller. Before we have > > stable interface we have to keep forever I want to ask: > > > > What directory are the flash controls in? > > > >

[PATCH] [media] gspca: make arrays static, reduces object code size

2017-09-12 Thread Colin King
From: Colin Ian King Don't populate const arrays on the stack, instead make them static. Makes the object code smaller by over 5200 bytes: Before: textdata bss dec hex filename 582598880 128 67267 106c3 ov519.o After: textdata

Re: [PATCH] et8ek8: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
Hi Pavel, On Mon, Sep 11, 2017 at 03:18:31PM +0200, Pavel Machek wrote: > Parse async sub-devices by using > v4l2_subdev_fwnode_reference_parse_sensor_common(). > > These types devices aren't directly related to the sensor, but are > nevertheless handled by the et8ek8 driver due to the

Re: as3645a flash userland interface

2017-09-12 Thread Sakari Ailus
Hi Pavel, On Tue, Sep 12, 2017 at 12:36:28PM +0200, Pavel Machek wrote: > Hi! > > There were some changes to as3645a flash controller. Before we have > stable interface we have to keep forever I want to ask: > > What directory are the flash controls in? > > /sys/class/leds/led-controller:flash

as3645a flash userland interface

2017-09-12 Thread Pavel Machek
Hi! There were some changes to as3645a flash controller. Before we have stable interface we have to keep forever I want to ask: What directory are the flash controls in? /sys/class/leds/led-controller:flash ? Could we arrange for something less generic, like /sys/class/leds/main-camera:flash

Re: [PATCH v11 21/24] smiapp: Add support for flash and lens devices

2017-09-12 Thread Pavel Machek
On Tue 2017-09-12 11:42:33, Sakari Ailus wrote: > Parse async sub-devices by using > v4l2_subdev_fwnode_reference_parse_sensor_common(). > > These types devices aren't directly related to the sensor, but are > nevertheless handled by the smiapp driver due to the relationship of these > component

[PATCH] media: dvb_frontend: only use kref after initialized

2017-09-12 Thread Mauro Carvalho Chehab
As reported by Laurent, when a DVB frontend need to register two drivers (e. g. a tuner and a demod), if the second driver fails to register (for example because it was not compiled), the error handling logic frees the frontend by calling dvb_frontend_detach(). That used to work fine, but

Re: [PATCH v11 11/24] v4l: async: Introduce helpers for calling async ops callbacks

2017-09-12 Thread Hans Verkuil
On 09/12/17 10:42, Sakari Ailus wrote: > Add three helper functions to call async operations callbacks. Besides > simplifying callbacks, this allows async notifiers to have no ops set, > i.e. it can be left NULL. > > Signed-off-by: Sakari Ailus I'm sure I acked

Re: [PATCH v11 13/24] v4l: async: Allow async notifier register call succeed with no subdevs

2017-09-12 Thread Hans Verkuil
On 09/12/17 10:42, Sakari Ailus wrote: > The information on how many async sub-devices would be bindable to a > notifier is typically dependent on information from platform firmware and > it's not driver's business to be aware of that. > > Many V4L2 main drivers are perfectly usable (and useful)

[PATCH] [media] ov2640: make array reset_seq static, reduces object code size

2017-09-12 Thread Colin King
From: Colin Ian King Don't populate the array reset_seq on the stack, instead make it static. Makes the object code smaller by over 50 bytes: Before: textdata bss dec hex filename 117376000 64 178014589 drivers/media/i2c/ov2640.o

[PATCH v11 03/24] v4l: async: Use more intuitive names for internal functions

2017-09-12 Thread Sakari Ailus
Rename internal functions to make the names of the functions better describe what they do. Old nameNew name v4l2_async_test_notify v4l2_async_match_notify v4l2_async_belongs v4l2_async_find_match Signed-off-by: Sakari Ailus

[PATCH v11 20/24] dt: bindings: smiapp: Document lens-focus and flash-leds properties

2017-09-12 Thread Sakari Ailus
Document optional lens-focus and flash-leds properties for the smiapp driver. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek --- Documentation/devicetree/bindings/media/i2c/nokia,smia.txt | 2 ++ 1

[PATCH v11 02/24] v4l: async: Remove re-probing support

2017-09-12 Thread Sakari Ailus
Remove V4L2 async re-probing support. The re-probing support has been there to support cases where the sub-devices require resources provided by the main driver's hardware to function, such as clocks. Reprobing has allowed unbinding and again binding the main driver without explicilty unbinding

[PATCH v11 10/24] v4l: async: Move async subdev notifier operations to a separate structure

2017-09-12 Thread Sakari Ailus
From: Laurent Pinchart The async subdev notifier .bound(), .unbind() and .complete() operations are function pointers stored directly in the v4l2_async_subdev structure. As the structure isn't immutable, this creates a potential security risk as the function

[PATCH v11 07/24] rcar-vin: Use generic parser for parsing fwnode endpoints

2017-09-12 Thread Sakari Ailus
Instead of using driver implementation, use v4l2_async_notifier_parse_fwnode_endpoints() to parse the fwnode endpoints of the device. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-core.c | 112

[PATCH v11 06/24] omap3isp: Use generic parser for parsing fwnode endpoints

2017-09-12 Thread Sakari Ailus
Instead of using driver implementation, use v4l2_async_notifier_parse_fwnode_endpoints() to parse the fwnode endpoints of the device. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/platform/omap3isp/isp.c | 115

[PATCH v11 21/24] smiapp: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). These types devices aren't directly related to the sensor, but are nevertheless handled by the smiapp driver due to the relationship of these component to the main part of the camera module --- the sensor. This

[PATCH v11 16/24] dt: bindings: Add lens-focus binding for image sensors

2017-09-12 Thread Sakari Ailus
The lens-focus property contains a phandle to the lens voice coil driver that is associated to the sensor; typically both are contained in the same camera module. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel

[PATCH v11 12/24] v4l: async: Register sub-devices before calling bound callback

2017-09-12 Thread Sakari Ailus
Register the sub-device before calling the notifier's bound callback. Doing this the other way around is problematic as the struct v4l2_device has not assigned for the sub-device yet and may be required by the bound callback. Signed-off-by: Sakari Ailus Acked-by:

[PATCH v11 05/24] v4l: fwnode: Support generic parsing of graph endpoints in a device

2017-09-12 Thread Sakari Ailus
The current practice is that drivers iterate over their endpoints and parse each endpoint separately. This is very similar in a number of drivers, implement a generic function for the job. Driver specific matters can be taken into account in the driver specific callback. Signed-off-by: Sakari

[PATCH v11 13/24] v4l: async: Allow async notifier register call succeed with no subdevs

2017-09-12 Thread Sakari Ailus
The information on how many async sub-devices would be bindable to a notifier is typically dependent on information from platform firmware and it's not driver's business to be aware of that. Many V4L2 main drivers are perfectly usable (and useful) without async sub-devices and so if there aren't

[PATCH v11 23/24] ov13858: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/i2c/ov13858.c | 26 +++--- 1 file changed, 23 insertions(+), 3

[PATCH v11 11/24] v4l: async: Introduce helpers for calling async ops callbacks

2017-09-12 Thread Sakari Ailus
Add three helper functions to call async operations callbacks. Besides simplifying callbacks, this allows async notifiers to have no ops set, i.e. it can be left NULL. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-async.c | 49

[PATCH v11 24/24] arm: dts: omap3: N9/N950: Add flash references to the camera

2017-09-12 Thread Sakari Ailus
Add flash and indicator LED phandles to the sensor node. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek --- arch/arm/boot/dts/omap3-n9.dts | 1 + arch/arm/boot/dts/omap3-n950-n9.dtsi | 4 ++--

[PATCH v11 00/24] Unified fwnode endpoint parser, async sub-device notifier support, N9 flash DTS

2017-09-12 Thread Sakari Ailus
Hi folks, We have a large influx of new, unmerged, drivers that are now parsing fwnode endpoints and each one of them is doing this a little bit differently. The needs are still exactly the same for the graph data structure is device independent. This is still a non-trivial task and the majority

[PATCH v11 08/24] omap3isp: Fix check for our own sub-devices

2017-09-12 Thread Sakari Ailus
We only want to link sub-devices that were bound to the async notifier the isp driver registered but there may be other sub-devices in the v4l2_device as well. Check for the correct async notifier. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil

[PATCH v11 14/24] v4l: async: Allow binding notifiers to sub-devices

2017-09-12 Thread Sakari Ailus
Registering a notifier has required the knowledge of struct v4l2_device for the reason that sub-devices generally are registered to the v4l2_device (as well as the media device, also available through v4l2_device). This information is not available for sub-device drivers at probe time. What this

[PATCH v11 15/24] dt: bindings: Add a binding for flash LED devices associated to a sensor

2017-09-12 Thread Sakari Ailus
Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Acked-by: Hans

[PATCH v11 04/24] v4l: async: Add V4L2 async documentation to the documentation build

2017-09-12 Thread Sakari Ailus
The V4L2 async wasn't part of the documentation build. Fix this. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart

[PATCH v11 01/24] v4l: fwnode: Move KernelDoc documentation to the header

2017-09-12 Thread Sakari Ailus
In V4L2 the practice is to have the KernelDoc documentation in the header and not in .c source code files. This consequently makes the V4L2 fwnode function documentation part of the Media documentation build. Also correct the link related function and argument naming in documentation.

[PATCH v11 09/24] omap3isp: Print the name of the entity where no source pads could be found

2017-09-12 Thread Sakari Ailus
If no source pads are found in an entity, print the name of the entity. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek --- drivers/media/platform/omap3isp/isp.c | 4 ++-- 1 file changed, 2

[PATCH v11 18/24] v4l: fwnode: Add a helper function to obtain device / interger references

2017-09-12 Thread Sakari Ailus
v4l2_fwnode_reference_parse_int_prop() will find an fwnode such that under the device's own fwnode, it will follow child fwnodes with the given property -- value pair and return the resulting fwnode. Signed-off-by: Sakari Ailus ---

[PATCH v11 17/24] v4l: fwnode: Add a helper function for parsing generic references

2017-09-12 Thread Sakari Ailus
Add function v4l2_fwnode_reference_count() for counting external references and v4l2_fwnode_reference_parse() for parsing them as async sub-devices. This can be done on e.g. flash or lens async sub-devices that are not part of but are associated with a sensor. struct

[PATCH v11 22/24] ov5670: Add support for flash and lens devices

2017-09-12 Thread Sakari Ailus
Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- drivers/media/i2c/ov5670.c | 33 + 1 file changed, 25 insertions(+),

[PATCH v11 19/24] v4l: fwnode: Add convenience function for parsing common external refs

2017-09-12 Thread Sakari Ailus
Add v4l2_fwnode_parse_reference_sensor_common for parsing common sensor properties that refer to adjacent devices such as flash or lens driver chips. As this is an association only, there's little a regular driver needs to know about these devices as such. Signed-off-by: Sakari Ailus