mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
To: Alain Volmat <alain.volmat@foss.st.com>,
	Sylvain Petinot <sylvain.petinot@foss.st.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] media: i2c: st_mipid02: cascade s_stream call to the source subdev
Date: Tue, 25 Jul 2023 09:56:48 +0200	[thread overview]
Message-ID: <3f593961-ab8a-8498-9b34-1ce729a5f026@foss.st.com> (raw)
In-Reply-To: <20230721120316.1172445-2-alain.volmat@foss.st.com>

Hi Alain,

Reviewed-By: Benjamin Mugnier <benjamin.mugnier@foss.st.com>

On 7/21/23 14:03, Alain Volmat wrote:
> Cascade the s_stream call to the source subdev whenever the bridge
> streaming is enable / disabled.
> 
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> ---
> v2: correct uninitialized ret variable in mipid02_stream_disable
> 
>  drivers/media/i2c/st-mipid02.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
> index 906553a28676..ee456bd4cf76 100644
> --- a/drivers/media/i2c/st-mipid02.c
> +++ b/drivers/media/i2c/st-mipid02.c
> @@ -545,7 +545,14 @@ static int mipid02_configure_from_code(struct mipid02_dev *bridge)
>  static int mipid02_stream_disable(struct mipid02_dev *bridge)
>  {
>  	struct i2c_client *client = bridge->i2c_client;
> -	int ret;
> +	int ret = -EINVAL;
> +
> +	if (!bridge->s_subdev)
> +		goto error;
> +
> +	ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 0);
> +	if (ret)
> +		goto error;
>  
>  	/* Disable all lanes */
>  	ret = mipid02_write_reg(bridge, MIPID02_CLK_LANE_REG1, 0);
> @@ -633,6 +640,10 @@ static int mipid02_stream_enable(struct mipid02_dev *bridge)
>  	if (ret)
>  		goto error;
>  
> +	ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 1);
> +	if (ret)
> +		goto error;
> +
>  	return 0;
>  
>  error:

-- 
Regards,

Benjamin

  reply	other threads:[~2023-07-25  7:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 12:03 [PATCH v2 0/2] media: stm32: correct s_stream calls in dcmi & st-mipid02 Alain Volmat
2023-07-21 12:03 ` [PATCH v2 1/2] media: i2c: st_mipid02: cascade s_stream call to the source subdev Alain Volmat
2023-07-25  7:56   ` Benjamin Mugnier [this message]
2023-07-21 12:03 ` [PATCH v2 2/2] media: stm32: dcmi: only call s_stream on " Alain Volmat
2023-07-25  8:34   ` Hugues FRUCHET

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=3f593961-ab8a-8498-9b34-1ce729a5f026@foss.st.com \
    --to=benjamin.mugnier@foss.st.com \
    --cc=alain.volmat@foss.st.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sylvain.petinot@foss.st.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

all inboxes | Powered by JetHome®