Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp449411imm; Wed, 18 Jul 2018 05:09:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd7L0/znzKWG3kTJPukPjwCBZvuiFjiTT6DA2isTvAvaucLQzXkBEkp0DcCavBD5w9qZiaE X-Received: by 2002:a62:f909:: with SMTP id o9-v6mr4974220pfh.141.1531915772324; Wed, 18 Jul 2018 05:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531915772; cv=none; d=google.com; s=arc-20160816; b=UUwjqv6Uga3wV7+rYWefhgyF49EBAx53eQGDJiVwNCJ4Dl43XmSnbbyo89X3foQLST /uC5DKy0B44fAZP+jzav2Dbp5GhAGjDRctmlqyPNxVKRHHVusYzq6+GeYnaDStGQ7zQU 9tCbbcdz3AakepMYZulrJ0WBCi6qH2v0oJUbH1IhESBxhGgQXfhzRGX0vkW1ZjkWyX0X k0hhg7HliKPWYalzedKk+jK4riEgJRlmHlN6Vd4f0JXKyW2NppFm8GYmrOxJEDeD2Op2 Chj9IERRlHOfcCeiUvRvAQQBCFa/zSYrn//9RZRMsrhoE0kcGxjlSLPZqmL+KYCrc5f3 yPVw== 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=knCBFds0YJY7Z98oNKaCwH/DQJgYF1K7JMWNJKE0X8o=; b=PhKfDAHPPZMPbaJjAzQXZiNhiVVTgCooPIeVk84Rl2Pk1a+JW88OjgMpLmWOMlugPf WoezZiaWyN8BlmRIemSnKSg56sbVcWHvDl6drLW33kXZ2+Icy/LdXcaZZ7MHmwCWDtgk yEarD+FcESMTuzHaCTyzfV8ZkKX4AGfdeszpdwl9Y6rb62/5bQUbuQQQP++/iczs6s6S 1tfq9rsCGJlWNv5MxWV/t0DQXg3GahFm09OOysdSqYM84gXhyRSv4EPGBlJ+hlTNPLLK dZ7lTkyIcFykI6CY93JqrI0UnUxuPjz0JkE+xCqlP39no0WwhRqZy1jpj9Z/bSjHWtf2 BBSA== 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 z23-v6si3016191pfh.266.2018.07.18.05.09.16; Wed, 18 Jul 2018 05:09:32 -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 S1727131AbeGRMqS (ORCPT + 99 others); Wed, 18 Jul 2018 08:46:18 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:48818 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726297AbeGRMqS (ORCPT ); Wed, 18 Jul 2018 08:46:18 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id CE0AA80576; Wed, 18 Jul 2018 14:08:40 +0200 (CEST) Date: Wed, 18 Jul 2018 14:08:36 +0200 From: Pavel Machek To: Baolin Wang Cc: Jacek Anaszewski , David Lechner , Bjorn Andersson , Mark Brown , Linux LED Subsystem , LKML Subject: Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface Message-ID: <20180718120836.GB23157@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> <20180718075637.GA10279@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pd0ReVV5GZGQvF3a" Content-Disposition: inline In-Reply-To: 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 --Pd0ReVV5GZGQvF3a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed 2018-07-18 19:32:01, Baolin Wang wrote: > On 18 July 2018 at 15:56, Pavel Machek wrote: > > Hi! > > > >> >>>>I believe I meant "changing patterns from kernel in response to ev= ents > >> >>>>is probably overkill"... or something like that. > >> >>> > >> >>>Anyway -- to clean up the confusion -- I'd like to see > >> >>> > >> >>>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-t= imer > >> >>creates delay_{on|off} files. > > > > Yes, that sounds reasonable. v5 still says > > > > + Writing non-empty string to this file will activate the= pattern, > > + and empty string will disable the pattern. > > > > I'd deactivate the pattern by simply writing something else to the > > trigger file. >=20 > For the case we met in patch 2, it is not related with trigger things. > We just set some series of tuples including brightness and duration > (ms) to the hardware to enable the breath mode of the LED, we did not > trigger anything. So it is weird to write something to trigger file to > deactive the pattern. Confused. I thought that "breathing mode" would be handled similar way to hardware blinking: userland selects pattern trigger, pattern file appears (similar way to delay_on/delay_off files with blinking), he configures it, hardware brightness follows the pattern ("breathing mode"). If pattern is no longer required, echo none > trigger stops it. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --Pd0ReVV5GZGQvF3a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAltPLcQACgkQMOfwapXb+vITKACggizU9AyFWdBvTJMivab2zinn 2xYAnAmLBJ942JjLk9lwPLy8z1Kqs9ca =gQ7h -----END PGP SIGNATURE----- --Pd0ReVV5GZGQvF3a--