linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo@jmondi.org>
To: linux-media@vger.kernel.org, libcamera-devel@lists.libcamera.org
Cc: Jacopo Mondi <jacopo@jmondi.org>,
	mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
	sakari.ailus@linux.intel.com
Subject: [PATCH 3/4] media: bcm2835: Register sensor devnode as read-only
Date: Tue, 24 Mar 2020 21:28:43 +0100	[thread overview]
Message-ID: <20200324202844.1518292-4-jacopo@jmondi.org> (raw)
In-Reply-To: <20200324202844.1518292-1-jacopo@jmondi.org>

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@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


  parent reply	other threads:[~2020-03-24 20:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 20:28 [PATCH 0/4] media: Register read-only sub-dev devnode Jacopo Mondi
2020-03-24 20:28 ` [PATCH 1/4] Documentation: media: Document read-only subdevice Jacopo Mondi
2020-03-25 21:37   ` [libcamera-devel] " Laurent Pinchart
2020-03-25 22:38     ` Laurent Pinchart
2020-03-24 20:28 ` [PATCH 2/4] media: v4l2-dev: Add v4l2_device_register_ro_subdev_node() Jacopo Mondi
2020-03-25  8:42   ` [libcamera-devel] " Andrey Konovalov
2020-03-25 11:23     ` Jacopo Mondi
2020-03-26  0:08       ` Sakari Ailus
2020-03-25 21:45   ` Laurent Pinchart
2020-03-25 22:57     ` Jacopo Mondi
2020-03-24 20:28 ` Jacopo Mondi [this message]
2020-03-24 20:28 ` [PATCH 4/4] media: bcm2835: Fix trivial whitespace error Jacopo Mondi
2020-03-24 20:46   ` [libcamera-devel] " Laurent Pinchart
2020-03-24 22:25 ` [libcamera-devel] [PATCH 0/4] media: Register read-only sub-dev devnode Dave Stevenson
2020-03-24 23:37   ` Jacopo Mondi

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=20200324202844.1518292-4-jacopo@jmondi.org \
    --to=jacopo@jmondi.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=libcamera-devel@lists.libcamera.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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;
as well as URLs for NNTP newsgroup(s).