Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2817171imm; Mon, 16 Jul 2018 14:57:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcH4upjyTXaWa0olSYlGYzBx6EcSsekpEcKdmjBvG+o9ySq9/RYco7a9JRAUedkV2NniL7B X-Received: by 2002:a17:902:6e09:: with SMTP id u9-v6mr17786434plk.13.1531778228383; Mon, 16 Jul 2018 14:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531778228; cv=none; d=google.com; s=arc-20160816; b=Kh/PxQJybZPQpus7i/m8C+qXAJKc6AcNMNGuMsH+5cxdZ46PUBJUsBvcktKNkt8/e0 2SGdF7zasDt+8veo3NzpY7GvkGEXdgoIlN7xNCqreE7Hh3OH1alGa1tfiTJRJRkQvM0D yoyHXD8sk9nfAszAsor1ZgoGhtbFMxgUGTaRpJhvwe07jxawrhg59liD1OnSwiUnDai6 wLEXTBRJ5o2yk6zCFlAZ4HHWg1XFWANvUE+By0IwsM2IOnxfC1BqxFE3N1ZUXLqQsng8 FgiUQd3Ef2l3NOPt8Xr0aBaxuCeabaQmYdWR18OJ2kTGm2OxBknHzSWqgIQjLrDgp10/ xBAw== 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=Z4FAFNzSBqlC0kbx6rTyFJ1mpU8bUgYwGFEs/zs7AAQ=; b=HeqHdM+WlsMMTM4yFvBg2M7I4n3e2cUuAmLKekx9ss020HWrBi5oucHgZFTT9ciPOU XOz/HIJb43sYY5WPbCVuLnI6WetexsPd7XXoTXEQgwGMlmT8J8xa0tEPpvtbnATv21dl 12iku/cfRICLQ6ZGpqwNhN2gHqXuqjPUgDdaXWcveEqyvlRa3qHXX9csrfqtq8godc6p UCyljd3366COHSBVV49Py4aC5s2WMRKLuPLhPqw/LLUOUWBsFkEo7fsaEiZxBeNC67G4 qHkiNQhZKOVe1GiAJ+fT5UV/Y8zyZRrj8B6Co4rk5WfOfMQqNrXFCJlFTKINog9YLMDz L6pQ== 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 s16-v6si13175440pgg.538.2018.07.16.14.56.53; Mon, 16 Jul 2018 14:57:08 -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 S1729791AbeGPWZl (ORCPT + 99 others); Mon, 16 Jul 2018 18:25:41 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:54918 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728522AbeGPWZl (ORCPT ); Mon, 16 Jul 2018 18:25:41 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id D8A0480590; Mon, 16 Jul 2018 23:56:16 +0200 (CEST) Date: Mon, 16 Jul 2018 23:56:16 +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: <20180716215616.GB10734@amd> References: <8da1b769-8aa3-9698-467a-2e7b0707fecf@gmail.com> <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <68996338-a902-2b57-0bb9-df274a496b06@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 --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >>>echo pattern > trigger > >>>echo "1 2 3 4 5 6 7 8" > somewhere > >> > >>s/somewhere/pattern/ > >> > >>pattern trigger should create "pattern" file similarly how ledtrig-timer > >>creates delay_{on|off} files. > >> > > > >I don't think this is the best way. For example, if you want more than o= ne > >LED to have the same pattern, then the patterns will not be synchronized > >between the LEDs. The same things happens now with many of the existing > >triggers. For example, if I have two LEDs side-by-side using the heartbe= at > >trigger, they may blink at the same time or they may not, which is not > >very nice. I think we can make something better. Yes, synchronization would be nice -- it is really a must for RGB LEDs -- but I believe it is too much to ask from Baolin at the moment. > It is virtually impossible to enforce synchronous blinking for the > LEDs driven by different hardware due to: >=20 > - 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. > 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. >=20 > 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 :-). > 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...=20 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 :-). Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAltNFIAACgkQMOfwapXb+vK00wCgpHQ4rxBXORCX5Z+HmRWgPeA0 V58An00SukHgMNMoCXrbGD0Gty5Wnf1d =DW3Y -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU--