Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933549AbbFWQ7n (ORCPT ); Tue, 23 Jun 2015 12:59:43 -0400 Received: from smtp24.mail.ru ([94.100.181.179]:51958 "EHLO smtp24.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932823AbbFWQ7f (ORCPT ); Tue, 23 Jun 2015 12:59:35 -0400 Message-ID: <5589906F.4070901@list.ru> Date: Tue, 23 Jun 2015 19:59:27 +0300 From: Stas Sergeev User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Pavel Machek CC: linux-leds@vger.kernel.org, Linux kernel , Bryan Wu , Richard Purdie , Jacek Anaszewski , Kyungmin Park , Stas Sergeev Subject: Re: [PATCH v2] leds: fix brightness changing when software blinking is active References: <5554BE12.7050209@list.ru> <20150502145957.GB8156@xo-6d-61-c0.localdomain> In-Reply-To: <20150502145957.GB8156@xo-6d-61-c0.localdomain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam: Not detected X-Mras: Ok Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1232 Lines: 26 02.05.2015 17:59, Pavel Machek пишет: > On Thu 2015-05-14 18:24:02, Stas Sergeev wrote: >> >> The following sequence: >> echo timer >/sys/class/leds//trigger >> echo 1 >/sys/class/leds//brightness >> should change the ON brightness for blinking. >> The function led_set_brightness() was mistakenly initiating the >> delayed blink stop procedure, which resulted in no blinking with >> the timer trigger still active. >> >> This patch fixes the problem by changing led_set_brightness() >> to not initiate the delayed blink stop when brightness is not 0. > > Could we get this part of API documented? It is quite non-obvious... 0 clears the trigger, > other values do not, I thought it is a bug when I saw it... I guess the thinking was that if ON brightness differs from OFF brightness, you should not clear the trigger. But if you put ON brightness similar to OFF brightness, then you can as well stop blinking at all. Not that I am amused by that kind of logic though. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/