Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp69209imm; Tue, 17 Jul 2018 14:09:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpepiUejDSBA8zzIVbZBUgILN8pT5mSCbiUTClqyywvVqUVQyjh+f1/pmEPL1wklDLcpH/lc X-Received: by 2002:a17:902:694a:: with SMTP id k10-v6mr3166070plt.166.1531861759584; Tue, 17 Jul 2018 14:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531861759; cv=none; d=google.com; s=arc-20160816; b=uBkbG4bdpzAF+zTewPgZ+9fbdSQvE6SB/PGVM50aYNcH4o0tzu4lw1yAFMdi4xAJlc ccB4A+/6wnSh0evJaSEgfgV0gnUTVkNd9IF3meCWkdl8hLdHQXO87nLZP5cTKNwB+AfA JnJscbtSDnLLKHSV33U9/c17O7VRyFbxnL1nSE+/RvqWTz7XEqP13ljpGYfWhi7v9NbR mZuZOogWmkCg2hJKlw+VphhxODPV9HC/ITc+Klwfoz6h+UIIg+kFGZWsrN3+amppmxbL LUP0jA+8DW7MhPscONTYfL07YOirvkEOXHqXaVeubc7O1muXSIu3UcTKW2a4EJHBh0Ey 4tzQ== 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:arc-authentication-results; bh=Yd0BsMBE7Lgx+bTAMdGRM9YAZt69PAYEHcShZ/BmowY=; b=EsbQ/ImkuQmDjNli29eMCCXe5x/vxVrvBKrud0r6c1xNBQw0Kb+w5bOzARM7b3PU2N O/5nUk4UhQUaNnQYzYH2XN9nprlacdJge/H7qEIO5n1h+z12x9Yv5dJUcYQDO6GCHvTD v/kHhpRKzz7E7/mSoVSJD5Ih3ezCQJUkxOhd4cpT8EiwFYk5/PptLgkE9ZbKezkQXZze UR8QNn7lQESeQH3JEKe/VBsdXwS3ag4qV+R7FNsQUSuzWWzlV858w0n20QqWaElNK5UZ FSZfqMJ4vONNVTo37WEzCMGkAsZGQ7vI/M8KWKztzzLSUf8AH058fJp9moz9UhL9KKEP Upbw== 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 f184-v6si1761864pfb.314.2018.07.17.14.09.04; Tue, 17 Jul 2018 14:09:19 -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 S1731706AbeGQVlf (ORCPT + 99 others); Tue, 17 Jul 2018 17:41:35 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:58594 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730571AbeGQVle (ORCPT ); Tue, 17 Jul 2018 17:41:34 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 0F79A8028C; Tue, 17 Jul 2018 23:07:03 +0200 (CEST) Date: Tue, 17 Jul 2018 23:07:00 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: David Lechner , Baolin Wang , Bjorn Andersson , Mark Brown , Linux LED Subsystem , LKML Subject: Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface Message-ID: <20180717210700.GA9090@amd> References: <20180714212033.GA31950@amd> <00fa2693-9308-8d74-0124-04066a76c35a@gmail.com> <20180714222924.GA2776@amd> <20180714223907.GB2776@amd> <1138f834-e805-6076-bb5b-aa1fdc1f2606@gmail.com> <2c3a8911-150a-9b25-2a66-a9432047f96b@lechnology.com> <68996338-a902-2b57-0bb9-df274a496b06@gmail.com> <20180716215616.GB10734@amd> <8c07a016-d77d-4799-b005-6a9ea94954ce@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <8c07a016-d77d-4799-b005-6a9ea94954ce@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 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >>- different hardware means via which brightness is set (MMIO, I2C, SPI, > >> PWM and other pulsed fashion based protocols), > >>- the need for deferring brightness setting to a workqueue task to > >> allow for setting LED brightness from atomic context, > >>- contention on locks > > > >I disagree here. Yes, it would be hard to synchronize blinking down to > >microseconds, but it would be easy to get synchronization right down > >to miliseconds and humans will not be able to tell the difference. >=20 > There have been problems with blink interval stability close to > 1ms, and thus there were some attempts of employing hr timers, > which in turn introduced a new class of issues related to > system performance etc. Yeah, well. This is LED subsystem. Noone should program blink intervals at 1 msec. > >>For the LEDs driven by the same chip it would make more sense > >>to allow for synchronization, but it can be achieved on driver > >>level, with help of some subsystem level interface to indicate > >>which LEDs should be synchronized. > >> > >>However, when we start to pretend that we can synchronize the > >>devices, we must answer how accurate we can be. The accuracy > >>will decrease as blink frequency rises. We'd need to define > >>reliability limit. > > > >We don't need _that_ ammount of overengineering. We just need to > >synchronize them well enough :-). >=20 > Well, it would be disappointing for the users to realize that > they don't get the effect advertised by the ABI documentation. Linux is always best-effort, w.r.t. timing. And we can do well enough that user will not see anything bad on "normal" systems. > >>We've had few attempts of approaching the subject of synchronized > >>blinking but none of them proved to be good enough to be merged. > > > >I'm sure interested person could do something like that in less than > >two weeks fulltime... It is not rocket science, just a lot of work in > >kernel... > > > >But patterns are few years overdue and I believe we should not delay > >them any further. > > > >So... I guess I agree with Jacek in the end :-). >=20 > How about taking Baolin's patches as of v5? Later, provided that > the pattern trigger yet to be implemented will create pattern file > on activation, we'll need to initialize default-trigger DT property, > to keep the interface unchanged. I have yet to look at the v5 of patches. But I agree that we do not need to design synchronization at this moment. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAltOWnQACgkQMOfwapXb+vK+BgCgi8BFHlK77ZlmasnTYuSICrbz uc8AoMCy1B/YoIs4mGUQwRRpUrFC11SW =kX9A -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--