From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kyungmin.park@samsung.com, b.zolnierkie@samsung.com,
Jacek Anaszewski <j.anaszewski@samsung.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: [PATCH/RFC v5 1/3] v4l2-ctrls: add control for flash strobe signal providers
Date: Wed, 20 Aug 2014 15:43:09 +0200 [thread overview]
Message-ID: <1408542191-335-2-git-send-email-j.anaszewski@samsung.com> (raw)
In-Reply-To: <1408542191-335-1-git-send-email-j.anaszewski@samsung.com>
Add V4L2_CID_STROBE_PROVIDER of type menu, which allows
for enumerating of available external flash strobe signal
providers and setting the active one.
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
---
Documentation/DocBook/media/v4l/controls.xml | 11 +++++++++++
drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++
include/uapi/linux/v4l2-controls.h | 2 ++
3 files changed, 15 insertions(+)
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 9f5ffd8..bb18b13 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -4413,6 +4413,17 @@ interface and may change in the future.</para>
is strobing at the moment or not. This is a read-only
control.</entry>
</row>
+ <row>
+ <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_PROVIDER</constant></entry>
+ <entry>menu</entry>
+ </row>
+ <row>
+ <entry spanname="descr">Provider of the external strobe signal. If a flash
+ device declares more than one available external strobe signal provider then
+ this control allows to select the active one. &VIDIOC-QUERYCTRL; has to be
+ used to get the list of available strobe providers.
+ </entry>
+ </row>
<row>
<entry spanname="id"><constant>V4L2_CID_FLASH_TIMEOUT</constant></entry>
<entry>integer</entry>
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index f030d6a..30b6f45 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -844,6 +844,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_FLASH_FAULT: return "Faults";
case V4L2_CID_FLASH_CHARGE: return "Charge";
case V4L2_CID_FLASH_READY: return "Ready to Strobe";
+ case V4L2_CID_FLASH_STROBE_PROVIDER: return "Strobe Provider";
/* JPEG encoder controls */
/* Keep the order of the 'case's the same as in v4l2-controls.h! */
@@ -1035,6 +1036,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_TUNE_DEEMPHASIS:
case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL:
case V4L2_CID_DETECT_MD_MODE:
+ case V4L2_CID_FLASH_STROBE_PROVIDER:
*type = V4L2_CTRL_TYPE_MENU;
break;
case V4L2_CID_LINK_FREQ:
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index e946e43..b79c4aa 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -832,6 +832,8 @@ enum v4l2_flash_strobe_source {
#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
+#define V4L2_CID_FLASH_STROBE_PROVIDER (V4L2_CID_FLASH_CLASS_BASE + 13)
+
/* JPEG-class control IDs */
--
1.7.9.5
next prev parent reply other threads:[~2014-08-20 13:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 13:43 [PATCH/RFC v5 0/3] LED / flash API integration - V4L2 Flash Jacek Anaszewski
2014-08-20 13:43 ` Jacek Anaszewski [this message]
2014-08-20 13:43 ` [PATCH/RFC v5 2/3] media: Add registration helpers for V4L2 flash Jacek Anaszewski
2014-08-20 13:43 ` [PATCH/RFC v5 3/3] exynos4-is: Add support for v4l2-flash subdevs Jacek Anaszewski
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=1408542191-335-2-git-send-email-j.anaszewski@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=hans.verkuil@cisco.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
/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).