Re: [PATCH v2 3/5] [RFT] ARM: dts: wheat: Fix ADV7513 address usage

2018-02-12 Thread Lars-Peter Clausen
On 02/12/2018 07:11 PM, Kieran Bingham wrote: [...] > + /* > + * The adv75xx resets its addresses to defaults during low power power > + * mode. Because we have two ADV7513 devices on the same bus, we must > + * change both of them away from the defaults so that they do not > +

Re: [PATCH 2/2] drm: adv7511: Add support for i2c_new_secondary_device

2018-01-22 Thread Lars-Peter Clausen
On 01/22/2018 01:50 PM, Kieran Bingham wrote: > The ADV7511 has four 256-byte maps that can be accessed via the main I²C > ports. Each map has it own I²C address and acts as a standard slave > device on the I²C bus. > > Allow a device tree node to override the default addresses so that > address

[PATCH] [media] adv7604: Initialize drive strength to default when using DT

2016-11-29 Thread Lars-Peter Clausen
settings to the power-on-reset value of the device when probing through devicetree to avoid this issue. Fixes: 0e158be0162b ("adv7604: Add DT support") Signed-off-by: Lars-Peter Clausen <l...@metafoo.de> --- drivers/media/i2c/adv7604.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [PATCH v4 1/8] media: adv7180: fix field type

2016-08-19 Thread Lars-Peter Clausen
or explicitly setting the field > mode via I2P, set the field mode to V4L2_FIELD_ALTERNATE. > > Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> > Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Acked-by: Lars-Peter Clausen <l...@metaf

Re: [PATCHv2 7/7] [PATCHv5] media: adv7180: fix field type

2016-08-03 Thread Lars-Peter Clausen
On 08/03/2016 06:55 PM, Steve Longerbeam wrote: > On 08/03/2016 06:21 AM, Niklas Söderlund wrote: >> On 2016-08-02 17:00:07 +0200, Lars-Peter Clausen wrote: >>> [...] >>>> diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c >>>> index

Re: [PATCHv2 7/7] [PATCHv5] media: adv7180: fix field type

2016-08-03 Thread Lars-Peter Clausen
On 08/03/2016 04:42 PM, Ian Arkver wrote: > On 03/08/16 15:23, Lars-Peter Clausen wrote: >> On 08/03/2016 04:11 PM, Hans Verkuil wrote: >>> >>> On 08/03/2016 03:21 PM, Niklas Söderlund wrote: >>>> On 2016-08-02 17:00:07 +0200, Lars-Peter Clausen wrote: >&g

Re: [PATCHv2 7/7] [PATCHv5] media: adv7180: fix field type

2016-08-03 Thread Lars-Peter Clausen
On 08/03/2016 04:11 PM, Hans Verkuil wrote: > > > On 08/03/2016 03:21 PM, Niklas Söderlund wrote: >> On 2016-08-02 17:00:07 +0200, Lars-Peter Clausen wrote: >>> [...] >>>> diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c >>>>

Re: [PATCHv2 7/7] [PATCHv5] media: adv7180: fix field type

2016-08-03 Thread Lars-Peter Clausen
On 08/03/2016 04:23 PM, Lars-Peter Clausen wrote: > On 08/03/2016 04:11 PM, Hans Verkuil wrote: >> >> >> On 08/03/2016 03:21 PM, Niklas Söderlund wrote: >>> On 2016-08-02 17:00:07 +0200, Lars-Peter Clausen wrote: >>>> [...] >>>>> diff --git

Re: [PATCHv2 7/7] [PATCHv5] media: adv7180: fix field type

2016-08-02 Thread Lars-Peter Clausen
[...] > diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c > index a8b434b..c6fed71 100644 > --- a/drivers/media/i2c/adv7180.c > +++ b/drivers/media/i2c/adv7180.c > @@ -680,10 +680,13 @@ static int adv7180_set_pad_format(struct v4l2_subdev > *sd, > switch

Re: [PATCH v2 03/10] media: adv7180: define more registers

2016-07-20 Thread Lars-Peter Clausen
On 07/20/2016 02:03 AM, Steve Longerbeam wrote: > Replace hard-coded addresses with new register macro defines. No > functional changes. > > Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Acked-by: Lars-Peter Clausen <l...@metafoo.de> -- To unsubscr

Re: [PATCH v2 05/10] media: adv7180: add power pin control

2016-07-20 Thread Lars-Peter Clausen
eworks.com> > Acked-by: Tim Harvey <thar...@gateworks.com> > Cc: Lars-Peter Clausen <l...@metafoo.de> Looks good, thanks. Acked-by: Lars-Peter Clausen <l...@metafoo.de> -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body

Re: [PATCH 06/11] media: adv7180: add bt.656-4 OF property

2016-07-10 Thread Lars-Peter Clausen
On 07/09/2016 11:36 PM, Steve Longerbeam wrote: > > > On 07/09/2016 02:10 PM, Steve Longerbeam wrote: >> >> >> On 07/09/2016 11:59 AM, Steve Longerbeam wrote: >>> >>> >>> On 07/07/2016 07:52 AM, Lars-Peter Clausen wrote: >>>>

Re: [PATCH 02/11] Revert "[media] adv7180: fix broken standards handling"

2016-07-07 Thread Lars-Peter Clausen
On 07/07/2016 12:59 AM, Steve Longerbeam wrote: > Autodetect was likely broken only because access to the > interrupt registers were broken, so there were no standard > change interrupts. After fixing that, and reverting this, > autodetect seems to work just fine on an i.mx6q SabreAuto. > > This

Re: [PATCH 01/11] media: adv7180: Fix broken interrupt register access

2016-07-07 Thread Lars-Peter Clausen
teve Longerbeam <steve_longerb...@mentor.com> Looks good, thanks. Acked-by: Lars-Peter Clausen <l...@metafoo.de> -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 03/11] media: adv7180: add power pin control

2016-07-07 Thread Lars-Peter Clausen
> @@ -1190,6 +1207,20 @@ out_unlock: > return ret; > } > > +static int adv7180_of_parse(struct adv7180_state *state) Since there is nothing of specific in here anymore the name should be changed, or maybe just inline the code directly in probe. > +{ > + struct i2c_client *client =

Re: [PATCH 05/11] media: adv7180: init chip with AD recommended register settings

2016-07-07 Thread Lars-Peter Clausen
On 07/07/2016 12:59 AM, Steve Longerbeam wrote: > Define and load register tables that conform to Analog Device's > recommended register settings. It loads the default single-ended > CVBS on Ain1 configuration for both ADV7180 and ADV7182 chips. The driver should already setup the recommended

Re: [PATCH 07/11] media: adv7180: change mbus format to UYVY

2016-07-07 Thread Lars-Peter Clausen
tion. Looking at things it seems like the Renesas vin driver, which is used in combination with the adv7180 on some boards, uses the return value from enum_mbus_code to setup the video pipeline. Adding Niklas to Cc, maybe he can help to test this. But otherwise Acked-by: Lars-Peter

Re: [PATCH 06/11] media: adv7180: add bt.656-4 OF property

2016-07-07 Thread Lars-Peter Clausen
On 07/07/2016 12:59 AM, Steve Longerbeam wrote: > Add a device tree boolean property "bt656-4" to allow setting > the ITU-R BT.656-4 compatible bit. > > Signed-off-by: Steve Longerbeam Hi, Thanks for the patch. > --- > drivers/media/i2c/adv7180.c | 18

Re: [PATCH 34/38] media: imx: Add support for ADV7180 Video Decoder

2016-06-16 Thread Lars-Peter Clausen
On 06/15/2016 12:49 AM, Steve Longerbeam wrote: > This driver is based on adv7180.c from Freescale imx_3.10.17_1.0.0_beta > branch, modified heavily for code cleanup and converted from int-device > to subdev. We already have a driver for the adv7180 upstream, also using the subdev API. Is there

Re: [PATCH 35/38] media: adv7180: add power pin control

2016-06-15 Thread Lars-Peter Clausen
On 06/15/2016 12:49 AM, Steve Longerbeam wrote: > + usleep_range(5000, 5001); That's kind of not how usleep_range() (the emphasis is on range) is supposed to be used. You typically dont care too much about the upper limit here so something like maybe 1 is more appropriate. >

Re: [PATCH] [media] adv7604: Add support for hardware reset

2016-05-24 Thread Lars-Peter Clausen
, the delays will be 10 ms. > The RESET pin can be tied high, so the GPIO is optional. > > Signed-off-by: Dragos Bogdan <dragos.bog...@analog.com> Patch looks OK. One comment about the commit message, usually this should be line-wrapped at around 75 characters. Reviewed-by: Lars-Pet

Re: [PATCH] media: fix use-after-free in cdev_put() when app exits after driver unbind

2016-05-03 Thread Lars-Peter Clausen
On 05/03/2016 05:06 PM, Shuah Khan wrote: > On 05/02/2016 04:16 AM, Lars-Peter Clausen wrote: >> On 04/30/2016 12:37 AM, Shuah Khan wrote: >> [...] >>> diff --git a/include/media/media-devnode.h b/include/media/media-devnode.h >>> index 5bb3b0e..ce9b051 100

Re: [PATCH] media: fix use-after-free in cdev_put() when app exits after driver unbind

2016-05-02 Thread Lars-Peter Clausen
On 04/30/2016 12:37 AM, Shuah Khan wrote: [...] > diff --git a/include/media/media-devnode.h b/include/media/media-devnode.h > index 5bb3b0e..ce9b051 100644 > --- a/include/media/media-devnode.h > +++ b/include/media/media-devnode.h > @@ -72,6 +72,7 @@ struct media_file_operations { > * @fops:

Re: [PATCH] media: fix media_ioctl use-after-free when driver unbinds

2016-04-28 Thread Lars-Peter Clausen
On 04/27/2016 11:56 PM, Shuah Khan wrote: >>> dev_dbg(mdev->dev, "Media device unregistered\n"); >>> } >>> diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c >>> index 29409f4..9af9ba1 100644 >>> --- a/drivers/media/media-devnode.c >>> +++

Re: [PATCH] media: fix media_ioctl use-after-free when driver unbinds

2016-04-27 Thread Lars-Peter Clausen
Looks mostly good, a few comments. On 04/27/2016 05:08 AM, Shuah Khan wrote: [...] > @@ -428,7 +428,7 @@ static long media_device_ioctl(struct file *filp, > unsigned int cmd, > unsigned long arg) > { > struct media_devnode *devnode = media_devnode_data(filp);

Re: [PATCH 1/6] adv7180: fix broken standards handling

2016-04-24 Thread Lars-Peter Clausen
ans.verk...@cisco.com> > Cc: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> > Cc: Lars-Peter Clausen <l...@metafoo.de> > Cc: Federico Vaga <federico.v...@gmail.com> Thanks for cleaning this up. Acked-by: Lars-Peter Clausen <l...@metafoo.de> -- To

[PATCH] [media] dm1105: Remove unnecessary synchronize_irq() before free_irq()

2015-11-21 Thread Lars-Peter Clausen
. Patch was generated using the following semantic patch: // @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // Signed-off-by: Lars-Peter Clausen <l...@metafoo.de> --- drivers/media/pci/dm1105/dm1105.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/pci/

Re: [PATCH] media: adv7180: increase delay after reset to 5ms

2015-11-12 Thread Lars-Peter Clausen
On 11/12/2015 12:10 AM, Laurent Pinchart wrote: > Hi Ulrich, > > (CC'ing Lars-Peter Clausen) > > Thank you for the patch. > > On Tuesday 10 November 2015 14:39:00 Ulrich Hecht wrote: >> Initialization of the ADV7180 chip fails on the Renesas R8A7790-based >>

Re: [PATCH v2] media: videobuf2-dc: set properly dma_max_segment_size

2015-08-13 Thread Lars-Peter Clausen
On 08/12/2015 11:58 AM, Marek Szyprowski wrote: If device has no DMA max_seg_size set, we assume that there is no limit and it is safe to force it to use DMA_BIT_MASK(32) as max_seg_size to let DMA-mapping API always create contiguous mappings in DMA address space. This is essential for all

Re: [PATCH v2] media: videobuf2-dc: set properly dma_max_segment_size

2015-08-13 Thread Lars-Peter Clausen
On 08/13/2015 03:49 PM, Marek Szyprowski wrote: Hello, On 2015-08-13 14:40, Lars-Peter Clausen wrote: On 08/12/2015 11:58 AM, Marek Szyprowski wrote: If device has no DMA max_seg_size set, we assume that there is no limit and it is safe to force it to use DMA_BIT_MASK(32) as max_seg_size

Re: [PATCH] [media] imageon-bridge: Add module license information

2015-07-28 Thread Lars-Peter Clausen
On 07/28/2015 09:14 AM, Hans Verkuil wrote: On 07/28/2015 07:39 AM, Mike Looijmans wrote: Comment header specifies GPL-2, so add a MODULE_LICENSE(GPL v2). This fixes the driver failing to load when built as module: imageon_bridge: module license 'unspecified' taints kernel.

Re: [PATCH] [media] adv7604: Don't shift the I2C address

2015-07-27 Thread Lars-Peter Clausen
and software, I2C addresses are in 7-bit notation, so it's better to stick to that. Remove the 1 in a few places where it logs the I2C address. Signed-off-by: Mike Looijmans mike.looijm...@topic.nl Looks ok to me. Acked-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7604.c | 8

Re: [PATCH 4/5] [media] adv7604: Deliver resolution change events to userspace

2015-07-13 Thread Lars-Peter Clausen
On 07/13/2015 11:02 AM, Hans Verkuil wrote: +static int adv76xx_subscribe_event(struct v4l2_subdev *sd, + struct v4l2_fh *fh, + struct v4l2_event_subscription *sub) +{ + switch (sub-type) { + case

Re: [ANNOUNCE] Media Controller workshop in Helsinki

2015-07-08 Thread Lars-Peter Clausen
Cc: ALSA ML On 07/08/2015 01:16 PM, Mauro Carvalho Chehab wrote: Hi, As discussed on our IRC #v4l channel at Freenode, we'll be running a 3-day Media Controller workshop in Helsinki between July 29-31. The main goal of this workshop is to fixup the problems with the Media Controller

Re: [PATCH 4/5] [media] adv7604: Deliver resolution change events to userspace

2015-06-25 Thread Lars-Peter Clausen
On 06/25/2015 12:21 PM, Sakari Ailus wrote: Hi Lars-Peter, On Wed, Jun 24, 2015 at 06:50:30PM +0200, Lars-Peter Clausen wrote: Use the new v4l2_subdev_notify_event() helper function to deliver the resolution change event to userspace via the v4l2 subdev event queue as well as to the bridge

Re: [PATCH 3/5] [media] Add helper function for subdev event notifications

2015-06-25 Thread Lars-Peter Clausen
On 06/25/2015 11:47 AM, Sakari Ailus wrote: Hi Lars-Peter, On Wed, Jun 24, 2015 at 06:50:29PM +0200, Lars-Peter Clausen wrote: 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

Re: [PATCH] v4l2-event: v4l2_event_queue: do nothing if vdev == NULL

2015-06-25 Thread Lars-Peter Clausen
On 06/25/2015 11:12 AM, Sakari Ailus wrote: Hi Hans, On Tue, Jun 23, 2015 at 11:20:23AM +0200, Hans Verkuil wrote: If the vdev pointer == NULL, then just return. This makes it easier for subdev drivers to use this function without having to check if the sd-devnode pointer is NULL or not. Do

[PATCH 3/5] [media] Add helper function for subdev event notifications

2015-06-24 Thread Lars-Peter Clausen
drivers. Combining both into the same function avoids boilerplate code in subdev drivers. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/v4l2-core/v4l2-subdev.c | 18 ++ include/media/v4l2-subdev.h | 4 2 files changed, 22 insertions(+) diff --git

[PATCH 4/5] [media] adv7604: Deliver resolution change events to userspace

2015-06-24 Thread Lars-Peter Clausen
and often necessary for video pipelines where there is no direct 1-to-1 relationship between the subdevice converter and the video capture device and hence it does not make sense to directly forward the event to the video capture device node. Signed-off-by: Lars-Peter Clausen l...@metafoo.de

[PATCH 2/5] [media] adv7842: Add support for control event notifications

2015-06-24 Thread Lars-Peter Clausen
Allow userspace applications to subscribe to control change events. This can e.g. be used to monitor the 5V detect control to be notified when a source is connected or disconnected. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7842.c | 5 - 1 file changed, 4

[PATCH 5/5] [media] adv7842: Deliver resolution change events to userspace

2015-06-24 Thread Lars-Peter Clausen
and often necessary for video pipelines where there is no direct 1-to-1 relationship between the subdevice converter and the video capture device and hence it does not make sense to directly forward the event to the video capture device node. Signed-off-by: Lars-Peter Clausen l...@metafoo.de

[PATCH 1/5] [media] adv7604: Add support for control event notifications

2015-06-24 Thread Lars-Peter Clausen
Allow userspace applications to subscribe to control change events. This can e.g. be used to monitor the 5V detect control to be notified when a source is connected or disconnected. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7604.c | 5 - 1 file changed, 4

Re: [PATCH v2] media: i2c: ADV7604: Migrate to regmap

2015-06-19 Thread Lars-Peter Clausen
On 06/16/2015 10:38 AM, Pablo Anton wrote: This is a preliminary patch in order to add support for ALSA. It replaces all current i2c access with regmap. Looks pretty good. #define ADV76XX_REG(page, offset) (((page) 8) | (offset)) @@ -633,13 +618,15 @@ static int

Re: [RFC 0/5] Add a gpio jack device

2015-05-27 Thread Lars-Peter Clausen
On 05/27/2015 06:22 AM, Dylan Reid wrote: On Tue, May 26, 2015 at 1:14 PM, Mark Brown broo...@kernel.org wrote: On Tue, May 26, 2015 at 08:43:34PM +0200, Lars-Peter Clausen wrote: On 05/25/2015 07:15 PM, Mark Brown wrote: I think it solves the 90% case well enough for simple-card (which

Re: [PATCH] media: i2c: adv7180: unregister the subdev in remove callback

2015-02-26 Thread Lars-Peter Clausen
On 02/26/2015 07:19 PM, Lad Prabhakar wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com this patch makes sure we unregister the subdev by calling v4l2_device_unregister_subdev() on remove callback. This was just removed a while ago, see commit 632f2b0db9da ([media] adv7180: Remove

Re: [PATCH 6/8] WmT: adv7604 driver compatibility

2015-02-03 Thread Lars-Peter Clausen
On 02/03/2015 04:24 PM, Hans Verkuil wrote: On 02/03/15 16:22, Laurent Pinchart wrote: Hi Hans, On Monday 02 February 2015 11:09:27 Hans Verkuil wrote: On 02/02/2015 11:01 AM, Laurent Pinchart wrote: On Sunday 01 February 2015 12:26:11 Guennadi Liakhovetski wrote: On a second thought: On

Re: [PATCH] media: i2c: ADV7604: Migrate to regmap

2015-02-03 Thread Lars-Peter Clausen
On 02/01/2015 11:08 AM, Jean-Michel Hautbois wrote: Looks mostly good, some things in addition to what Hans already said. [...] - -static s32 adv_smbus_write_byte_data(struct adv7604_state *state, -enum adv7604_page page, u8 command, -

Re: [PATCH 21/66] rtl2830: implement own I2C locking

2015-02-02 Thread Lars-Peter Clausen
On 02/02/2015 09:33 PM, Wolfram Sang wrote: Ok, this may eventually work ok for now, but a further change at the I2C core could easily break it. So, we need to double check about such patch with the I2C maintainer. Jean, Are you ok with such patch? If so, please ack. Jean handed over I2C

Re: [PATCH v2 03/15] [media] adv7180: Use inline function instead of macro

2015-02-02 Thread Lars-Peter Clausen
On 02/02/2015 02:36 PM, Mauro Carvalho Chehab wrote: Em Fri, 23 Jan 2015 16:52:22 +0100 Lars-Peter Clausen l...@metafoo.de escreveu: Use a inline function instead of a macro for the container_of helper for getting the driver's state struct from a control. A inline function has the advantage

[PATCH v2 09/15] [media] adv7180: Prepare for multi-chip support

2015-01-23 Thread Lars-Peter Clausen
format is configured slightly differs between some devices. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/i2c/adv7180.c | 187 ++-- 1 file changed, 130 insertions(+), 57 deletions(-) diff

[PATCH v2 06/15] [media] adv7180: Reset the device before initialization

2015-01-23 Thread Lars-Peter Clausen
Reset the device when initializing it so it is in a good known state and the assumed register settings matche the actual register settings. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/i2c/adv7180.c | 14 +- 1 file

[PATCH v2 08/15] [media] adv7180: Consolidate video mode setting

2015-01-23 Thread Lars-Peter Clausen
We have basically the same code to set the video standard in init_device() and adv7180_s_std(). Factor this out into a common helper function. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/i2c/adv7180.c | 67

[PATCH v2 11/15] [media] adv7180: Add support for the adv7280/adv7281/adv7282

2015-01-23 Thread Lars-Peter Clausen
This patch adds support for the adv7280/adv7281/adv7282 devices to the adv7180 driver. They are very similar to the adv7182, the main difference from the drivers point of view are some different tuning constants for improved video performance. Signed-off-by: Lars-Peter Clausen l...@metafoo.de

[PATCH v2 13/15] [media] adv7180: Add I2P support

2015-01-23 Thread Lars-Peter Clausen
for the format. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/i2c/adv7180.c | 156 +--- 1 file changed, 148 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers

[PATCH v2 02/15] [media] adv7180: Pass correct flags to request_threaded_irq()

2015-01-23 Thread Lars-Peter Clausen
Most IRQ controllers support different types of interrupts. The adv7180 generates falling edge interrupts, so make sure to pass IRQF_TRIGGER_FALLING to request_threaded_irq() so the IRQ controller is configured for the correct mode. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans

[PATCH v2 07/15] [media] adv7180: Add media controller support

2015-01-23 Thread Lars-Peter Clausen
the V4L2_SUBDEV_FL_HAS_DEVNODE flag for the subdevice so it is possible to create a subdevice device node. Since the driver now depends on VIDEO_V4L2_SUBDEV_API all drivers which select the driver need to depend on that symbol as well. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans

[PATCH v2 05/15] [media] adv7180: Do implicit register paging

2015-01-23 Thread Lars-Peter Clausen
means that a register access is not a single atomic i2c_smbus_write_byte_data() or i2c_smbus_read_byte_data() call and we need to make sure that concurrent register access does not race against each other. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk

[PATCH v2 10/15] [media] adv7180: Add support for the adv7182

2015-01-23 Thread Lars-Peter Clausen
This patch adds support for the adv7182 to the adv7180 driver. The adv7182 is similar to the adv7180, the main difference from the driver's point of view is how the video input and how the input format are selected. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil

[PATCH v2 00/15] [media] adv7180: Add support for more chip variants

2015-01-23 Thread Lars-Peter Clausen
. The first half of this series contains fixes and cleanups while the second half adds new features and support for new chips Lars-Peter Clausen (15): [media] adv7180: Do not request the IRQ again during resume [media] adv7180: Pass correct flags to request_threaded_irq() [media] adv7180

[PATCH v2 04/15] [media] adv7180: Cleanup register define naming

2015-01-23 Thread Lars-Peter Clausen
Consistently prefix register defines with ADV7180_REG. Also remove the ADI from register names, the ADV7180 prefix should provide enough of a namespace separation. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/i2c/adv7180.c

[PATCH v2 15/15] [media] Add MAINTAINERS entry for the adv7180

2015-01-23 Thread Lars-Peter Clausen
Add myself as the maintainer for the adv7180 video subdev driver. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4318f34..22bb77e 100644

[PATCH v2 12/15] [media] adv7180: Add support for the adv7280-m/adv7281-m/adv7281-ma/adv7282-m

2015-01-23 Thread Lars-Peter Clausen
need to register a dummy device for it. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/i2c/adv7180.c | 170 +++- 1 file changed, 154 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH v2 14/15] [media] adv7180: Add fast switch support

2015-01-23 Thread Lars-Peter Clausen
to either enable or disable fast switch mode. Signed-off-by: Lars-Peter Clausen l...@metafoo.de -- Changes since v1: * Reserve private control range and use it for the fast switch control * Changed control name from Fast switch to Fast Switch --- drivers/media/i2c/adv7180.c| 29

[PATCH v2 01/15] [media] adv7180: Do not request the IRQ again during resume

2015-01-23 Thread Lars-Peter Clausen
requested once. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/i2c/adv7180.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index bffe6eb

[PATCH v2 03/15] [media] adv7180: Use inline function instead of macro

2015-01-23 Thread Lars-Peter Clausen
Use a inline function instead of a macro for the container_of helper for getting the driver's state struct from a control. A inline function has the advantage that it is more typesafe and nicer in general. Signed-off-by: Lars-Peter Clausen l...@metafoo.de Acked-by: Hans Verkuil hans.verk

Re: [PATCH 2/2] [media] adv7180: Remove the unneeded 'err' label

2015-01-16 Thread Lars-Peter Clausen
On 12/16/2014 05:49 PM, Fabio Estevam wrote: There is no need to jump to the 'err' label as we can simply return the error code directly and make the code shorter. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Lars-Peter Clausen l...@metafoo.de -- To unsubscribe from

[PATCH 04/16] [media] adv7180: Cleanup register define naming

2015-01-13 Thread Lars-Peter Clausen
Consistently prefix register defines with ADV7180_REG. Also remove the ADI from register names, the ADV7180 prefix should provide enough of a namespace separation. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 105

[PATCH 16/16] [media] Add MAINTAINERS entry for the adv7180

2015-01-13 Thread Lars-Peter Clausen
Add myself as the maintainer for the adv7180 video subdev driver. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4318f34..22bb77e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -659,6

[PATCH 00/16] [media] adv7180: Add support for different chip

2015-01-13 Thread Lars-Peter Clausen
. The first half of this series contains fixes and cleanups while the second half adds new features and support for new chips. - Lars Lars-Peter Clausen (16): [media] adv7180: Do not request the IRQ again during resume [media] adv7180: Pass correct flags to request_threaded_irq() [media

[PATCH 03/16] [media] adv7180: Use inline function instead of macro

2015-01-13 Thread Lars-Peter Clausen
Use a inline function instead of a macro for the container_of helper for getting the driver's state struct from a control. A inline function has the advantage that it is more typesafe and nicer in general. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 13

[PATCH 09/16] [media] adv7180: Prepare for multi-chip support

2015-01-13 Thread Lars-Peter Clausen
format is configured slightly differs between some devices. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 187 ++-- 1 file changed, 130 insertions(+), 57 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers

[PATCH 08/16] [media] adv7180: Consolidate video mode setting

2015-01-13 Thread Lars-Peter Clausen
We have basically the same code to set the video standard in init_device() and adv7180_s_std(). Factor this out into a common helper function. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 67 ++--- 1 file changed, 32

[PATCH 01/16] [media] adv7180: Do not request the IRQ again during resume

2015-01-13 Thread Lars-Peter Clausen
requested once. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index bffe6eb..172e4a2 100644 --- a/drivers/media/i2c/adv7180.c

[PATCH 12/16] [media] adv7180: Add support for the adv7280-m/adv7281-m/adv7281-ma/adv7282-m

2015-01-13 Thread Lars-Peter Clausen
need to register a dummy device for it. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 170 +++- 1 file changed, 154 insertions(+), 16 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c

[PATCH 13/16] [media] adv7180: Add I2P support

2015-01-13 Thread Lars-Peter Clausen
for the format. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 156 +--- 1 file changed, 148 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 868a677..4d789c7 100644

[PATCH 15/16] [media] adv7180: Add free run mode controls

2015-01-13 Thread Lars-Peter Clausen
* Free Running Color: Allows to select the color of the pattern Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 125 ++-- 1 file changed, 122 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers

[PATCH 10/16] [media] adv7180: Add support for the ad7182

2015-01-13 Thread Lars-Peter Clausen
This patch adds support for the adv7182 to the adv7180 driver. The adv7182 is similar to the adv7180, the main difference from the driver's point of view is how the video input and how the input format are selected. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180

[PATCH 14/16] [media] adv7180: Add fast switch support

2015-01-13 Thread Lars-Peter Clausen
to either enable or disable fast switch mode. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 4d789c7..82c8296 100644

[PATCH 11/16] [media] adv7180: Add support for the adv7280/adv7281/adv7282

2015-01-13 Thread Lars-Peter Clausen
This patch adds support for the adv7280/adv7281/adv7282 devices to the adv7180 driver. They are very similar to the adv7182, the main difference from the drivers point of view are some different tuning constants for improved video performance. Signed-off-by: Lars-Peter Clausen l...@metafoo.de

[PATCH 06/16] [media] adv7180: Reset the device before initialization

2015-01-13 Thread Lars-Peter Clausen
Reset the device when initializing it so it is in a good known state and the assumed register settings matches the actual register settings. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions

[PATCH 05/16] [media] adv7180: Do implicit register paging

2015-01-13 Thread Lars-Peter Clausen
means that a register access is not a single atomic i2c_smbus_write_byte_data() or i2c_smbus_read_byte_data() call and we need to make sure that concurrent register access does not race against each other. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7180.c | 206

[PATCH 07/16] [media] adv7180: Add media controller support

2015-01-13 Thread Lars-Peter Clausen
the V4L2_SUBDEV_FL_HAS_DEVNODE flag for the subdevice so it is possible to create a subdevice device node. Since the driver now depends on VIDEO_V4L2_SUBDEV_API all drivers which select the driver need to depend on that symbol as well. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media

[PATCH 02/16] [media] adv7180: Pass correct flags to request_threaded_irq()

2015-01-13 Thread Lars-Peter Clausen
Most IRQ controllers support different types of interrupts. The adv7180 generates falling edge interrupts, so make sure to pass IRQF_TRIGGER_FALLING to request_threaded_irq() so the IRQ controller is configured for the correct mode. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers

Re: [PATCH 16/16] [media] Add MAINTAINERS entry for the adv7180

2015-01-13 Thread Lars-Peter Clausen
On 01/13/2015 01:55 PM, Mats Randgaard (matrandg) wrote: On 01/13/2015 01:01 PM, Lars-Peter Clausen wrote: Add myself as the maintainer for the adv7180 video subdev driver. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions

Re: [PATCH 00/16] [media] adv7180: Add support for different chip

2015-01-13 Thread Lars-Peter Clausen
On 01/13/2015 02:04 PM, Hans Verkuil wrote: Hi Lars, On 01/13/15 13:01, Lars-Peter Clausen wrote: The adv7180 is part of a larger family of chips which all implement different features from a feature superset. This patch series step by step extends the current adv7180 with features from

Re: [PATCH 1/2] regmap: pass map name to lockdep

2014-12-19 Thread Lars-Peter Clausen
On 12/19/2014 11:58 AM, Antti Palosaari wrote: On 12/18/2014 11:34 PM, Lars-Peter Clausen wrote: On 12/18/2014 10:05 PM, Antti Palosaari wrote: lockdep complains recursive locking and deadlock when two different regmap instances are called in a nested order. That happen easily for example when

Re: [RFC PATCH 0/3] Introduce IIO interface for fingerprint sensors

2014-12-18 Thread Lars-Peter Clausen
Adding V4L folks to Cc for more input. On 12/08/2014 03:10 PM, Baluta, Teodora wrote: Hello, On Vi, 2014-12-05 at 02:15 +, Jonathan Cameron wrote: On 04/12/14 13:00, Teodora Baluta wrote: This patchset adds support for fingerprint sensors through the IIO interface. This way userspace

Re: [PATCH 1/2] regmap: pass map name to lockdep

2014-12-18 Thread Lars-Peter Clausen
On 12/18/2014 10:05 PM, Antti Palosaari wrote: lockdep complains recursive locking and deadlock when two different regmap instances are called in a nested order. That happen easily for example when both I2C client and muxed/repeater I2C adapter are using regmap. As a solution, pass regmap name

Re: [PATCH 1/2] [media] adv7180: Simplify PM hooks

2014-12-16 Thread Lars-Peter Clausen
On 12/16/2014 05:49 PM, Fabio Estevam wrote: The macro SIMPLE_DEV_PM_OPS already takes care of the CONFIG_PM_SLEEP=n case. I guess that's kind of debatable. The purpose of ifdef-ing stuff out is to decrease the driver size if PM support is disabled. With this change you are adding a rather

Re: [RFC] adp1653: Add device tree bindings for LED controller

2014-11-16 Thread Lars-Peter Clausen
On 11/16/2014 08:59 AM, Pavel Machek wrote: [...] + adp1653: adp1653@30 { + compatible = ad,adp1653; The Analog Devices vendor prefix is adi. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More

Re: [alsa-devel] [PATCH v2 5/6] sound/usb: pcm changes to use media token api

2014-10-16 Thread Lars-Peter Clausen
On 10/14/2014 04:58 PM, Shuah Khan wrote: [...] switch (cmd) { case SNDRV_PCM_TRIGGER_START: + err = media_get_audio_tkn(subs-dev-dev); + if (err == -EBUSY) { + dev_info(subs-dev-dev, %s device is busy\n, +

Re: [PATCH v2 1/2] Allow DT parsing of secondary devices

2014-08-29 Thread Lars-Peter Clausen
On 08/29/2014 05:15 PM, Jean-Michel Hautbois wrote: This is based on reg and reg-names in DT. Example: reg = 0x10 0x20 0x30; reg-names = main, io, test; This function will create dummy devices io and test with addresses 0x20 and 0x30 respectively. Signed-off-by: Jean-Michel Hautbois

Re: [PATCH v2 1/2] Allow DT parsing of secondary devices

2014-08-29 Thread Lars-Peter Clausen
On 08/29/2014 05:15 PM, Jean-Michel Hautbois wrote: This is based on reg and reg-names in DT. Example: reg = 0x10 0x20 0x30; reg-names = main, io, test; This function will create dummy devices io and test with addresses 0x20 and 0x30 respectively. Signed-off-by: Jean-Michel Hautbois

Re: [PATCH] Add support for definition of register maps in DT in ADV7604

2014-08-27 Thread Lars-Peter Clausen
On 08/27/2014 03:03 PM, Hans Verkuil wrote: On 08/27/14 14:53, jean-michel.hautb...@vodalys.com wrote: From: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com This patch adds support for DT parsing of register maps adresses. This allows multiple adv76xx devices on the same bus.

[PATCH] [media] adv7604: Update recommended writes for the adv7611

2014-06-17 Thread Lars-Peter Clausen
enhance performance in some cases. Signed-off-by: Lars-Peter Clausen l...@metafoo.de --- drivers/media/i2c/adv7604.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 1778d32..d4fa213 100644 --- a/drivers/media/i2c

Re: [GIT PULL for 3.16-rc1] updates and DT support for adv7604

2014-06-06 Thread Lars-Peter Clausen
On 06/06/2014 05:49 PM, Ben Dooks wrote: On 05/06/14 13:55, Mauro Carvalho Chehab wrote: Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media topic/adv76xx For adv7604 driver updates, including DT support. Can we use the adv7611 for the adv7612 with

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread Lars-Peter Clausen
On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe berthe...@gmail.com wrote: --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1263,10 +1263,9 @@ static void gpiochip_irqchip_remove(struct

Re: [PATCH] [media] adv7180: free an interrupt on failure paths in init_device()

2014-03-21 Thread Lars-Peter Clausen
On 03/14/2014 10:04 PM, Alexey Khoroshilov wrote: There is request_irq() in init_device(), but the interrupt is not removed on failure paths. The patch adds proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov

Re: [PATCH 7/7] [media] adv7180: Add support for power down

2014-03-10 Thread Lars-Peter Clausen
On 03/10/2014 03:37 PM, Hans Verkuil wrote: [...] + +static int adv7180_s_power(struct v4l2_subdev *sd, int on) +{ + struct adv7180_state *state = to_state(sd); + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; + + ret =

Re: [PATCH 7/7] [media] adv7180: Add support for power down

2014-03-10 Thread Lars-Peter Clausen
On 03/10/2014 04:28 PM, Hans Verkuil wrote: On 03/10/2014 04:24 PM, Lars-Peter Clausen wrote: On 03/10/2014 03:37 PM, Hans Verkuil wrote: [...] + +static int adv7180_s_power(struct v4l2_subdev *sd, int on) +{ + struct adv7180_state *state = to_state(sd); + struct i2c_client *client

  1   2   >