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: 28290 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1YO7Nu-0007bI-UB; Wed, 18 Feb 2015 17:21:58 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-7) with esmtp id 1YO7Ns-00051g-1x; Wed, 18 Feb 2015 17:21:58 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752650AbbBRQVy (ORCPT + 1 other); 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-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.2.18.161217 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, REFERENCES 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' 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