linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 23/24] V4L2: mt9p031: add struct v4l2_subdev_platform_data to platform data
Date: Mon, 22 Apr 2013 14:31:48 +0200	[thread overview]
Message-ID: <1621615.OUnKCBbkfO@avalon> (raw)
In-Reply-To: <Pine.LNX.4.64.1304182346060.28933@axis700.grange>

Hi Guennadi,

On Thursday 18 April 2013 23:47:26 Guennadi Liakhovetski wrote:
> On Thu, 18 Apr 2013, Guennadi Liakhovetski wrote:
> > Adding struct v4l2_subdev_platform_data to mt9p031's platform data allows
> > the driver to use generic functions to manage sensor power supplies.
> > 
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> 
> A small addition to this one too: to be absolutely honest, I also had to
> replace 12-bit formats with their 8-bit counterparts, because only 8 data
> lanes are connected to my camera host. We'll need to somehow properly
> solve this too.

That information should be conveyed by platform/DT data for the host, and be 
used to convert the 12-bit media bus code into a 8-bit media bus code in the 
host (a core helper function would probably be helpful).

> > ---
> > 
> >  drivers/media/i2c/mt9p031.c |    1 +
> >  include/media/mt9p031.h     |    3 +++
> >  2 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
> > index 70f4525..ca2cc6e 100644
> > --- a/drivers/media/i2c/mt9p031.c
> > +++ b/drivers/media/i2c/mt9p031.c
> > @@ -1048,6 +1048,7 @@ static int mt9p031_probe(struct i2c_client *client,
> >  		goto done;
> >  	
> >  	mt9p031->subdev.dev = &client->dev;
> > +	mt9p031->subdev.pdata = &pdata->sd_pdata;
> >  	ret = v4l2_async_register_subdev(&mt9p031->subdev);
> >  
> >  done:
> > diff --git a/include/media/mt9p031.h b/include/media/mt9p031.h
> > index 0c97b19..7bf7b53 100644
> > --- a/include/media/mt9p031.h
> > +++ b/include/media/mt9p031.h
> > @@ -1,6 +1,8 @@
> >  #ifndef MT9P031_H
> >  #define MT9P031_H
> > 
> > +#include <media/v4l2-subdev.h>
> > +
> >  struct v4l2_subdev;
> >  /*
> > @@ -15,6 +17,7 @@ struct mt9p031_platform_data {
> >  	int reset;
> >  	int ext_freq;
> >  	int target_freq;
> > +	struct v4l2_subdev_platform_data sd_pdata;
> >  };
> >  
> >  #endif
-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-04-22 12:31 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 21:35 [PATCH 00/24] V4L2: subdevice pad-level API wrapper Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 01/24] V4L2: (cosmetic) remove redundant use of unlikely() Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 02/24] imx074: fix error handling for failed async subdevice registration Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 03/24] mt9t031: fix NULL dereference during probe() Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 04/24] V4L2: fix Oops on rmmod path Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 05/24] V4L2: allow dummy file-handle initialisation by v4l2_fh_init() Guennadi Liakhovetski
2013-04-19  7:22   ` Hans Verkuil
2013-04-22 12:07     ` Laurent Pinchart
2013-04-18 21:35 ` [PATCH 06/24] V4L2: add a common V4L2 subdevice platform data type Guennadi Liakhovetski
2013-04-19  7:33   ` Hans Verkuil
2013-04-19  7:48     ` Guennadi Liakhovetski
2013-04-19  8:26       ` Hans Verkuil
2013-10-17 18:24         ` Guennadi Liakhovetski
2013-11-04 11:24           ` Hans Verkuil
2013-11-06  0:13             ` Laurent Pinchart
2013-04-18 21:35 ` [PATCH 07/24] soc-camera: switch to using the new struct v4l2_subdev_platform_data Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 08/24] ARM: update all soc-camera users to new platform data layout Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 09/24] SH: " Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 10/24] soc-camera: update soc-camera-platform & its users to a " Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 11/24] soc-camera: completely remove struct soc_camera_link Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 12/24] V4L2: soc-camera: retrieve subdevice platform data from struct v4l2_subdev Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 13/24] ARM: pcm037: convert custom GPIO-based power function to a regulator Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 14/24] mx3-camera: clean up the use of platform data, add driver owner Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 15/24] mx3-camera: support asynchronous subdevice registration Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 16/24] V4L2: mt9p031: add support for V4L2 clock and asynchronous probing Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 17/24] V4L2: mt9p031: add support for .g_mbus_config() video operation Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 18/24] V4L2: mt9p031: power down the sensor if no supported device has been detected Guennadi Liakhovetski
2013-04-22 12:19   ` Laurent Pinchart
2013-04-22 12:33     ` Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 19/24] V4L2: add struct v4l2_subdev_try_buf Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 20/24] V4L2: add a subdev pointer to struct v4l2_subdev_fh Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 21/24] V4L2: add a subdevice-driver pad-operation wrapper Guennadi Liakhovetski
2013-04-19  8:20   ` Hans Verkuil
2013-04-19  8:52     ` Guennadi Liakhovetski
2013-04-19  9:40       ` Hans Verkuil
2013-04-18 21:35 ` [PATCH 22/24] V4L2: soc-camera: use the " Guennadi Liakhovetski
2013-04-18 21:35 ` [PATCH 23/24] V4L2: mt9p031: add struct v4l2_subdev_platform_data to platform data Guennadi Liakhovetski
2013-04-18 21:47   ` Guennadi Liakhovetski
2013-04-22 12:31     ` Laurent Pinchart [this message]
2013-04-22 12:39       ` Guennadi Liakhovetski
2013-04-22 12:46         ` Laurent Pinchart
2013-04-26  8:30         ` Sascha Hauer
2013-04-26  8:43           ` Guennadi Liakhovetski
2013-04-26  9:15             ` Sascha Hauer
2013-04-29  9:55               ` Laurent Pinchart
2013-04-22 12:45   ` Laurent Pinchart
2013-04-18 21:35 ` [PATCH 24/24] ARM: pcm037: support mt9p031 / mt9p006 camera sensors Guennadi Liakhovetski
2013-04-18 21:45   ` Guennadi Liakhovetski
2013-04-19 10:29 ` [PATCH 00/24] V4L2: subdevice pad-level API wrapper Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1621615.OUnKCBbkfO@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).