[libcamera-devel] [PATCH 3/4] media: bcm2835: Register sensor devnode as read-only

Jacopo Mondi jacopo at jmondi.org
Tue Mar 24 21:28:43 CET 2020


The bcm2835 bridge drivers controls the camera sensor configuration through
direct calls to the kapi realized by the v4l2 sub-device operations and
does not allow userspace to change the sensor parameter through the
sub-device devnode.

In order to expose to userspace the current sensor configuration,
register the device node in read-only mode by using the newly introduced
v4l2_device_register_subdev_ro_nodes() function.

Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
 drivers/media/platform/bcm2835/bcm2835-unicam.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/bcm2835/bcm2835-unicam.c b/drivers/media/platform/bcm2835/bcm2835-unicam.c
index 89bd1c842d38..5001976dcebc 100644
--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c
+++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c
@@ -2875,7 +2875,7 @@ static int unicam_probe_complete(struct unicam_device *unicam)
 		goto unregister;
 	}
 
-	ret = v4l2_device_register_subdev_nodes(&unicam->v4l2_dev);
+	ret = v4l2_device_register_ro_subdev_nodes(&unicam->v4l2_dev);
 	if (ret) {
 		unicam_err(unicam, "Unable to register subdev nodes.\n");
 		goto unregister;
-- 
2.25.1



More information about the libcamera-devel mailing list