From patchwork Wed Feb 18 16:20:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5845221 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 35BAD9F373 for ; Wed, 18 Feb 2015 16:26:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 647C320253 for ; Wed, 18 Feb 2015 16:26:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D161820225 for ; Wed, 18 Feb 2015 16:26:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753017AbbBRQZ6 (ORCPT ); Wed, 18 Feb 2015 11:25:58 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:24272 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752993AbbBRQZ4 (ORCPT ); Wed, 18 Feb 2015 11:25:56 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJZ00AFZ6Z6OB30@mailout1.samsung.com>; Thu, 19 Feb 2015 01:25:54 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-e0-54e4bd12bf5d Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id FF.14.09430.21DB4E45; Thu, 19 Feb 2015 01:25:54 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NJZ003WS6QJDJ20@mmp1.samsung.com>; Thu, 19 Feb 2015 01:25:54 +0900 (KST) From: Jacek Anaszewski To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: kyungmin.park@samsung.com, pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net, sakari.ailus@iki.fi, s.nawrocki@samsung.com, Jacek Anaszewski Subject: [PATCH/RFC v11 15/20] v4l2-ctrls: Add V4L2_CID_FLASH_SYNC_STROBE control Date: Wed, 18 Feb 2015 17:20:36 +0100 Message-id: <1424276441-3969-16-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1424276441-3969-1-git-send-email-j.anaszewski@samsung.com> References: <1424276441-3969-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsVy+t9jAV2hvU9CDN5sVbM4unMik8X8I+dY LXqvPme0ONv0ht1i65t1jBY9G7ayWtw9dZTNYveup6wWh9+0s1qc2b+SzYHLY+esu+weh78u ZPHYM/8Hq0ffllWMHitWf2f3+LxJLoAtissmJTUnsyy1SN8ugStj/fcprAXrxSo+P5/G3MC4 RqiLkZNDQsBEomHTJ2YIW0ziwr31bF2MXBxCAosYJR5cvsgE4bQzSXz+/IgJpIpNwFDi54vX YLaIQKTEu6OXmEGKmAU2MEpcntDIApIQFgiW+HzuPZjNIqAq0fjsJFADBwevgIfEza9OIKaE gILEnEk2ICYnUPTCcw+QYiEBd4npN9+xTmDkXcDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/ dxMjOPSeSe9gXNVgcYhRgINRiYe34ffjECHWxLLiytxDjBIczEoivLkrn4QI8aYkVlalFuXH F5XmpBYfYpTmYFES51WybwsREkhPLEnNTk0tSC2CyTJxcEo1MAZ9qdLh3OrQlVz26U/R3ddO He6yEacOCH+5J7+//4pApd4V4zfudkIpHK7Prpc2nk5o9gz6Oev387ZVv1786c00/fic6c87 ubXZp6ZURtSf2X6zZnJ7tIPI75sadxepubY2fjmz9PfBWO7S030701vD77DuT9lQ3y95+nBk u0fG7Vs2J8+s263EUpyRaKjFXFScCADxSl+5OQIAAA== 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 Acked-by: Sakari Ailus --- 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 4e9462f..434d020 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -4562,6 +4562,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 + menu + + + Synchronized strobe: whether the flash + should be strobed synchronously with the other one 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..4bc7e00 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! */ @@ -1041,6 +1042,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_SYNC_STROBE: *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 9f6e108..7084696 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -837,6 +837,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 */