From patchwork Thu Mar 12 15:45:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5996691 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 708B0BF90F for ; Thu, 12 Mar 2015 15:48:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A6672035B for ; Thu, 12 Mar 2015 15:48:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22C0620351 for ; Thu, 12 Mar 2015 15:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964801AbbCLPsY (ORCPT ); Thu, 12 Mar 2015 11:48:24 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:53375 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030313AbbCLPqm (ORCPT ); Thu, 12 Mar 2015 11:46:42 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NL300FKOVTS9Y20@mailout3.samsung.com>; Fri, 13 Mar 2015 00:46:40 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-7a-5501b4e0969a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 07.BD.09430.0E4B1055; Fri, 13 Mar 2015 00:46:40 +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 <0NL300DC9VRGU950@mmp2.samsung.com>; Fri, 13 Mar 2015 00:46:40 +0900 (KST) From: Jacek Anaszewski To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@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 v13 10/13] Documentation: leds: Add description of v4l2-flash sub-device Date: Thu, 12 Mar 2015 16:45:11 +0100 Message-id: <1426175114-14876-11-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1426175114-14876-1-git-send-email-j.anaszewski@samsung.com> References: <1426175114-14876-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDLMWRmVeSWpSXmKPExsVy+t9jQd0HWxhDDa79ULQ4unMik8X8I+dY LXqvPme0ONv0ht3i8q45bBZb36xjtOjZsJXV4u6po2wWu3c9ZbU4/Kad1eLM/pVsDtweO2fd Zfc4/HUhi8ee+T9YPfq2rGL0WLH6O7vH501yAWxRXDYpqTmZZalF+nYJXBmPF89nLNjPU9G7 6DxzA+N5ri5GTg4JAROJQycaWCBsMYkL99azdTFycQgJTGeU+Lt4GTOE084kcezkM7AqNgFD iZ8vXjOB2CIC5RJ77jxmByliFtjAKHF5QiNYkbBAnMTlhq+MIDaLgKrEgdctQA0cHLwCnhJv e1RATAkBBYk5k2xAKjiBot33P4BVCwl4SEze8Jd9AiPvAkaGVYyiqQXJBcVJ6blGesWJucWl eel6yfm5mxjBYfhMegfjqgaLQ4wCHIxKPLwXvjOECrEmlhVX5h5ilOBgVhLhNZ3PGCrEm5JY WZValB9fVJqTWnyIUZqDRUmcV8m+LURIID2xJDU7NbUgtQgmy8TBKdXAOO1LM6vKgaBCt5k+ d79UlHx/8rtjW1B57bePM5+mudVureBIl5r6gWdl/r0v0rvefNp3+Z2S785HHoyZXoXXbDLX HnVWbzvPk7j037uCW/xm2oeDZiy/d8yr/v+xiL8TdnVMkehl4DH/sPj51npTea23C2MLJBdl nbMpsP66sy7jwvvOFAWNuUosxRmJhlrMRcWJAFj9iqI/AgAA 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 Acked-by: Sakari Ailus Acked-by: Sakari Ailus --- 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.