Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034747AbdD0SiO (ORCPT ); Thu, 27 Apr 2017 14:38:14 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33983 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031807AbdD0Sh4 (ORCPT ); Thu, 27 Apr 2017 14:37:56 -0400 Subject: Re: [PATCH] led: ledtrig-transient: replace timer_list with hrtimer To: David Lin References: <20170424044254.145192-1-dtwlin@google.com> <475626da-5fb2-c03c-cdf7-feb42ee6b672@gmail.com> Cc: rpurdie@rpsys.net, pavel@ucw.cz, robh@kernel.org, Rom Lemarchand , Joel Fernandes , stable@vger.kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org From: Jacek Anaszewski X-Enigmail-Draft-Status: N1110 Message-ID: <03dd4ff1-e605-07df-c826-2e13f4620e00@gmail.com> Date: Thu, 27 Apr 2017 20:37:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1201 Lines: 30 On 04/27/2017 05:48 AM, David Lin wrote: > On Tue, Apr 25, 2017 at 1:15 PM, Jacek Anaszewski > wrote: >>> However, there's a need to >>> support hrtimer if the LED subsystem claims support the use case of >>> vibrator (please see Documentation/leds/ledtrig-transient.txt) as even >>> a 5ms of variation is perceivable to the user. I'm thinking if a >>> better interim solution is to introduce a >>> LEDS_TRIGGER_TRANSIENT_HRTIMER config to work with both timers in >>> compile time. Would you agree? >> >> I think that it would be better if LED class driver set a flag >> marking itself as capable of setting brightness with high rate. >> I'd limit that only to leds-gpio and devices driven through >> memory mapped registers. >> >> Having the flag e.g. LED_BRIGHTNESS_FAST, we could add support for >> hr timers also to ledtrig-timer. > > Can I resubmit the patch implementing LED_BRIGHTNESS_FAST using hrtimer? Yeah, but please split the changes into two patches: 1/2 - addition of a flag to linux/leds.h and corresponding update of Documentation/leds/leds-class.txt 2/2 - addition of hr timer support to ledtrig-transient.c -- Best regards, Jacek Anaszewski