From patchwork Wed Dec 3 16:06:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5432051 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 46E1A9F1C5 for ; Wed, 3 Dec 2014 16:14:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8628120373 for ; Wed, 3 Dec 2014 16:14:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FD582012E for ; Wed, 3 Dec 2014 16:14:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753141AbaLCQIw (ORCPT ); Wed, 3 Dec 2014 11:08:52 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:26324 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751860AbaLCQIu (ORCPT ); Wed, 3 Dec 2014 11:08:50 -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 <0NG000K56KUOAL10@mailout1.samsung.com>; Thu, 04 Dec 2014 01:08:48 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-a2-547f35901a76 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 3A.BE.09430.0953F745; Thu, 04 Dec 2014 01:08:48 +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 <0NG000LO7KRKV100@mmp2.samsung.com>; Thu, 04 Dec 2014 01:08:48 +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, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, Jacek Anaszewski Subject: [PATCH/RFC v9 15/19] Documentation: leds: Add description of v4l2-flash sub-device Date: Wed, 03 Dec 2014 17:06:50 +0100 Message-id: <1417622814-10845-16-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1417622814-10845-1-git-send-email-j.anaszewski@samsung.com> References: <1417622814-10845-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsVy+t9jQd0JpvUhBrvPylhsnLGe1eLozolM Fv1vFrJanHu1ktGi9+pzRouzTW/YLS7vmsNmsfXNOkaLng1bWS2WXr/IZHH31FE2iwnT17JY tO49wm6xe9dTVovDb9pZLc7sX8nmIOCxZt4aRo/Lfb1MHjtn3WX3WLn8C5vH4a8LWTw2repk 89gz/werR9+WVYweK1Z/Z/f4vEkugCuKyyYlNSezLLVI3y6BK+Pf881MBbd5KtqmTWRsYHzE 1cXIySEhYCLx/dpVVghbTOLCvfVsXYxcHEIC0xklpu+ZxwrhtDNJXD/8gAWkik3AUOLni9dM XYwcHCIC0RKXjtWDhJkFDjJJ3HpcDmILC8RKzP94lgnEZhFQlfj35yEbiM0r4Cnxdu4ldpBW CQEFiTmTbEDCnEDhpz/ug4WFBDwkDk70n8DIu4CRYRWjaGpBckFxUnqukV5xYm5xaV66XnJ+ 7iZGcHA/k97BuKrB4hCjAAejEg+vRVxdiBBrYllxZe4hRgkOZiUR3mffgEK8KYmVValF+fFF pTmpxYcYpTlYlMR5b9zMDRESSE8sSc1OTS1ILYLJMnFwSjUwpq010zqyxndjvNSGx14/V7Uv l7KSMYt7VcN+KkwmusOFfW9IzfIf3lMPfTd5cybvu8Ytx7b2joNt03fcnWfsvVv/7YRzcx/q RdkXrjC4weyW6dx1cVVQ1ImcvpiDUTd5sieXpSzp6j6p+GNpHG/+iq0MnLd6TJ+s1FWc6vfj uVDn1CXcNxOFlViKMxINtZiLihMBlJY6B2oCAAA= 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 This patch extends LED Flash class documention by the description of interactions with v4l2-flash sub-device. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Acked-by: Sakari Ailus Cc: Bryan Wu Cc: Richard Purdie --- Documentation/leds/leds-class-flash.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/leds/leds-class-flash.txt b/Documentation/leds/leds-class-flash.txt index 82e58b1..bc3855b 100644 --- a/Documentation/leds/leds-class-flash.txt +++ b/Documentation/leds/leds-class-flash.txt @@ -48,3 +48,16 @@ Following sysfs attributes are exposed for controlling flash led devices: upper limit Flash faults are cleared by reading the attribute. + +A LED subsystem driver can be controlled also from the level of VideoForLinux2 +subsystem. In order to enable this CONFIG_V4L2_FLASH_LED_CLASS symbol has to +be defined in the kernel config. The driver must call the v4l2_flash_init +function to get registered in the V4L2 subsystem. On remove the +v4l2_flash_release function has to be called (see ). + +After proper initialization a V4L2 Flash sub-device is created. The sub-device +exposes a number of V4L2 controls, which allow for controlling a LED Flash class +device with use of its internal kernel API. +Opening the V4L2 Flash sub-device makes the LED subsystem sysfs interface +unavailable. The interface is re-enabled after the V4L2 Flash sub-device +is closed.