Linux Media Controller development
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Marco Felsch <m.felsch@pengutronix.de>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	enrico.scholz@sigma-chemnitz.de, akinobu.mita@gmail.com,
	robh+dt@kernel.org, mchehab@kernel.org, graphics@pengutronix.de,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v3 6/6] media: mt9m111: allow to setup pixclk polarity
Date: Tue, 27 Nov 2018 14:39:27 +0100	[thread overview]
Message-ID: <1543325967.8212.1.camel@pengutronix.de> (raw)
In-Reply-To: <20181127131948.maqwyqmlnwowf4ng@paasikivi.fi.intel.com>

Hi Sakari,

On Tue, 2018-11-27 at 15:19 +0200, Sakari Ailus wrote:
> Hi Marco,
> 
> On Tue, Nov 27, 2018 at 11:02:53AM +0100, Marco Felsch wrote:
> > From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> > 
> > The chip can be configured to output data transitions on the
> > rising or falling edge of PIXCLK (Datasheet R58:1[9]), default is on the
> > falling edge.
> > 
> > Parsing the fw-node is made in a subfunction to bundle all (future)
> > dt-parsing / fw-parsing stuff.
> > 
> > Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> > (m.grzeschik@pengutronix.de: Fix inverting clock. INV_PIX_CLOCK bit is set
> > per default. Set bit to 0 (enable mask bit without value) to enable
> > falling edge sampling.)
> > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > (m.felsch@pengutronix.de: use fwnode helpers)
> > (m.felsch@pengutronix.de: mv fw parsing into own function)
> > (m.felsch@pengutronix.de: adapt commit msg)
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> 
> Applied with the following diff:
> 
> diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
> index 2ef332b9b914..b6011bfddde8 100644
> --- a/drivers/media/i2c/mt9m111.c
> +++ b/drivers/media/i2c/mt9m111.c
> @@ -1172,24 +1172,24 @@ static int mt9m111_video_probe(struct i2c_client *client)
>  
>  static int mt9m111_probe_fw(struct i2c_client *client, struct mt9m111 *mt9m111)
>  {
> -	struct v4l2_fwnode_endpoint *bus_cfg;
> +	struct v4l2_fwnode_endpoint bus_cfg = {
> +		.bus_type = V4L2_MBUS_PARALLEL
> +	};
>  	struct fwnode_handle *np;
> -	int ret = 0;
> +	int ret;
>  
>  	np = fwnode_graph_get_next_endpoint(dev_fwnode(&client->dev), NULL);
>  	if (!np)
>  		return -EINVAL;
>  
> -	bus_cfg = v4l2_fwnode_endpoint_alloc_parse(np);
> -	if (IS_ERR(bus_cfg)) {
> -		ret = PTR_ERR(bus_cfg);
> +	ret = v4l2_fwnode_endpoint_alloc_parse(np, &bus_cfg);

Should that be

+	ret = v4l2_fwnode_endpoint_parse(np, &bus_cfg);

intead?

> +	if (ret)
>  		goto out_put_fw;
> -	}
>  
> -	mt9m111->pclk_sample = !!(bus_cfg->bus.parallel.flags &
> +	mt9m111->pclk_sample = !!(bus_cfg.bus.parallel.flags &
>  				  V4L2_MBUS_PCLK_SAMPLE_RISING);
>  
> -	v4l2_fwnode_endpoint_free(bus_cfg);
> +	v4l2_fwnode_endpoint_free(&bus_cfg);
>  
>  out_put_fw:
>  	fwnode_handle_put(np);
> 
> Please base on current media tree master on the next time. Thanks.

regards
Philipp

  reply	other threads:[~2018-11-28  0:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 10:02 [PATCH v3 0/6] media: mt9m111 features Marco Felsch
2018-11-27 10:02 ` [PATCH v3 1/6] media: mt9m111: add s_stream callback Marco Felsch
2018-11-27 10:02 ` [PATCH v3 2/6] media: mt9m111: add streaming check to set_fmt Marco Felsch
2018-11-27 10:02 ` [PATCH v3 3/6] media: mt9m111: add support to select formats and fps for {Q,SXGA} Marco Felsch
2018-11-27 10:02 ` [PATCH v3 4/6] dt-bindings: media: mt9m111: adapt documentation to be more clear Marco Felsch
2018-11-27 10:02 ` [PATCH v3 5/6] dt-bindings: media: mt9m111: add pclk-sample property Marco Felsch
2018-11-27 13:13   ` Sakari Ailus
2018-11-27 14:21     ` Marco Felsch
2018-11-27 15:57       ` Sakari Ailus
2018-11-27 10:02 ` [PATCH v3 6/6] media: mt9m111: allow to setup pixclk polarity Marco Felsch
2018-11-27 13:19   ` Sakari Ailus
2018-11-27 13:39     ` Philipp Zabel [this message]
2018-11-27 13:50       ` Sakari Ailus
2018-11-27 14:12         ` Philipp Zabel
2018-11-27 16:00           ` Sakari Ailus
2018-11-27 13:47     ` Marco Felsch
2018-11-27 21:15   ` Sakari Ailus
2018-11-28  8:29     ` Marco Felsch
2018-11-28  9:05       ` Sakari Ailus

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=1543325967.8212.1.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=akinobu.mita@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=graphics@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=m.grzeschik@pengutronix.de \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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