[PATCH 4/4] v4l: async: add comment about re-probing to v4l2_async_notifier_unregister()

2017-07-30 Thread Niklas Söderlund
The re-probing of subdevices when unregistering a notifier is tricky to understand, and implemented somewhat as a hack. Add a comment trying to explain why the re-probing is needed in the first place and why existing helper functions can't be used in this situation. Signed-off-by: Niklas

[PATCH 3/4] v4l: async: do not hold list_lock when re-probing devices

2017-07-30 Thread Niklas Söderlund
There is no good reason to hold the list_lock when re-probing the devices and it prevents a clean implementation of subdevice notifiers. Move the actual release of the devices outside of the loop which requires the lock to be held. Signed-off-by: Niklas Söderlund

[PATCH 0/4] v4l: async: fixes for v4l2_async_notifier_unregister()

2017-07-30 Thread Niklas Söderlund
Hi, This series is based on top of media-tree and some patches where previously part of the series '[PATCH v5 0/4] v4l2-async: add subnotifier registration for subdevices'. Hans suggested the cleanups could be broken out to a separate series, so this is this series :-) The aim of this series is

[PATCH 1/4] v4l: async: fix unbind error in v4l2_async_notifier_unregister()

2017-07-30 Thread Niklas Söderlund
The call to v4l2_async_cleanup() will set sd->asd to NULL so passing it to notifier->unbind() have no effect and leaves the notifier confused. Call the unbind() callback prior to cleaning up the subdevice to avoid this. Signed-off-by: Niklas Söderlund ---

[PATCH 2/4] v4l: async: abort if memory allocation fails when unregistering notifiers

2017-07-30 Thread Niklas Söderlund
Instead of trying to cope with the failed memory allocation and still leaving the kernel in a semi-broken state (the subdevices will be released but never re-probed) simply abort. The kernel have already printed a warning about allocation failure but keep the error printout to ease pinpointing the

[RFC 5/5] arm64: dts: renesas: salvator-x: Add ADV7482 support

2017-07-30 Thread Niklas Söderlund
From: Kieran Bingham The Salvator boards use an ADV7482 receiver for HDMI and CVBS inputs. Provide ADV7482 node on the i2c4 bus, along with connectors for the hdmi and cvbs inputs, and link to the csi20 and csi40 nodes as outputs. Signed-off-by: Kieran

[RFC 4/5] arm64: dts: renesas: salvator: enable VIN

2017-07-30 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/salvator-common.dtsi | 32 1 file changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi

[RFC 2/5] arm64: dts: r8a7795-es1: add CSI21

2017-07-30 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi | 142 +++ 1 file changed, 142 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi b/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi

[RFC 0/5] arm64: dts: renesas: add VIN, CSI-2 and ADV7482 nodes

2017-07-30 Thread Niklas Söderlund
Hi, This is a RFC for how I imagine the final DT for the video capture nodes will look. Since the DT file layout changed recently I wanted to post a RFC before I include these in my for-renesas-drivers branch. These are not intended for Simons tree, the DT bindings are not accepted upstream.

[RFC 3/5] arm64: dts: r8a7796: add VIN and CSI nodes

2017-07-30 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/r8a7796.dtsi | 356 +++ 1 file changed, 356 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi index

[RFC 1/5] arm64: dts: r8a7795: add VIN and CSI nodes

2017-07-30 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 378 +++ 1 file changed, 378 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index

Re: [PATCH v2] ravb: add wake-on-lan support via magic packet

2017-07-30 Thread Niklas Söderlund
Hi Andrew, On 2017-07-30 22:07:31 +0200, Andrew Lunn wrote: > On Sun, Jul 30, 2017 at 09:51:54PM +0200, Niklas Söderlund wrote: > > Hi Andrew, > > > > On 2017-07-30 19:07:38 +0200, Andrew Lunn wrote: > > > Hi Niklas > > > > > > > @@ -2041,6 +2073,11 @@ static int ravb_probe(struct

Re: [PATCH v2] ravb: add wake-on-lan support via magic packet

2017-07-30 Thread Andrew Lunn
On Sun, Jul 30, 2017 at 09:51:54PM +0200, Niklas Söderlund wrote: > Hi Andrew, > > On 2017-07-30 19:07:38 +0200, Andrew Lunn wrote: > > Hi Niklas > > > > > @@ -2041,6 +2073,11 @@ static int ravb_probe(struct platform_device *pdev) > > > > > > priv->chip_id = chip_id; > > > > > > + /* Get

Re: [PATCH v2] ravb: add wake-on-lan support via magic packet

2017-07-30 Thread Niklas Söderlund
Hi Andrew, On 2017-07-30 19:07:38 +0200, Andrew Lunn wrote: > Hi Niklas > > > @@ -2041,6 +2073,11 @@ static int ravb_probe(struct platform_device *pdev) > > > > priv->chip_id = chip_id; > > > > + /* Get clock, if not found that's OK but Wake-On-Lan is unavailable */ > > + priv->clk =

Re: [PATCH v2] ravb: add wake-on-lan support via magic packet

2017-07-30 Thread Andrew Lunn
Hi Niklas > @@ -2041,6 +2073,11 @@ static int ravb_probe(struct platform_device *pdev) > > priv->chip_id = chip_id; > > + /* Get clock, if not found that's OK but Wake-On-Lan is unavailable */ > + priv->clk = devm_clk_get(>dev, NULL); > + if (IS_ERR(priv->clk)) > +

[PATCH 2/4] arm: dts: qcom: add cec clock for apq8016 board

2017-07-30 Thread Hans Verkuil
From: Hans Verkuil The adv7533 on this board needs a cec clock. Hook it up in the dtsi to enable CEC for the HDMI transmitters. Signed-off-by: Hans Verkuil --- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 3/4] arm: dts: renesas: add cec clock for Koelsch board

2017-07-30 Thread Hans Verkuil
From: Hans Verkuil The adv7511 on the Koelsch board has a 12 MHz fixed clock for the CEC block. Specify this in the dts to enable CEC support. Signed-off-by: Hans Verkuil --- arch/arm/boot/dts/r8a7791-koelsch.dts | 8 1 file changed, 8

[PATCH 1/4] dt-bindings: adi,adv7511.txt: document cec clock

2017-07-30 Thread Hans Verkuil
From: Hans Verkuil Document the cec clock binding. Signed-off-by: Hans Verkuil --- Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 0/4] drm/bridge/adv7511: add CEC support

2017-07-30 Thread Hans Verkuil
From: Hans Verkuil This patch series adds CEC support to the drm adv7511/adv7533 drivers. I have tested this with the Qualcomm Dragonboard C410 (adv7533 based) and the Renesas R-Car Koelsch board (adv7511 based). Note: the Dragonboard needs this patch: