From: Sakari Ailus <sakari.ailus@iki.fi>
To: Daniel Gomez <daniel@qtec.com>
Cc: mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/3] media: v4l2: Add v4l2 control IDs for temperature
Date: Tue, 28 Apr 2020 23:15:59 +0300 [thread overview]
Message-ID: <20200428201559.GV934@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <20200414200151.80089-3-daniel@qtec.com>
Hi Daniel,
On Tue, Apr 14, 2020 at 10:01:50PM +0200, Daniel Gomez wrote:
> Add a v4l2 control ID to handle the temperature.
>
> Signed-off-by: Daniel Gomez <daniel@qtec.com>
> ---
> drivers/media/v4l2-core/v4l2-ctrls.c | 5 +++++
> include/uapi/linux/v4l2-controls.h | 4 +++-
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> index 93d33d1db4e8..17b93111baa8 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -783,6 +783,7 @@ const char *v4l2_ctrl_get_name(u32 id)
> case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Min Number of Output Buffers";
> case V4L2_CID_ALPHA_COMPONENT: return "Alpha Component";
> case V4L2_CID_COLORFX_CBCR: return "Color Effects, CbCr";
> + case V4L2_CID_TEMPERATURE: return "Temperature";
What's the unit of this control? I think it should have one.
As Hans pointed out, documentation is needed.
>
> /* Codec controls */
> /* The MPEG controls are applicable to all codec controls
> @@ -1344,6 +1345,10 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
> *type = V4L2_CTRL_TYPE_INTEGER;
> *flags |= V4L2_CTRL_FLAG_READ_ONLY;
> break;
> + case V4L2_CID_TEMPERATURE:
> + *type = V4L2_CTRL_TYPE_INTEGER;
> + *flags |= V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY;
> + break;
> case V4L2_CID_MPEG_VIDEO_DEC_PTS:
> *type = V4L2_CTRL_TYPE_INTEGER64;
> *flags |= V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY;
> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
> index 1a58d7cc4ccc..76ec0a6da8d5 100644
> --- a/include/uapi/linux/v4l2-controls.h
> +++ b/include/uapi/linux/v4l2-controls.h
> @@ -143,8 +143,10 @@ enum v4l2_colorfx {
> #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41)
> #define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42)
>
> +#define V4L2_CID_TEMPERATURE (V4L2_CID_BASE+43)
> +
> /* last CID + 1 */
> -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+43)
> +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+44)
>
> /* USER-class private control IDs */
>
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2020-04-28 20:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 20:01 [RFC PATCH 0/3] v4l2 api changes for imx378 driver Daniel Gomez
2020-04-14 20:01 ` [RFC PATCH 1/3] media: v4l2-subdev.h: Add min and max enum Daniel Gomez
2020-04-30 9:42 ` Sakari Ailus
2020-04-30 11:10 ` Laurent Pinchart
2020-04-30 13:31 ` Sakari Ailus
2020-04-30 13:59 ` Laurent Pinchart
2020-04-30 14:15 ` Sakari Ailus
2020-04-30 14:17 ` Laurent Pinchart
2020-04-30 14:18 ` Sakari Ailus
2020-04-30 14:20 ` Laurent Pinchart
2020-04-14 20:01 ` [RFC PATCH 2/3] media: v4l2: Add v4l2 control IDs for temperature Daniel Gomez
2020-04-28 20:15 ` Sakari Ailus [this message]
2020-04-14 20:01 ` [RFC PATCH 3/3] media: imx378: Add imx378 camera sensor driver Daniel Gomez
2020-04-28 21:02 ` Sakari Ailus
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=20200428201559.GV934@valkosipuli.retiisi.org.uk \
--to=sakari.ailus@iki.fi \
--cc=daniel@qtec.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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
all inboxes | Powered by JetHome®