Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp772849ybh; Mon, 13 Jul 2020 00:13:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwCTfPAXl0vqvFDSfgDFB2Olv+9oQ6P71Zrjv+j+0CMZB0umQ5nbFD52BQ/FYWbtaSu5BZ X-Received: by 2002:a17:906:95d9:: with SMTP id n25mr74555110ejy.437.1594624430895; Mon, 13 Jul 2020 00:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594624430; cv=none; d=google.com; s=arc-20160816; b=KaudoICdv+CUNQo8X9+RRSWU5QPOsC3y8uTCOqoJyi4QK+fr5dItqEUynBQBlKM95N OUN1o84H+pY6UoT6eVaWK39GhxTNTQFdiDBiTV+EeH4uzlqz68fTFV8JSKloaBZjjyIs tIT9692a/udlWqkiXrIGvOukf+rx/MilnNwffpzUpFzRCOUPf0S6TV8BDzXPwIbM7V0I Y+yMpdRfVA/Q03gktFCKZrg6X1GRS9TyLPVGKAhXO+akeUvmFYIhIa5TvxDG/mmWra6I GNl0SEPei4CKOFRRyhuYZmfljawK8QUFNxYn2PCLlA3KBauXtBsLPz1oneeGSyDoZY9e FxVQ== 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=wJVWGvrywrZmwqG9Qbm5u8kHNeYNjQ/rARmqSMFrzDk=; b=ykxaMXvH6rv/jFb1mqFXZuo3zusZ52LaJSMmY4YfALngHWUU1fAa1SzlkmyL8M6rzU naeWO88/qGCuS9La9BkHgsg85mmq8eYbnosxUjm5mM47YrpSPQH2MhKwNbuB3FSiptwk +bL85t/LYMzi7SSSAppj8fSF+XtGO4UVNje7/eTy4zGpAE6pfABJxd2YyPHgOfd8/KtO GT4Zr5aNwYV4lypg9/Iz70/wyBZUspjtHfLYQwsjJWLyxOQNX4T17gIKfmrSO2IOj6JB gl69V9WxYl8C81BpxTEX34cUJkyi7HCqlcIsN/Siss8O1XBILtCHtvokvXN75DD389Qr 7kHA== 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 jp23si8126851ejb.5.2020.07.13.00.13.28; Mon, 13 Jul 2020 00:13:50 -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 S1728341AbgGMHM6 (ORCPT + 99 others); Mon, 13 Jul 2020 03:12:58 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:53478 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbgGMHM6 (ORCPT ); Mon, 13 Jul 2020 03:12:58 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 321031C0BDD; Mon, 13 Jul 2020 09:12:56 +0200 (CEST) Date: Mon, 13 Jul 2020 09:12:55 +0200 From: Pavel Machek To: Marek Behun Cc: =?utf-8?Q?Ond=C5=99ej?= Jirman , linux-kernel@vger.kernel.org, Jacek Anaszewski , Dan Murphy , "open list:LED SUBSYSTEM" Subject: Re: [PATCH RFC] leds: Add support for per-LED device triggers Message-ID: <20200713071255.GB30654@amd> References: <20200702144712.1994685-1-megous@megous.com> <20200711100409.GA18901@amd> <20200711210111.5ysijhexgyzyr7u7@core.my.home> <20200712072554.GC4721@duo.ucw.cz> <20200712134911.r3lig4hgyqhmslth@core.my.home> <20200712191111.GA20592@amd> <20200712223821.742ljr4qxdrx3aqv@core.my.home> <20200713011544.0adc51f1@nic.cz> <20200713011841.25904273@nic.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline In-Reply-To: <20200713011841.25904273@nic.cz> 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 --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2020-07-13 01:18:41, Marek Behun wrote: > On Mon, 13 Jul 2020 01:15:44 +0200 > Marek Behun wrote: >=20 > > On Mon, 13 Jul 2020 00:38:21 +0200 > > Ond=C5=99ej Jirman wrote: > >=20 > > > So after trying to use this, this seems to disallow the use of multip= le HW > > > triggers per LED. That's fine by me, because using one HW sysfs confi= gured > > > trigger per LED that use case is my proposal, but is it desireable in= general? =20 > >=20 > > Why? If you register one LED and several triggers, all sharing the same > > trigger_type pointer, I think it should work. > >=20 > > Marek >=20 > The problem arises when I have two LEDs and two HW triggers, and the > hardware allows setting one HW trigger on both LEDs and other HW > trigger only on one LED. But this could simply be ignored - the > set_trigger function could simply return -ENOTSUPP or something. In this case you should have two trigger_type pointers (since two LEDs are different), and yes, you'll have duplication for one of the triggers. I don't think thats a 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 --s/l3CgOIzMHHjg/5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl8MCXcACgkQMOfwapXb+vI3EACfTTWAUjxR+z+O0wW07CTZg6nY OyQAnRovoM7dyl5LTNqQyJETm6JPstLb =M34O -----END PGP SIGNATURE----- --s/l3CgOIzMHHjg/5--