From patchwork Fri Mar 27 13:49:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 6107261 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 EA754BF90F for ; Fri, 27 Mar 2015 13:50:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E10712041F for ; Fri, 27 Mar 2015 13:50:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 204362041B for ; Fri, 27 Mar 2015 13:50:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752990AbbC0Nuj (ORCPT ); Fri, 27 Mar 2015 09:50:39 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:59694 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753164AbbC0Nuf (ORCPT ); Fri, 27 Mar 2015 09:50:35 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NLV00EDMIGAPE20@mailout3.samsung.com>; Fri, 27 Mar 2015 22:50:34 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-7e-5515602972a5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 3D.BA.20081.92065155; Fri, 27 Mar 2015 22:50:34 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NLV000ODIF0Y850@mmp1.samsung.com>; Fri, 27 Mar 2015 22:50:33 +0900 (KST) From: Jacek Anaszewski To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org Cc: devicetree@vger.kernel.org, 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 v2 09/11] Documentation: leds: Add description of v4l2-flash sub-device Date: Fri, 27 Mar 2015 14:49:43 +0100 Message-id: <1427464185-27950-10-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1427464185-27950-1-git-send-email-j.anaszewski@samsung.com> References: <1427464185-27950-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsVy+t9jAV2tBNFQg+ltrBZHd05ksph/5Byr Re/V54wWZ5vesFtsfbOO0aJnw1ZWi7unjrJZ7N71lNXi8Jt2Vosz+1eyOXB57Jx1l93j8NeF LB575v9g9ejbsorRY8Xq7+wenzfJBbBFcdmkpOZklqUW6dslcGXs+9rOXnCCp2Ja633mBsYb XF2MnBwSAiYS85/PYIWwxSQu3FvP1sXIxSEksIhR4vXqRVDOT0aJxxP2M4FUsQkYSvx88RrM FhGwlph1aDoLiM0scIZRYtpUWxBbWCBSYtLil+wgNouAqsS0x6uYuxg5OHgFPCXuNdqCmBIC ChJzJtmAVHACRfdeWgU2RUjAQ2LGphtsExh5FzAyrGIUTS1ILihOSs811CtOzC0uzUvXS87P 3cQIDr1nUjsYVzZYHGIU4GBU4uH9sVskVIg1say4MvcQowQHs5IIr0qQaKgQb0piZVVqUX58 UWlOavEhRmkOFiVxXiX7thAhgfTEktTs1NSC1CKYLBMHp1QD4zZ3Wfkyz20MF16y7L2df+nZ La41CXNu5EY+lGj+xFG6Z/sP9kAR/f+qkRa3GVgupTBrH3w52bugblf5/rkK1u+tLtxfKfQ2 sPfhJrN/k18cTDbsUeF42MU8TyjqvMQiO7n4SyEbb2/f7xD7j984cYpzsU6+0NQwH+lAww9L f+quE/63I23yQyWW4oxEQy3mouJEAEHR/b45AgAA 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.