From patchwork Wed Feb 18 16:20:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5845071 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 AD43C9F373 for ; Wed, 18 Feb 2015 16:21:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E379520221 for ; Wed, 18 Feb 2015 16:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0A2D20253 for ; Wed, 18 Feb 2015 16:21:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752650AbbBRQVy (ORCPT ); Wed, 18 Feb 2015 11:21:54 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:24117 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbbBRQVx (ORCPT ); Wed, 18 Feb 2015 11:21:53 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJZ00DUQ6SFEI20@mailout1.samsung.com>; Thu, 19 Feb 2015 01:21:51 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-1d-54e4bc1fbe0b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E3.B3.09430.F1CB4E45; Thu, 19 Feb 2015 01:21:51 +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:21:51 +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 03/20] Documentation: leds: Add description of LED Flash class extension Date: Wed, 18 Feb 2015 17:20:24 +0100 Message-id: <1424276441-3969-4-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+NgFlrGLMWRmVeSWpSXmKPExsVy+t9jAV35PU9CDL690bA4unMik8X8I+dY LXqvPme0ONv0ht1i65t1jBY9G7ayWtw9dZTNYveup6wWh9+0s1qc2b+SzYHLY+esu+weh78u ZPHYM/8Hq0ffllWMHitWf2f3+LxJLoAtissmJTUnsyy1SN8ugStj/7qNrAW3BSpadrxjbWCc ytfFyMkhIWAi8e7CTCYIW0ziwr31bF2MXBxCAosYJbZeeQzltDNJ9HdsZgGpYhMwlPj54jVY h4hApMS7o5eYQYqYBTYwSlye0AhWJCyQJLHj6lx2EJtFQFXixeIbQDYHB6+Au0T/NVYQU0JA QWLOJBsQk1PAQ+LCcw+QYiGgguk337FOYORdwMiwilE0tSC5oDgpPddIrzgxt7g0L10vOT93 EyM49J5J72Bc1WBxiFGAg1GJh7fh9+MQIdbEsuLK3EOMEhzMSiK8uSufhAjxpiRWVqUW5ccX leakFh9ilOZgURLnVbJvCxESSE8sSc1OTS1ILYLJMnFwSjUwai4zNvJrdQ6Vd1x4a6W5yoHr m+d1lv+X37ai0i9d5NiSQzc8Lva0BybtWralSkT+pcPfTRFZLhmqLP1xkXr3leJe7HRO0rqw 9PyHylzXiDjTjX6ndVesNBS9+aHW5Xzzm9kqfpEbjAuk80x81gYcncDvMf0qj4N/+s5GOYdT cXvVN4U0Kk9XYinOSDTUYi4qTgQAPkmkTzkCAAA= 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 The documentation being added contains overall description of the LED Flash Class and the related sysfs attributes. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Bryan Wu Cc: Richard Purdie --- Documentation/leds/leds-class-flash.txt | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/leds/leds-class-flash.txt diff --git a/Documentation/leds/leds-class-flash.txt b/Documentation/leds/leds-class-flash.txt new file mode 100644 index 0000000..ff03a66 --- /dev/null +++ b/Documentation/leds/leds-class-flash.txt @@ -0,0 +1,32 @@ + +Flash LED handling under Linux +============================== + +Some LED devices provide two modes - torch and flash. In the LED subsystem +those modes are supported by LED class (see Documentation/leds/leds-class.txt) +and LED Flash class respectively. The torch mode related features are enabled +by default and the flash ones only if a driver declares it by setting +LED_DEV_CAP_FLASH flag. + +In order to enable support for flash LEDs CONFIG_LEDS_CLASS_FLASH symbol +must be defined in the kernel config. A flash LED driver must register +in the LED subsystem with led_classdev_flash_register function to gain flash +related capabilities. + +There are flash LED devices which can control more than one LED and allow for +strobing the sub-LEDs synchronously. A LED will be strobed synchronously with +the one whose identifier is written to the flash_sync_strobe sysfs attribute. +The list of available sub-LED identifiers can be read from the available_sync_leds +sysfs attribute. In order to enable the related settings the driver must set +LED_DEV_CAP_SYNC_STROBE flag. + +Following sysfs attributes are exposed for controlling flash LED devices: +(see Documentation/ABI/testing/sysfs-class-led-flash) + - flash_brightness + - max_flash_brightness + - flash_timeout + - max_flash_timeout + - flash_strobe + - available_sync_leds + - flash_sync_strobe + - flash_fault