Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp273917imm; Fri, 21 Sep 2018 14:12:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdalT3/96kmyOlgYrwC1dKfF41v87a8RFuVpF89DP7iitizlFI4z5IuC3RhwXiJqwRL+gjg0 X-Received: by 2002:a63:eb53:: with SMTP id b19-v6mr42970213pgk.371.1537564365862; Fri, 21 Sep 2018 14:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537564365; cv=none; d=google.com; s=arc-20160816; b=tzUUqZFH7jme/HKhTk2hZGsHlwMV3oM4Z0w1cOPSLxgWzPIZSUkWU8rP/9EvITgFJR ETxCwjJI8S8UBqaSFPPy5CzFjUaSwqnS7fWYgTtHy4tVg7eV3uGQ7htrkJ9Mk6P7SVSD 7trEgYQx4oDPM9EOVzWyAO7cpuMxVvsmpEpMyoD74QyZQHVU6aS4uog6/RrCl1+Hi3u/ sPO6angWU5ygj2ZeS2R7TtG1elWi6tYcXq+WWo2H2JrzvUd4/Qmlsm0hWIZT4MAgE29v 4TZBtvzDCAYl41iCrO79H9hl3XiIzyjdPwcxhrejRGJp6f9/MzsaMpp4zmCj/dA7PBmA A60A== 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=k5XaSS6VKNO02DTmohPTZOt3w0EH8YUJJpCMT/yTCu0=; b=BwsxVsRXfisY8HCaYUQVi264Wpg/YoFFTIE4T9/iJn/elXpb96KL7Sfo4qsELfy/r1 fawgUt56SIMGKfqDmVQbbLBctiOgyeJ9XVJQ/ZFy+SmD+isYlD0T4DAIv7Q6mhMAoLNB 3dSBkc84MqogM5HNBWypFLBElRAHmjM/jjPMZn72FJbLCuQrPX4fVFn/w6l1TmpiEkVG 7EPZ4s3jgUJlZrGQrs3nn1S+gVQLLBvim4wO43xzRK2g71TKI+ETDt8Ge7xLpwHGLMBR 3iXrMfjTRkdpC5/IWgHwAmlcYm9VM4G5POgMYZw2uePHOf8nqeE3AwhUOMpIzQy+sd7+ 860g== 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 y9-v6si27818270plk.427.2018.09.21.14.12.29; Fri, 21 Sep 2018 14:12:45 -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 S2391488AbeIVDDC (ORCPT + 99 others); Fri, 21 Sep 2018 23:03:02 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59142 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391323AbeIVDDC (ORCPT ); Fri, 21 Sep 2018 23:03:02 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 09A3480736; Fri, 21 Sep 2018 23:12:21 +0200 (CEST) Date: Fri, 21 Sep 2018 23:12:21 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: Baolin Wang , rteysseyre@gmail.com, Bjorn Andersson , Mark Brown , Linus Walleij , Linux LED Subsystem , LKML Subject: Re: [PATCH v12 1/2] leds: core: Introduce LED pattern trigger Message-ID: <20180921211221.GB18062@amd> References: <67ebebf02edd6d8ee42a13b139733e9cc680ea86.1536631975.git.baolin.wang@linaro.org> <324778a9-a32c-ae6e-337a-39845f214bfc@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG" Content-Disposition: inline In-Reply-To: <324778a9-a32c-ae6e-337a-39845f214bfc@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 --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri 2018-09-21 22:59:40, Jacek Anaszewski wrote: > Hi Baolin, >=20 > On 09/21/2018 05:31 AM, Baolin Wang wrote: > > Hi Jacek and Pavel, > >=20 > > On 11 September 2018 at 10:47, Baolin Wang wro= te: > >> This patch adds one new led trigger that LED device can configure > >> the software or hardware pattern and trigger it. > >> > >> Consumers can write 'pattern' file to enable the software pattern > >> which alters the brightness for the specified duration with one > >> software timer. > >> > >> Moreover consumers can write 'hw_pattern' file to enable the hardware > >> pattern for some LED controllers which can autonomously control > >> brightness over time, according to some preprogrammed hardware > >> patterns. > >> > >> Signed-off-by: Raphael Teysseyre > >> Signed-off-by: Baolin Wang > > Do you have any comments for the v12 patch set? Thanks. >=20 > We will probably have to remove hw_pattern from ledtrig-pattern > since we are unable to come up with generic interface for it. > Unless thread [0] will end up with some brilliant ideas. So far > we're waiting for Pavel's reply. >=20 > [0] https://lkml.org/lkml/2018/9/13/1216 Patch 1/2 is not controversial; I believe we can apply it now. 2/2: Non-linear or not, can we just ignore that for now? We don't have well-defined meaning of what brightness 128 means, so... I believe we can do that reasonably safely. I don't exactly understand what you are saying with the four tuples. Yes, sc27xx currently has a limit where it can do single rise, hold, lower, hold at zero. That is described by pattern: "0 rise_duration brightness high_duration brightness fall_duration 0 low_= duration" We should add this to sc27xx handler: > I'd actually like to see this at begining of function: > if (pattern[0].brightness !=3D 0) > return -EINVAL; > if (pattern[2].brightness !=3D 0) > return -EINVAL; > if (pattern[3].brightness !=3D 0) > return -EINVAL; > if (pattern[1].brightness !=3D pattern[2].brightness) > return -EINVAL; >=20 > ..so if user writes something unexpected, he gets the error back. Then it is compatible -- or should be. Pattern trigger should do the same -- rise, hold, lower, hold at zero. I don't really see the problem. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --1UWUbFP1cBYEclgG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlulXrUACgkQMOfwapXb+vJjxwCfShrrN7WuiyD03m4OCK62wOJr tawAoMTx6qvVG0GNl5/Ei3a78aTJTMuE =3PAe -----END PGP SIGNATURE----- --1UWUbFP1cBYEclgG--