Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752814AbcJCJ2J (ORCPT ); Mon, 3 Oct 2016 05:28:09 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:21356 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752077AbcJCJ2A (ORCPT ); Mon, 3 Oct 2016 05:28:00 -0400 X-AuditID: cbfec7f5-f79ce6d000004c54-aa-57f2249b6eaa Subject: Re: [PATCH] cleanup LED documentation and make it match reality To: Pavel Machek , linux-leds@vger.kernel.org, kernel list , Greg KH From: Jacek Anaszewski Message-id: Date: Mon, 03 Oct 2016 11:27:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-version: 1.0 In-reply-to: <20161003081049.GA12419@amd> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOIsWRmVeSWpSXmKPExsWy7djP87qzVT6FG1xZoWFxbsEMRovLu+aw WWx9s47R4u6po2wOLB5vHwZ4rFj9nd3j8ya5AOYoLpuU1JzMstQifbsErox51x4wFzwQrDj9 9z5bA2MzXxcjJ4eEgInE4znfmCFsMYkL99azdTFycQgJLGWUWH9pMzuE85lRYt2rh0xdjBxg HS//x0HElzFKPJ/WzAThPGOU+HZtJdgoYQEPia1bL7OC2CICzYwSKybKgdhsAoYSP1+8ZgKx eQXsJM6sOMoGYrMIqEqs+/WeDWSBqECExO67qRAlghI/Jt9jAbE5BTQlGuefA2tlFnCUeLBo JyuELS+xec1bqA8+s0k8+eEOcaesxKYDzBCmi8SGphSICmGJV8e3sEPYMhKdHQfBrpcQmMwo cfHYTVYIZzWjxMbOThaIKmuJhv+/WCB28UlM2jYdaiivREebEESJh8TKVdehhjpK7Nv+kBGk REigRuLIsvoJjHKzkDwzC8kDs5A8sICReRWjSGppcW56arGpXnFibnFpXrpec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Y8GCxSOrEu3tOXN+35vIXr5Mrd2psuWVpcHjlI8PsbrYbXEaR zl+37kzpUWIpzkg01GIuKk4EAD01btScAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161003092755eucas1p167ca77dfa2aa7de943e7dfffa6852ba8 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?SmFjZWsgQW5hc3pld3NraRtTUlBPTC1TeXN0ZW0gRlcgIChN?= =?UTF-8?B?Qikb7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?SmFjZWsgQW5hc3pld3NraRtTUlBPTC1TeXN0ZW0gRlcgIChN?= =?UTF-8?B?QikbU2Ftc3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgU29mdHdhcmUgRW5naW5l?= =?UTF-8?B?ZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjc1MjY=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161003081122eucas1p1d125c5f55f171b1ca5e4e1d28a3ad4b1 X-RootMTR: 20161003081122eucas1p1d125c5f55f171b1ca5e4e1d28a3ad4b1 References: <20161003081049.GA12419@amd> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2206 Lines: 66 Hi Pavel, Thanks for the patch. On 10/03/2016 10:10 AM, Pavel Machek wrote: > > sysfs-class-led fails to mention some important details. Also fix led > vs LED and english. > > Signed-off-by: Pavel Machek > > --- a/Documentation/ABI/testing/sysfs-class-led > +++ b/Documentation/ABI/testing/sysfs-class-led > @@ -4,16 +4,25 @@ KernelVersion: 2.6.17 > Contact: Richard Purdie > Description: > Set the brightness of the LED. Most LEDs don't > - have hardware brightness support so will just be turned on for > + have hardware brightness support, so will just be turned on for > non-zero brightness settings. The value is between 0 and > /sys/class/leds//max_brightness. > > + Writing 0 to this file clears active trigger. > + > + Writing non-zero to this file while trigger is active changes the > + top brightness trigger is going to use. This is true only in case of timer trigger, as it uses blink_brightness property from struct led_classdev to cache current brightness, when the the LED is in the off cycle. This is part of software blink fallback functionality. In case of heartbeat trigger max_brightness is always used for top level brightness. We'd need to refactor the trigger a bit to allow for different top brightness levels. > + > + > What: /sys/class/leds//max_brightness > Date: March 2006 > KernelVersion: 2.6.17 > Contact: Richard Purdie > Description: > - Maximum brightness level for this led, default is 255 (LED_FULL). > + Maximum brightness level for this LED, default is 255 (LED_FULL). > + > + If the LED does not support different brightness levels, this > + should be 1. > > What: /sys/class/leds//trigger > Date: March 2006 > @@ -21,7 +30,7 @@ KernelVersion: 2.6.17 > Contact: Richard Purdie > Description: > Set the trigger for this LED. A trigger is a kernel based source > - of led events. > + of LED events. > You can change triggers in a similar manner to the way an IO > scheduler is chosen. Trigger specific parameters can appear in > /sys/class/leds/ once a given trigger is selected. > -- Best regards, Jacek Anaszewski