From patchwork Fri Nov 28 09:17:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5402201 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 571A2BEEA8 for ; Fri, 28 Nov 2014 09:25:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 797C520145 for ; Fri, 28 Nov 2014 09:25:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 916E02013D for ; Fri, 28 Nov 2014 09:25:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751561AbaK1JTk (ORCPT ); Fri, 28 Nov 2014 04:19:40 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:20334 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbaK1JTh (ORCPT ); Fri, 28 Nov 2014 04:19:37 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFQ006UPSKNHN70@mailout4.samsung.com>; Fri, 28 Nov 2014 18:19:35 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-60-54783e27b513 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 0F.2C.09430.72E38745; Fri, 28 Nov 2014 18:19:35 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NFQ00JKNSI8LB60@mmp2.samsung.com>; Fri, 28 Nov 2014 18:19:35 +0900 (KST) From: Jacek Anaszewski To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kyungmin.park@samsung.com, b.zolnierkie@samsung.com, pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net, sakari.ailus@iki.fi, s.nawrocki@samsung.com, Jacek Anaszewski , Hans Verkuil Subject: [PATCH/RFC v8 05/14] v4l2-ctrls: Add V4L2_CID_FLASH_SYNC_STROBE control Date: Fri, 28 Nov 2014 10:17:57 +0100 Message-id: <1417166286-27685-6-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1417166286-27685-1-git-send-email-j.anaszewski@samsung.com> References: <1417166286-27685-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKLMWRmVeSWpSXmKPExsVy+t9jQV11u4oQg8tTVCw2zljPanF050Qm iyU/dzFZ9F59zmhxtukNu8XlXXPYLLa+Wcdo0bNhK6vF3VNH2Sx273rKanH4TTurxZn9K9kc eDym/N7I6rFz1l12j8NfF7J47Jn/g9Wjb8sqRo8Vq7+ze3zeJBfAHsVlk5Kak1mWWqRvl8CV cefTHeaCieIVr+YvZm1gnCjcxcjJISFgIvFy8SQ2CFtM4sK99UA2F4eQwHRGiaf9S9ghnHYm iUt7PjGDVLEJGEr8fPGaqYuRg0NEIFri0rF6kBpmgc+MEhffLwebJCwQIPFwxjUWEJtFQFXi +e2prCA2r4CHxKeevWC9EgIKEnMm2YCEOQU8JeZ+XssCEhYCKln0KmUCI+8CRoZVjKKpBckF xUnpuUZ6xYm5xaV56XrJ+bmbGMGB+Ux6B+OqBotDjAIcjEo8vD//lYcIsSaWFVfmHmKU4GBW EuE99RUoxJuSWFmVWpQfX1Sak1p8iFGag0VJnPfGzdwQIYH0xJLU7NTUgtQimCwTB6dUA2Pf Wq/fL+fPSejv2CNwpCieubAhyW6rzVnGsrJ5IccD/hR8vV84s5HvYXgE44YLGWe/n9O+kawv 3iC+LnKHbCRvx0ztsnWrs8/HX5ku0u1nkrTT6Ijwj8z3Dx123HocccLxcqHY2giPp3fYzqlE Sp5fFmPJvCuDnbOdz3KNDEvTQtvTdZzrpiixFGckGmoxFxUnAgAnTl4iSAIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add V4L2_CID_FLASH_SYNC_STROBE control for determining whether a flash device strobe has to be synchronized with other flash leds controller by the same device. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Sakari Ailus Cc: Hans Verkuil --- Documentation/DocBook/media/v4l/controls.xml | 9 +++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++ include/uapi/linux/v4l2-controls.h | 1 + 3 files changed, 12 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index e013e4b..35e9ea3 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -4563,6 +4563,15 @@ interface and may change in the future. after strobe during which another strobe will not be possible. This is a read-only control. + + V4L2_CID_FLASH_SYNC_STROBE + boolean + + + Synchronized strobe: whether the flash + should be strobed synchronously with the other ones controlled + by the same device + diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 45c5b47..a7cca8c 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -846,6 +846,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_SYNC_STROBE: return "Synchronize Strobe"; /* JPEG encoder controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ @@ -949,6 +950,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FLASH_STROBE_STATUS: case V4L2_CID_FLASH_CHARGE: case V4L2_CID_FLASH_READY: + case V4L2_CID_FLASH_SYNC_STROBE: case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE: case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 661f119..5bce13d 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -833,6 +833,7 @@ 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_SYNC_STROBE (V4L2_CID_FLASH_CLASS_BASE + 13) /* JPEG-class control IDs */