All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: max9286: Implement media entity .link_validate() operation
@ 2022-01-13 20:51 Laurent Pinchart
  2022-01-14  8:19 ` Jacopo Mondi
  2022-01-26  9:54 ` Kieran Bingham
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Pinchart @ 2022-01-13 20:51 UTC (permalink / raw)
  To: linux-media
  Cc: linux-renesas-soc, Jacopo Mondi, Kieran Bingham, Niklas Söderlund

The MAX9286 has sink pads, so it should implement .link_validate(). Do
so.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/media/i2c/max9286.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index eb2b8e42335b..b4885d3b3059 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -846,6 +846,10 @@ static const struct v4l2_subdev_internal_ops max9286_subdev_internal_ops = {
 	.open = max9286_open,
 };
 
+static const struct media_entity_operations max9286_media_ops = {
+	.link_validate = v4l2_subdev_link_validate
+};
+
 static int max9286_s_ctrl(struct v4l2_ctrl *ctrl)
 {
 	switch (ctrl->id) {
@@ -895,6 +899,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
 		goto err_async;
 
 	priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
+	priv->sd.entity.ops = &max9286_media_ops;
 
 	priv->pads[MAX9286_SRC_PAD].flags = MEDIA_PAD_FL_SOURCE;
 	for (i = 0; i < MAX9286_SRC_PAD; i++)
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: i2c: max9286: Implement media entity .link_validate() operation
  2022-01-13 20:51 [PATCH] media: i2c: max9286: Implement media entity .link_validate() operation Laurent Pinchart
@ 2022-01-14  8:19 ` Jacopo Mondi
  2022-01-26  9:54 ` Kieran Bingham
  1 sibling, 0 replies; 3+ messages in thread
From: Jacopo Mondi @ 2022-01-14  8:19 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-media, linux-renesas-soc, Kieran Bingham, Niklas Söderlund

Hi Laurent,

On Thu, Jan 13, 2022 at 10:51:50PM +0200, Laurent Pinchart wrote:
> The MAX9286 has sink pads, so it should implement .link_validate(). Do
> so.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Indeed

Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks
   j

> ---
>  drivers/media/i2c/max9286.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
> index eb2b8e42335b..b4885d3b3059 100644
> --- a/drivers/media/i2c/max9286.c
> +++ b/drivers/media/i2c/max9286.c
> @@ -846,6 +846,10 @@ static const struct v4l2_subdev_internal_ops max9286_subdev_internal_ops = {
>  	.open = max9286_open,
>  };
>
> +static const struct media_entity_operations max9286_media_ops = {
> +	.link_validate = v4l2_subdev_link_validate
> +};
> +
>  static int max9286_s_ctrl(struct v4l2_ctrl *ctrl)
>  {
>  	switch (ctrl->id) {
> @@ -895,6 +899,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
>  		goto err_async;
>
>  	priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
> +	priv->sd.entity.ops = &max9286_media_ops;
>
>  	priv->pads[MAX9286_SRC_PAD].flags = MEDIA_PAD_FL_SOURCE;
>  	for (i = 0; i < MAX9286_SRC_PAD; i++)
> --
> Regards,
>
> Laurent Pinchart
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: i2c: max9286: Implement media entity .link_validate() operation
  2022-01-13 20:51 [PATCH] media: i2c: max9286: Implement media entity .link_validate() operation Laurent Pinchart
  2022-01-14  8:19 ` Jacopo Mondi
@ 2022-01-26  9:54 ` Kieran Bingham
  1 sibling, 0 replies; 3+ messages in thread
From: Kieran Bingham @ 2022-01-26  9:54 UTC (permalink / raw)
  To: Laurent Pinchart, linux-media
  Cc: linux-renesas-soc, Jacopo Mondi, Niklas Söderlund

Hi Laurent,

Quoting Laurent Pinchart (2022-01-13 20:51:50)
> The MAX9286 has sink pads, so it should implement .link_validate(). Do
> so.
> 

I hope none of my scripts got by working because of the lack of this
check ;-)

But I agree it should be added.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

I'll aim to test it next time I boot up the Salvator-X or Eagle.

--
Kieran


> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/media/i2c/max9286.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
> index eb2b8e42335b..b4885d3b3059 100644
> --- a/drivers/media/i2c/max9286.c
> +++ b/drivers/media/i2c/max9286.c
> @@ -846,6 +846,10 @@ static const struct v4l2_subdev_internal_ops max9286_subdev_internal_ops = {
>         .open = max9286_open,
>  };
>  
> +static const struct media_entity_operations max9286_media_ops = {
> +       .link_validate = v4l2_subdev_link_validate
> +};
> +
>  static int max9286_s_ctrl(struct v4l2_ctrl *ctrl)
>  {
>         switch (ctrl->id) {
> @@ -895,6 +899,7 @@ static int max9286_v4l2_register(struct max9286_priv *priv)
>                 goto err_async;
>  
>         priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
> +       priv->sd.entity.ops = &max9286_media_ops;
>  
>         priv->pads[MAX9286_SRC_PAD].flags = MEDIA_PAD_FL_SOURCE;
>         for (i = 0; i < MAX9286_SRC_PAD; i++)
> -- 
> Regards,
> 
> Laurent Pinchart
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-26  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 20:51 [PATCH] media: i2c: max9286: Implement media entity .link_validate() operation Laurent Pinchart
2022-01-14  8:19 ` Jacopo Mondi
2022-01-26  9:54 ` Kieran Bingham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.