Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S943574AbcJSO4b (ORCPT ); Wed, 19 Oct 2016 10:56:31 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:61407 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943532AbcJSO40 (ORCPT ); Wed, 19 Oct 2016 10:56:26 -0400 X-AuditID: cbfec7f4-f791c6d000006eac-69-580732cfea69 Subject: Re: [PATCH] cleanup LED documentation and make it match reality To: Pavel Machek Cc: linux-leds@vger.kernel.org, kernel list , Greg KH From: Jacek Anaszewski Message-id: <9be41492-4bc8-3a8f-3947-2e3fe9d7aa61@samsung.com> Date: Wed, 19 Oct 2016 10:46:05 +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: <20161003093841.GA9131@amd> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsWy7djPc7rnjdgjDLa8kbc4t2AGo8XlXXPY LLa+WcdocffUUTYHFo+3DwM8Vqz+zu7xeZNcAHMUl01Kak5mWWqRvl0CV8anU09YC6bwVzxu e83WwLiVp4uRk0NCwESib+8+FghbTOLCvfVsXYxcHEICSxklJmy5ywzhfGaUmDfnIGMXIwdY x+QvORDxZYwSz5v2M4N0Cwk8Y5RYutIYxBYW8JDYuvUyK4gtIiAvsbVvBVgNs0CaxNx5M9lA bDYBQ4mfL14zgczkFbCTuHiqBsRkEVCVuHvfE8QUFYiQ2H03FaSYV0BQ4sfke2BncgpoSDy8 9oAFYqCjxINFO1khbHmJzWvegl0sIfCfTeL5pY0sEBfLSmw6wAxhukh0deRAfCss8er4FnYI W0bi8uRuFojWyYwSF4/dZIVwVjNKbOzshIaPtUTD/19Qi/kkJm2bDjWUV6KjTQiixENi5arr UEMdJfZtf8gIC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TF88/NdnekBvbkJzicbj0osKsa2yTrpz74Ji34TCjqHEmk9PddStDJvzYfnfX GpH7WR8Nf7bZ7P41pXHJYoY0+UXSLzYvPOTre9dpjw+7h7CV9sVHYX5/cqsOaETpMBwMW1tx dUqA5rUzQr8nhNW3HeOTVmIpzkg01GIuKk4EABcj3EynAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161019084607eucas1p279c00b59796d96eb0929d4ce170f78d2 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 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> <20161003093841.GA9131@amd> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1890 Lines: 50 On 10/03/2016 11:38 AM, Pavel Machek wrote: > Hi! > >> 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. > > Ok, do you think you could update the documenation to match the > reality? It is quite important to know what is the intended behaviour > and what are the bugs. Applied the patch (removed extra empty line) after improving heartbeat trigger [0] to support brightness levels other then max_brightness. [0] https://git.kernel.org/cgit/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=9a1d1e6f926a4d1f4a31a7a37abece9e44455b43 -- Best regards, Jacek Anaszewski