Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1094137imm; Wed, 10 Oct 2018 09:03:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV61g+0lIXalRZAz1wNKlH+AETja9c0euCVMkzFuL3hy/LRdGBJa71J43foCXAmloObUrRPk1 X-Received: by 2002:a17:902:b7c3:: with SMTP id v3-v6mr34096589plz.182.1539187408477; Wed, 10 Oct 2018 09:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539187408; cv=none; d=google.com; s=arc-20160816; b=IJpPUoB/oj0GPeTrEGzUFbyFZ5z3SMDTWbyxS68Ei3znaDO6WofEeMsmfjIepIsekC Yy1jIO7ZLG6hB2fqIXMwlZVEozqm8IBwl9Eq4vsaEqa1uq6XcLvYkktCbrwfHYCf0akP 3+a87DhQ0hfp2q5cOnsPPnKP3iCUW7CQbHvwe3P8VWBEHhnwovZJSKrPVAqSHAdIjLdA ooVJsT/171UrdaEeFBrVUoAeLYYppP29mFuc7iWebyhb+MtexVbFNHGfqqGfb5Y0kcEF KdPP5v3o1/1rrN9DX37jHQjULm///iWGpra82tyWtyPLEaVmpdjoYW5L6rBV9Z6zbGO4 TI6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zKE95DcpEI1YXLB1o6o7EWTIGw0sh/Xz+mc5I4n9Ai0=; b=WiWLsCbhsd3jjeQdjTJXAQxXl1P6GwWbyfLGvkGvSgFNPffYOBQxwuDJZpdN29ejEk t30Wpdyf6DASS1QntpBqOayQ2QvY58soBI7Nit0xQGfp+orPZGbmw0GfTak7le824yLO 9L5eTA1mEsZ8EywzosFVSxitPvKV4964rzkGc1CORB0gG0P0uI56H32f7M2b9QUY+1xQ drMqjuR0pWOCE2AEFFftN7VVE1baXxc+lcwlyT08RBZkj3UfBxic6lEb74BHTATO/2oI m6Xsu8J+RtbjeviqXGBAqob/2BO7156BUb0rvVMQqaB123l3CZPLTKRI18XQRVS0VKS/ fZlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z29-v6si23649084pfl.209.2018.10.10.09.03.12; Wed, 10 Oct 2018 09:03:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbeJJXXk (ORCPT + 99 others); Wed, 10 Oct 2018 19:23:40 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55659 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbeJJXXj (ORCPT ); Wed, 10 Oct 2018 19:23:39 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 8CEE7807D6; Wed, 10 Oct 2018 18:00:48 +0200 (CEST) Date: Wed, 10 Oct 2018 18:00:48 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: Baolin Wang , rteysseyre@gmail.com, bjorn.andersson@linaro.org, broonie@kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger Message-ID: <20181010160041.GA22121@amd> References: <9bf6236e-83af-7156-b26b-7d88ece2d81e@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pvezYHf7grwyp3Bc" Content-Disposition: inline In-Reply-To: <9bf6236e-83af-7156-b26b-7d88ece2d81e@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pvezYHf7grwyp3Bc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! [Oops. I wrote this but forgot to send it? Anyway.. I guess it is redundant now.] > > +++ b/Documentation/ABI/testing/sysfs-class-led-trigger-pattern > > @@ -0,0 +1,76 @@ > > +What: /sys/class/leds//pattern > > +Date: September 2018 > > +KernelVersion: 4.20 > > +Description: > > + Specify a software pattern for the LED, that supports altering > > + the brightness for the specified duration with one software > > + timer. It can do gradual dimming and constant brightness. > > + > > + The pattern is given by a series of tuples, of brightness and > > + duration (ms). The LED is expected to traverse the series and > > + each brightness value for the specified duration. Duration of > > + 0 means brightness should immediately change to new value. > > + > > + 1. When doing gradual dimming, the led brightness will be updated > > + every 50 milliseconds, so the duration of each step should not > > + less than 50 milliseconds. >=20 > I'd like to avoid this constraint. Lowest supported delta_t should be 1. >=20 > We should only prevent entering dimming mode if current delta_t > is lower than UPDATE_INTERVAL. I agree that documenting it like this is strange. I don't think this should be part of ABI as we may want to adjust it in the future. > I also propose to make the dimming interval configurable via sysfs > dimming_interval file. I believe we should provide "right" dimming_interval. 50msec sounds good. If we find it is too low / too high, we might want to adjust it. If we find out that different users need different values, I guess we can still add "dimming_interval" knob, but I'd suggest waiting until such need arises. [Now, I don't have strong feelings here, and patch would probably be okay with me even if it has dimming_interval, but I'd prefer to keep it simple. We are at v14 of the patch...] Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --pvezYHf7grwyp3Bc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlu+IjAACgkQMOfwapXb+vJKGACgsHAAydYbN5GADkbD3KjEsy91 qKIAn3vRLOcAeeemxCOYBEwNIcLUlrIG =Y0m2 -----END PGP SIGNATURE----- --pvezYHf7grwyp3Bc--