From patchwork Fri Mar 20 15:03:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 6057561 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5CD94BF910 for ; Fri, 20 Mar 2015 15:04:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E852201FA for ; Fri, 20 Mar 2015 15:04:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E59320523 for ; Fri, 20 Mar 2015 15:04:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbbCTPER (ORCPT ); Fri, 20 Mar 2015 11:04:17 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:42336 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbbCTPEP (ORCPT ); Fri, 20 Mar 2015 11:04:15 -0400 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 <0NLI00HAJN72XXC0@mailout4.samsung.com>; Sat, 21 Mar 2015 00:04:14 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-f5-550c36ed5b64 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 65.20.09430.DE63C055; Sat, 21 Mar 2015 00:04: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 <0NLI00EAZN5YFDD0@mmp1.samsung.com>; Sat, 21 Mar 2015 00:04:13 +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 v1 08/11] Documentation: leds: Add description of v4l2-flash sub-device Date: Fri, 20 Mar 2015 16:03:28 +0100 Message-id: <1426863811-12516-9-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1426863811-12516-1-git-send-email-j.anaszewski@samsung.com> References: <1426863811-12516-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCLMWRmVeSWpSXmKPExsVy+t9jAd13ZjyhBq0X2SyO7pzIZDH/yDlW i96rzxktzja9YbfY+mYdo0XPhq2sFndPHWWz2L3rKavF4TftrBZn9q9kc+Dy2DnrLrvH4a8L WTz2zP/B6tG3ZRWjx4rV39k9Pm+SC2CL4rJJSc3JLEst0rdL4MrY97WdveAET8W01vvMDYw3 uLoYOTkkBEwkNv56wQRhi0lcuLeeDcQWEljEKLGxMaqLkQvIbmeS2Pv9ACNIgk3AUOLni9dg DSICkRLvjl5iBiliFtjAKHF5QiNLFyMHhzBQYsk5fpAaFgFViZX/r4CFeQU8JNYvsgcxJQQU JOZMsgExOQU8JU7stIDY6iFx5s4T9gmMvAsYGVYxiqYWJBcUJ6XnGukVJ+YWl+al6yXn525i BIfdM+kdjKsaLA4xCnAwKvHwHijlDhViTSwrrsw9xCjBwawkwuukwhMqxJuSWFmVWpQfX1Sa k1p8iFGag0VJnFfJvi1ESCA9sSQ1OzW1ILUIJsvEwSnVwDgvLO+Cxb9wrr07dsx9nW/RsDdu /uureyZ+2DHllegvm+tmV66dbm2bmNzy+ISjd9bbrcsz7j36U3LApbkgojPM/OuHa/53ei53 MkwpmFkpG8qqsGbGvfyHQhnRt5zaOc+dEbU5bvh/yz154bwbLO8FDpTIHe1o8wg4KmGQYLi0 p8D34uvJRxWUWIozEg21mIuKEwGQ0R3xNwIAAA== 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 19bb673..8623413 100644 --- a/Documentation/leds/leds-class-flash.txt +++ b/Documentation/leds/leds-class-flash.txt @@ -20,3 +20,16 @@ Following sysfs attributes are exposed for controlling flash LED devices: - max_flash_timeout - flash_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.