Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp119568ybh; Sun, 12 Jul 2020 00:28:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJY3mDpRfX8au+bsFZ8MzbSh6aU9BxHRy2LSJfO1++pf66R0GSghkLorsTZ7V16PyaEnXY X-Received: by 2002:a05:6402:1805:: with SMTP id g5mr74778861edy.357.1594538889748; Sun, 12 Jul 2020 00:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594538889; cv=none; d=google.com; s=arc-20160816; b=BhiM8FK7FKI1fpwxefWnN30AqhzS+INgA0sYqzpfvX4S3jJOd+KezKou/mFy59iPG9 oce0+uCr6iLxF6AhvZtTk1wBb74vNVMjRWh2IZBRez+hYU+0IbTpUiLA9/azk02SdMG+ l5jtJaXV3Cm+GnyFWV6ZqKYSd1xiuL7vXOxwqTVrcAf550Q6+VJSCEXAZ39xXNSVwsOn 8AKZpUvLKUG46F2HsKTs3SIuQ2vXFkqBbop/DyEFbTdXEJdveOfxHd8ndiz+1qaLXRU8 vSwZAUP+BoBS/cbFqSP/tsvyTTMv41G3bqwZR9QewqxO9CsItxErjxKNOyue67zO3tAh VKLg== 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=TKlWt6Bxu1THa3e+gdLTL6XBqME+FmpHCvRdvrHBihM=; b=dmGp5mSOv7zFGauyHcQmDOGaQLpKCsN0LbLDmBNNeWjyxTZdj1Y7NKw+NIsaEHBVpo rKyRCMy+jUNeez7fpSDnmcy2jZ69PlefLaY8mzvAx/bTKvZhAIhuwnAJnlVlQA1kCzv1 lxTeHJQ3gX86ekxYU1AqiRPOcNCL6gCN9DXaXlEARJdXBRmtKFWtgljaOxRttSp3HPHV wmNVzYnGCxLjwz6WQpB5Of4CIxaBh5lEf7FhyoPVTG6EPoHhHzuBMdzzjesUoHYdxgiF ntWZzDXmOqqVLotRiYcP55nHE+8Xj4bwtKaXIcmHbi+oULo/SxoVUyxj4xJYUCylMS7M /9Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si7534959ejk.168.2020.07.12.00.27.33; Sun, 12 Jul 2020 00:28:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728186AbgGLHZ6 (ORCPT + 99 others); Sun, 12 Jul 2020 03:25:58 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:47008 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbgGLHZ5 (ORCPT ); Sun, 12 Jul 2020 03:25:57 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 481441C0BD2; Sun, 12 Jul 2020 09:25:55 +0200 (CEST) Date: Sun, 12 Jul 2020 09:25:54 +0200 From: Pavel Machek To: =?utf-8?Q?Ond=C5=99ej?= Jirman , linux-kernel@vger.kernel.org, Jacek Anaszewski , Dan Murphy , "open list:LED SUBSYSTEM" Cc: marek.behun@nic.cz Subject: Re: [PATCH RFC] leds: Add support for per-LED device triggers Message-ID: <20200712072554.GC4721@duo.ucw.cz> References: <20200702144712.1994685-1-megous@megous.com> <20200711100409.GA18901@amd> <20200711210111.5ysijhexgyzyr7u7@core.my.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yLVHuoLXiP9kZBkt" Content-Disposition: inline In-Reply-To: <20200711210111.5ysijhexgyzyr7u7@core.my.home> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yLVHuoLXiP9kZBkt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat 2020-07-11 23:01:11, Ond=C5=99ej Jirman wrote: > Hello Pavel, >=20 > On Sat, Jul 11, 2020 at 12:04:09PM +0200, Pavel Machek wrote: > > Hi! > >=20 > > > Some LED controllers may come with an internal HW triggering mechanism > > > for the LED and an ability to switch between user control of the LED, > > > or the internal control. One such example is AXP20X PMIC, that allows > > > wither for user control of the LED, or for internal control based on > > > the state of the battery charger. > > >=20 > > > Add support for registering per-LED device trigger. > > >=20 > > > Names of private triggers need to be globally unique, but may clash > > > with other private triggers. This is enforced during trigger > > > registration. Developers can register private triggers just like > > > the normal triggers, by setting private_led to a classdev > > > of the LED the trigger is associated with. > >=20 > > What about this? Should address Marek's concerns about resource use... >=20 > What concerns? Marek's concerns seem to be about case where we register > a trigger for (each led * self-working configuration) which I admit > can be quite a lot of triggers if there are many functions. But that's > not my proposal. >=20 > My proposal is to only register on trigger per LED at most. So on my > system that's 1 extra trigger and on Marek's system that'd be 48 new > triggers. Neither seems like a meaningful problem from resource > use perspective. So.. 48 triggers on Marek's systems means I'll not apply your patch. Please take a look at my version, it is as simple and avoids that problem. If it works for you, you can submit it properly and I'll likely accept it. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --yLVHuoLXiP9kZBkt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCXwq7AgAKCRAw5/Bqldv6 8lvJAKCU/pM9yDor3xjFX40apgClgoYgeACgsGQ11cWstI1FTKDEPeMIUy2icKc= =DZKL -----END PGP SIGNATURE----- --yLVHuoLXiP9kZBkt--