public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Satish Nagireddy <satish.nagireddy@getcruise.com>,
	Matti Vaittinen <mazziesaccount@gmail.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/9] media: i2c: ds90ub9x3: Fix sub-device matching
Date: Mon, 31 Jul 2023 17:43:56 +0300	[thread overview]
Message-ID: <20230731144356.GA30939@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230731-fpdlink-additions-v3-1-8acfc49c215a@ideasonboard.com>

Hi Tomi,

Thank you for the patch.

On Mon, Jul 31, 2023 at 04:24:35PM +0300, Tomi Valkeinen wrote:
> 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode

s/^/Commit /

> matching") recently changed how async sub-device matching works. This
> breaks the UB9x3 drivers, as they set the subdev.fwnode to an endpoint.
> Afaiu, the fix is simply to not set subdev.fwnode at all.
> 
> Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>

Sakari, was the v4l2-async series meant to break these drivers ? I
understand the two series got merged for the same kernel version, is
this a merge conflict, or is there an issue in the v4l2-async rework ?

> ---
>  drivers/media/i2c/ds90ub913.c | 14 +-------------
>  drivers/media/i2c/ds90ub953.c | 13 +------------
>  2 files changed, 2 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c
> index 80d9cf6dd945..5410ccb54057 100644
> --- a/drivers/media/i2c/ds90ub913.c
> +++ b/drivers/media/i2c/ds90ub913.c
> @@ -749,19 +749,9 @@ static int ub913_subdev_init(struct ub913_data *priv)
>  	if (ret)
>  		return dev_err_probe(dev, ret, "Failed to init pads\n");
>  
> -	priv->sd.fwnode = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev),
> -							  UB913_PAD_SOURCE, 0,
> -							  0);
> -
> -	if (!priv->sd.fwnode) {
> -		ret = -ENODEV;
> -		dev_err_probe(dev, ret, "Missing TX endpoint\n");
> -		goto err_entity_cleanup;
> -	}
> -
>  	ret = v4l2_subdev_init_finalize(&priv->sd);
>  	if (ret)
> -		goto err_fwnode_put;
> +		goto err_entity_cleanup;
>  
>  	ret = ub913_v4l2_notifier_register(priv);
>  	if (ret) {
> @@ -782,8 +772,6 @@ static int ub913_subdev_init(struct ub913_data *priv)
>  	ub913_v4l2_nf_unregister(priv);
>  err_subdev_cleanup:
>  	v4l2_subdev_cleanup(&priv->sd);
> -err_fwnode_put:
> -	fwnode_handle_put(priv->sd.fwnode);
>  err_entity_cleanup:
>  	media_entity_cleanup(&priv->sd.entity);
>  
> diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c
> index cadf75eb0773..20b9cf893f74 100644
> --- a/drivers/media/i2c/ds90ub953.c
> +++ b/drivers/media/i2c/ds90ub953.c
> @@ -1221,18 +1221,9 @@ static int ub953_subdev_init(struct ub953_data *priv)
>  	if (ret)
>  		return dev_err_probe(dev, ret, "Failed to init pads\n");
>  
> -	priv->sd.fwnode = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev),
> -							  UB953_PAD_SOURCE, 0,
> -							  0);
> -	if (!priv->sd.fwnode) {
> -		ret = -ENODEV;
> -		dev_err_probe(dev, ret, "Missing TX endpoint\n");
> -		goto err_entity_cleanup;
> -	}
> -
>  	ret = v4l2_subdev_init_finalize(&priv->sd);
>  	if (ret)
> -		goto err_fwnode_put;
> +		goto err_entity_cleanup;
>  
>  	ret = ub953_v4l2_notifier_register(priv);
>  	if (ret) {
> @@ -1253,8 +1244,6 @@ static int ub953_subdev_init(struct ub953_data *priv)
>  	ub953_v4l2_notifier_unregister(priv);
>  err_free_state:
>  	v4l2_subdev_cleanup(&priv->sd);
> -err_fwnode_put:
> -	fwnode_handle_put(priv->sd.fwnode);
>  err_entity_cleanup:
>  	media_entity_cleanup(&priv->sd.entity);
>  
> 

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-07-31 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 13:24 [PATCH v3 0/9] media: i2c: ds90ub9xx: Misc improvements Tomi Valkeinen
2023-07-31 13:24 ` [PATCH v3 1/9] media: i2c: ds90ub9x3: Fix sub-device matching Tomi Valkeinen
2023-07-31 14:43   ` Laurent Pinchart [this message]
2023-07-31 19:05     ` Sakari Ailus
2023-07-31 13:24 ` [PATCH v3 2/9] media: i2c: ds90ub960: Configure CSI-2 continuous clock Tomi Valkeinen
2023-07-31 13:24 ` [PATCH v3 3/9] media: i2c: ds90ub953: Use v4l2_fwnode_endpoint_parse() Tomi Valkeinen
2023-07-31 13:24 ` [PATCH v3 4/9] media: i2c: ds90ub913: " Tomi Valkeinen
2023-07-31 13:24 ` [PATCH v3 5/9] media: i2c: ds90ub953: Handle V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK Tomi Valkeinen
2023-07-31 13:24 ` [PATCH v3 6/9] media: i2c: ds90ub960: Allow FPD-Link async mode Tomi Valkeinen
2023-07-31 13:24 ` [PATCH v3 7/9] media: i2c: ds90ub953: Restructure clkout management Tomi Valkeinen
2023-08-01 13:53   ` Andy Shevchenko
2023-07-31 13:24 ` [PATCH v3 8/9] media: i2c: ds90ub953: Support non-sync mode Tomi Valkeinen
2023-07-31 13:24 ` [PATCH v3 9/9] media: i2c: ds90ub960: Rename RXPORT_MODE_CSI2_ASYNC to RXPORT_MODE_CSI2_NONSYNC Tomi Valkeinen

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=20230731144356.GA30939@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mazziesaccount@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=satish.nagireddy@getcruise.com \
    --cc=tomi.valkeinen@ideasonboard.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