diff mbox series

[v4,06/11] media: cadence: csi2rx: Populate subdev devnode

Message ID 20210915120240.21572-7-p.yadav@ti.com
State Superseded
Headers show
Series CSI2RX support on J721E | expand

Commit Message

Pratyush Yadav Sept. 15, 2021, 12:02 p.m. UTC
The devnode can be used by media-ctl and other userspace tools to
perform configurations on the subdev. Without it, media-ctl returns
ENOENT when setting format on the sensor subdev.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>

---

(no changes since v2)

Changes in v2:
- New in v2.

 drivers/media/platform/cadence/cdns-csi2rx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart Oct. 6, 2021, 11:45 p.m. UTC | #1
Hi Pratyush,

Thank you for the patch.

On Wed, Sep 15, 2021 at 05:32:35PM +0530, Pratyush Yadav wrote:
> The devnode can be used by media-ctl and other userspace tools to

> perform configurations on the subdev. Without it, media-ctl returns

> ENOENT when setting format on the sensor subdev.

> 

> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>


Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


> ---

> 

> (no changes since v2)

> 

> Changes in v2:

> - New in v2.

> 

>  drivers/media/platform/cadence/cdns-csi2rx.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c

> index edd56c5f2e89..7c3183069db0 100644

> --- a/drivers/media/platform/cadence/cdns-csi2rx.c

> +++ b/drivers/media/platform/cadence/cdns-csi2rx.c

> @@ -602,6 +602,7 @@ static int csi2rx_probe(struct platform_device *pdev)

>  	csi2rx->pads[CSI2RX_PAD_SINK].flags = MEDIA_PAD_FL_SINK;

>  	for (i = CSI2RX_PAD_SOURCE_STREAM0; i < CSI2RX_PAD_MAX; i++)

>  		csi2rx->pads[i].flags = MEDIA_PAD_FL_SOURCE;

> +	csi2rx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;

>  

>  	ret = media_entity_pads_init(&csi2rx->subdev.entity, CSI2RX_PAD_MAX,

>  				     csi2rx->pads);


-- 
Regards,

Laurent Pinchart
diff mbox series

Patch

diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c
index edd56c5f2e89..7c3183069db0 100644
--- a/drivers/media/platform/cadence/cdns-csi2rx.c
+++ b/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -602,6 +602,7 @@  static int csi2rx_probe(struct platform_device *pdev)
 	csi2rx->pads[CSI2RX_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
 	for (i = CSI2RX_PAD_SOURCE_STREAM0; i < CSI2RX_PAD_MAX; i++)
 		csi2rx->pads[i].flags = MEDIA_PAD_FL_SOURCE;
+	csi2rx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
 	ret = media_entity_pads_init(&csi2rx->subdev.entity, CSI2RX_PAD_MAX,
 				     csi2rx->pads);