From: Volodymyr Kharuk <vkh@melexis.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org, Andrii Kyselov <ays@melexis.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
devicetree@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Subject: Re: [PATCH v3 2/8] media: v4l: ctrls: Fill V4L2_CID_TOF_CLASS controls
Date: Fri, 25 Nov 2022 17:07:37 +0200 [thread overview]
Message-ID: <Y4DaOQKG43AbE74K@melexis.com> (raw)
In-Reply-To: <29a4cc81-f43c-71a6-25f1-23234d7041e0@xs4all.nl>
Thanks for your review.
I'll fix your remarks in next version.
On Fri, Nov 25, 2022 at 03:22:16PM +0100, Hans Verkuil wrote:
> On 25/11/2022 14:34, Volodymyr Kharuk wrote:
> > Define names, flags and types of TOF controls. *dims* is driver specific.
> > It also means, that it is not possible to use new_std for arrays.
> >
> > Signed-off-by: Volodymyr Kharuk <vkh@melexis.com>
> > ---
> > drivers/media/v4l2-core/v4l2-ctrls-defs.c | 20 ++++++++++++++++++++
> > 1 file changed, 20 insertions(+)
> >
> > diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c
> > index 564fedee2c88..1135d33c1baa 100644
> > --- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c
> > +++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c
> > @@ -1196,6 +1196,13 @@ const char *v4l2_ctrl_get_name(u32 id)
> > case V4L2_CID_COLORIMETRY_CLASS: return "Colorimetry Controls";
> > case V4L2_CID_COLORIMETRY_HDR10_CLL_INFO: return "HDR10 Content Light Info";
> > case V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY: return "HDR10 Mastering Display";
> > +
> > + /* Time of light camera controls */
> > + /* Keep the order of the 'case's the same as in v4l2-controls.h! */
> > + case V4L2_CID_TOF_CLASS: return "Time of light Camera Controls";
>
> light -> Flight
>
> > + case V4L2_CID_TOF_PHASE_SEQ: return "TOF phase sequence";
>
> Capitalize, so: "TOF Phase Sequence"
>
> > + case V4L2_CID_TOF_FMOD: return "TOF frequency modulation";
>
> "TOF Frequency Modulation"
>
> > + case V4L2_CID_TOF_TINT: return "TOF time integration";
>
> "TOF Time Integration"
>
> > default:
> > return NULL;
> > }
> > @@ -1403,6 +1410,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
> > case V4L2_CID_DETECT_CLASS:
> > case V4L2_CID_CODEC_STATELESS_CLASS:
> > case V4L2_CID_COLORIMETRY_CLASS:
> > + case V4L2_CID_TOF_CLASS:
> > *type = V4L2_CTRL_TYPE_CTRL_CLASS;
> > /* You can neither read nor write these */
> > *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY;
> > @@ -1541,6 +1549,18 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
> > case V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY:
> > *type = V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY;
> > break;
> > + case V4L2_CID_TOF_PHASE_SEQ:
> > + *type = V4L2_CTRL_TYPE_U16;
> > + *flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
> > + break;
> > + case V4L2_CID_TOF_FMOD:
> > + *type = V4L2_CTRL_TYPE_U8;
> > + *flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
> > + break;
> > + case V4L2_CID_TOF_TINT:
> > + *type = V4L2_CTRL_TYPE_U16;
> > + *flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
> > + break;
> > default:
> > *type = V4L2_CTRL_TYPE_INTEGER;
> > break;
>
> Regards,
>
> Hans
--
--
BR,
Volodymyr Kharuk
next prev parent reply other threads:[~2022-11-25 15:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 13:34 [PATCH v3 0/8] media: i2c: mlx7502x ToF camera support Volodymyr Kharuk
2022-11-25 13:34 ` [PATCH v3 1/8] media: uapi: ctrls: Add Time of Flight class controls Volodymyr Kharuk
2022-11-25 14:20 ` Hans Verkuil
2022-11-25 15:05 ` Volodymyr Kharuk
2022-11-25 13:34 ` [PATCH v3 2/8] media: v4l: ctrls: Fill V4L2_CID_TOF_CLASS controls Volodymyr Kharuk
2022-11-25 14:22 ` Hans Verkuil
2022-11-25 15:07 ` Volodymyr Kharuk [this message]
2022-11-25 13:34 ` [PATCH v3 3/8] media: Documentation: v4l: Add TOF class controls Volodymyr Kharuk
2022-11-25 14:28 ` Hans Verkuil
2022-11-25 16:01 ` Volodymyr Kharuk
2022-11-25 13:34 ` [PATCH v3 4/8] media: v4l: ctrls-api: Allow array update in __v4l2_ctrl_modify_range Volodymyr Kharuk
2022-11-25 14:35 ` Hans Verkuil
2022-12-01 15:44 ` Volodymyr Kharuk
2022-12-01 16:46 ` Volodymyr Kharuk
2022-11-25 13:34 ` [PATCH v3 5/8] media: v4l: ctrls: Add user control base for mlx7502x Volodymyr Kharuk
2022-11-25 13:34 ` [PATCH v3 6/8] media: uapi: Add mlx7502x header file Volodymyr Kharuk
2022-11-25 14:39 ` Hans Verkuil
2022-11-25 15:09 ` Volodymyr Kharuk
2022-11-25 13:34 ` [PATCH v3 7/8] media: dt-bindings: media: i2c: Add mlx7502x camera sensor Volodymyr Kharuk
2022-11-25 15:19 ` Krzysztof Kozlowski
2022-11-25 15:37 ` Volodymyr Kharuk
2022-11-25 13:34 ` [PATCH v3 8/8] media: i2c: Add driver for mlx7502x ToF sensor Volodymyr Kharuk
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=Y4DaOQKG43AbE74K@melexis.com \
--to=vkh@melexis.com \
--cc=ays@melexis.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.