From: Jonathan Cameron <jic23@cam.ac.uk>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: soc-camera: Why are exposure and gain handled via special cases?
Date: Mon, 08 Jun 2009 16:31:59 +0000 [thread overview]
Message-ID: <4A2D3CFF.9010303@cam.ac.uk> (raw)
Hi All,
Whilst working on merging the various ov7670 drivers posted
recently, I came across the following in soc-camera:
static int soc_camera_g_ctrl(struct file *file, void *priv,
struct v4l2_control *ctrl)
{
struct soc_camera_file *icf = file->private_data;
struct soc_camera_device *icd = icf->icd;
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
WARN_ON(priv != file->private_data);
switch (ctrl->id) {
case V4L2_CID_GAIN:
if (icd->gain == (unsigned short)~0)
return -EINVAL;
ctrl->value = icd->gain;
return 0;
case V4L2_CID_EXPOSURE:
if (icd->exposure == (unsigned short)~0)
return -EINVAL;
ctrl->value = icd->exposure;
return 0;
}
return v4l2_device_call_until_err(&ici->v4l2_dev, (__u32)icd, core, g_ctrl, ctrl);
}
Why are these two cases and only these two handled by soc-camera rather than being passed
on to the drivers?
Thanks,
Jonathan
next reply other threads:[~2009-06-08 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 16:31 Jonathan Cameron [this message]
2009-06-08 17:53 ` soc-camera: Why are exposure and gain handled via special cases? Guennadi Liakhovetski
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=4A2D3CFF.9010303@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=linux-media@vger.kernel.org \
/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