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 6/8] media: uapi: Add mlx7502x header file
Date: Fri, 25 Nov 2022 17:09:27 +0200 [thread overview]
Message-ID: <Y4DapxID8+uKoZSI@melexis.com> (raw)
In-Reply-To: <06d4c93d-3f94-cc95-f123-751e7bb2ab3b@xs4all.nl>
On Fri, Nov 25, 2022 at 03:39:16PM +0100, Hans Verkuil wrote:
> On 25/11/2022 14:34, Volodymyr Kharuk wrote:
> > Define user controls for mlx7502x driver, add its documentation and
> > update MAINTAINERS
> >
> > Signed-off-by: Volodymyr Kharuk <vkh@melexis.com>
> > ---
> > .../userspace-api/media/drivers/index.rst | 1 +
> > .../userspace-api/media/drivers/mlx7502x.rst | 28 +++++++++++++++++++
> > MAINTAINERS | 2 ++
> > include/uapi/linux/mlx7502x.h | 20 +++++++++++++
> > 4 files changed, 51 insertions(+)
> > create mode 100644 Documentation/userspace-api/media/drivers/mlx7502x.rst
> > create mode 100644 include/uapi/linux/mlx7502x.h
> >
> > diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst
> > index 32f82aed47d9..f49e1b64c256 100644
> > --- a/Documentation/userspace-api/media/drivers/index.rst
> > +++ b/Documentation/userspace-api/media/drivers/index.rst
> > @@ -37,5 +37,6 @@ For more details see the file COPYING in the source distribution of Linux.
> > imx-uapi
> > max2175
> > meye-uapi
> > + mlx7502x
> > omap3isp-uapi
> > uvcvideo
> > diff --git a/Documentation/userspace-api/media/drivers/mlx7502x.rst b/Documentation/userspace-api/media/drivers/mlx7502x.rst
> > new file mode 100644
> > index 000000000000..6f4874ec010d
> > --- /dev/null
> > +++ b/Documentation/userspace-api/media/drivers/mlx7502x.rst
> > @@ -0,0 +1,28 @@
> > +.. SPDX-License-Identifier: GPL-2.0
> > +
> > +Melexis mlx7502x ToF camera sensor driver
> > +=========================================
> > +
> > +The mlx7502x driver implements the following driver-specific controls:
> > +
> > +``V4L2_CID_MLX7502X_OUTPUT_MODE (menu)``
> > +----------------------------------------
> > + The sensor has two taps, which gather reflected light: A and B.
> > + The control sets the way data should be put in a buffer. The most
> > + common output mode is A-B which provides the best sunlight robustness.
> > +
> > +.. flat-table::
> > + :header-rows: 0
> > + :stub-columns: 0
> > + :widths: 1 4
> > +
> > + * - ``(0)``
> > + - A minus B
> > + * - ``(1)``
> > + - A plus B
> > + * - ``(2)``
> > + - only A
> > + * - ``(3)``
> > + - only B
> > + * - ``(4)``
> > + - A and B (this config will change PAD format)
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index a2bc2ce53056..0a6dda8da6bc 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -13116,7 +13116,9 @@ M: Volodymyr Kharuk <vkh@melexis.com>
> > L: linux-media@vger.kernel.org
> > S: Supported
> > W: http://www.melexis.com
> > +F: Documentation/userspace-api/media/drivers/mlx7502x.rst
> > F: Documentation/userspace-api/media/v4l/ext-ctrls-tof.rst
> > +F: include/uapi/linux/mlx7502x.h
> >
> > MELFAS MIP4 TOUCHSCREEN DRIVER
> > M: Sangwon Jee <jeesw@melfas.com>
> > diff --git a/include/uapi/linux/mlx7502x.h b/include/uapi/linux/mlx7502x.h
> > new file mode 100644
> > index 000000000000..68014f550ed2
> > --- /dev/null
> > +++ b/include/uapi/linux/mlx7502x.h
> > @@ -0,0 +1,20 @@
> > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> > +/*
> > + * Melexis 7502x ToF cameras driver.
> > + *
> > + * Copyright (C) 2021 Melexis N.V.
> > + *
> > + */
> > +
> > +#ifndef __UAPI_MLX7502X_H_
> > +#define __UAPI_MLX7502X_H_
> > +
> > +#include <linux/v4l2-controls.h>
> > +
> > +/*
> > + * this is related to the taps in ToF cameras,
> > + * usually A minus B is the best option
> > + */
> > +#define V4L2_CID_MLX7502X_OUTPUT_MODE (V4L2_CID_USER_MLX7502X_BASE + 0)
>
> You need to add an enum with the mode settings. E.g.:
>
> enum v4l2_mlx7502x_output_mode {
> V4L2_MLX7502X_OUTPUT_MODE_A_MINUS_B = 0,
> ...
> };
>
> And you can use those enum defines in the documentation.
Ok, thanks. That is is interesting. Will fix in next version.
>
> Regards,
>
> Hans
>
> > +
> > +#endif /* __UAPI_MLX7502X_H_ */
>
--
--
BR,
Volodymyr Kharuk
next prev parent reply other threads:[~2022-11-25 15:09 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
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 [this message]
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=Y4DapxID8+uKoZSI@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox