From patchwork Wed Feb 18 16:20:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5845241 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 825679F373 for ; Wed, 18 Feb 2015 16:26:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B37F220251 for ; Wed, 18 Feb 2015 16:26:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDD5320225 for ; Wed, 18 Feb 2015 16:26:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbbBRQ0R (ORCPT ); Wed, 18 Feb 2015 11:26:17 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:24280 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753063AbbBRQ0Q (ORCPT ); Wed, 18 Feb 2015 11:26:16 -0500 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 <0NJZ00DX56ZQEI20@mailout1.samsung.com>; Thu, 19 Feb 2015 01:26:14 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-ad-54e4bd26a1f4 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 51.B9.20081.62DB4E45; Thu, 19 Feb 2015 01:26:14 +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:26:14 +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 17/20] Documentation: leds: Add description of v4l2-flash sub-device Date: Wed, 18 Feb 2015 17:20:38 +0100 Message-id: <1424276441-3969-18-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+NgFlrOLMWRmVeSWpSXmKPExsVy+t9jAV21vU9CDF6f1rc4unMik8X8I+dY LXqvPme0ONv0ht1i65t1jBY9G7ayWtw9dZTNYveup6wWh9+0s1qc2b+SzYHLY+esu+weh78u ZPHYM/8Hq0ffllWMHitWf2f3+LxJLoAtissmJTUnsyy1SN8ugStjx5avbAXneSqWztnJ1sB4 n6uLkZNDQsBE4vGX5ewQtpjEhXvr2boYuTiEBBYxSjx9cg7KaWeS2Pb0KRtIFZuAocTPF6+Z QGwRgUiJd0cvMYMUMQtsYJS4PKGRBSQhLBAn8W7vaWYQm0VAVeLX1mlgNq+Ah8TTi91AgziA 1ilIzJlkA2JyAoUvPPcAqRAScJeYfvMd6wRG3gWMDKsYRVMLkguKk9JzDfWKE3OLS/PS9ZLz czcxgoPvmdQOxpUNFocYBTgYlXh4G34/DhFiTSwrrsw9xCjBwawkwpu78kmIEG9KYmVValF+ fFFpTmrxIUZpDhYlcV4l+7YQIYH0xJLU7NTUgtQimCwTB6dUA6NrpOYnowlTPsh3SFoqNq/Q LteZkRTLyWn4svr/9UNnH65+PyXJiy3k82oeq/ZIln4dh9e+t1ljyvY6l+lvyD76IC9lzf7T Vk4zEl2uvp1ZsP3lY6uC1VEhyp8yLbr2dRRzf5nb/dN7utLW1pbwzd0MbOFZ4er9mcGLl7Ic f8+fyiFe2FhprsRSnJFoqMVcVJwIALO9kqw6AgAA 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 ff03a66..dc46ae0 100644 --- a/Documentation/leds/leds-class-flash.txt +++ b/Documentation/leds/leds-class-flash.txt @@ -30,3 +30,16 @@ Following sysfs attributes are exposed for controlling flash LED devices: - available_sync_leds - flash_sync_strobe - flash_fault + +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.