From patchwork Fri Jul 11 14:04:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 4534491 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3FAF59F392 for ; Fri, 11 Jul 2014 14:08:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C4682017A for ; Fri, 11 Jul 2014 14:08:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06B6320158 for ; Fri, 11 Jul 2014 14:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbaGKOF2 (ORCPT ); Fri, 11 Jul 2014 10:05:28 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:26531 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752861AbaGKOFZ (ORCPT ); Fri, 11 Jul 2014 10:05:25 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8J000UVWGZDI00@mailout1.samsung.com>; Fri, 11 Jul 2014 23:05:23 +0900 (KST) X-AuditID: cbfee61a-f79e46d00000134f-a6-53bfef234ea7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id EE.87.04943.32FEFB35; Fri, 11 Jul 2014 23:05:23 +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 <0N8J00JI5WF7VM80@mmp2.samsung.com>; Fri, 11 Jul 2014 23:05:23 +0900 (KST) From: Jacek Anaszewski 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 , Sakari Ailus , Hans Verkuil Subject: [PATCH/RFC v4 14/21] v4l2-ctrls: add control for flash strobe signal providers Date: Fri, 11 Jul 2014 16:04:17 +0200 Message-id: <1405087464-13762-15-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1405087464-13762-1-git-send-email-j.anaszewski@samsung.com> References: <1405087464-13762-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBLMWRmVeSWpSXmKPExsVy+t9jQV3l9/uDDe69FrXYOGM9q8X8I+dY LZb83MVk0Xv1OaPF2aY37BaXd81hs9j6Zh2jRc+GrawWZ/avZHPg9JjyeyOrx+GvC1k8+ras YvT4vEkugCWKyyYlNSezLLVI3y6BK2PGccuCLRIVC9Y/Z2xgvCvcxcjJISFgInFy0mpmCFtM 4sK99WxdjFwcQgLTGSW2Np+HctqZJM7dOwVWxSZgKPHzxWsmEFtEoFyi5/0zsCJmgc2MEnfn trGAJIQFIiX6ns8HK2IRUJXoft0D1swr4Clx9PlW9i5GDqB1ChJzJtmAhDmBwgf7b7KB2EIC HhIP155gn8DIu4CRYRWjaGpBckFxUnquoV5xYm5xaV66XnJ+7iZGcHg9k9rBuLLB4hCjAAej Eg+vwvp9wUKsiWXFlbmHGCU4mJVEeK++2R8sxJuSWFmVWpQfX1Sak1p8iFGag0VJnPdAq3Wg kEB6YklqdmpqQWoRTJaJg1OqgdF1Ucaz98d+t16J2y/2WXmd77yPDTtvWS09OFV7WnEJj7iU q0LIUstfFaEtkixL3zCtXlj/wkcnOGLO21sK5528/j1zPL+FI3bbu90pn+0qzOW2Coo3n//j EX1wSrH35w07HQ7Mj16+8tFnV4MdO+0t1D8l765uubuT6/w6VzU5waYG07OLvtxRYinOSDTU Yi4qTgQAQAkL+SsCAAA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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_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 Acked-by: Kyungmin Park Cc: Sakari Ailus Cc: Hans Verkuil --- 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 47198ee..d9f6c3f 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -4300,6 +4300,17 @@ interface and may change in the future. is strobing at the moment or not. This is a read-only control. + + V4L2_CID_FLASH_STROBE_PROVIDER + menu + + + 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. + + V4L2_CID_FLASH_TIMEOUT integer diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 55c6832..f298f7e 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -825,6 +825,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 videodev2.h! */ @@ -988,6 +989,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_TEST_PATTERN: case V4L2_CID_TUNE_DEEMPHASIS: case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL: + 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 2ac5597..1f05c7c 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -822,6 +822,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 */