From patchwork Fri Nov 28 09:17:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5402241 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ED601BEEA8 for ; Fri, 28 Nov 2014 09:26:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20F1620145 for ; Fri, 28 Nov 2014 09:26:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F5F32013D for ; Fri, 28 Nov 2014 09:26:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751824AbaK1J0G (ORCPT ); Fri, 28 Nov 2014 04:26:06 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:44344 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbaK1JTU (ORCPT ); Fri, 28 Nov 2014 04:19:20 -0500 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 <0NFQ001S7SK68SB0@mailout3.samsung.com>; Fri, 28 Nov 2014 18:19:18 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-19-54783e16e674 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 85.1C.09430.61E38745; Fri, 28 Nov 2014 18:19:18 +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 <0NFQ00JKNSI8LB60@mmp2.samsung.com>; Fri, 28 Nov 2014 18:19:18 +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, Jacek Anaszewski Subject: [PATCH/RFC v8 03/14] Documentation: leds: Add description of v4l2-flash sub-device Date: Fri, 28 Nov 2014 10:17:55 +0100 Message-id: <1417166286-27685-4-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1417166286-27685-1-git-send-email-j.anaszewski@samsung.com> References: <1417166286-27685-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFLMWRmVeSWpSXmKPExsVy+t9jQV0xu4oQg+97FSw2zljPanF050Qm i96rzxktzja9Ybe4vGsOm8XWN+sYLXo2bGW1uHvqKJvF7l1PWS0Ov2lntTizfyWbA7fHzll3 2T0Of13I4rFn/g9Wj74tqxg9Vqz+zu7xeZNcAFsUl01Kak5mWWqRvl0CV0bXkWPsBZd5KmYe usjewHiRq4uRg0NCwETiaqdCFyMnkCkmceHeerYuRi4OIYHpjBLXLr1khXDamSS6F51kBali EzCU+PniNRNIs4hAtMSlY/UgNcwCpxgl1s1czQhSIywQK/H20UEWEJtFQFVi6boDzCA2r4CH xJ5pNxkhFitIzJlkAxLmFPCUmPt5LQtIWAioZNGrlAmMvAsYGVYxiqYWJBcUJ6XnGukVJ+YW l+al6yXn525iBIfgM+kdjKsaLA4xCnAwKvHw/vxXHiLEmlhWXJl7iFGCg1lJhPfUV6AQb0pi ZVVqUX58UWlOavEhRmkOFiVx3hs3c0OEBNITS1KzU1MLUotgskwcnFINjA5VzJaXA1aJyNfl f5wtybSyMJdpUaGVsr2yW07hoVWb9RxkgnbybZG+mfr04LmEvXe/WHtXRBgmH78jPmltBetF S91pNrd0ektaZqUs3nv8CbM+5/k3fuLuT6NnXXv06fZtdjE5waAc91AniY3lxpl1d9v+HD5z i19++QPNMNfJNvtLHd3FlFiKMxINtZiLihMBxGPl/T0CAAA= 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 Cc: Bryan Wu Cc: Richard Purdie 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 d68565c..1a611ec 100644 --- a/Documentation/leds/leds-class-flash.txt +++ b/Documentation/leds/leds-class-flash.txt @@ -46,3 +46,16 @@ Following sysfs attributes are exposed for controlling flash led devices: until this flag is no longer set * 0x100 - the temperature of the LED has exceeded its allowed upper limit + +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.