Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2922773imu; Sun, 11 Nov 2018 04:05:03 -0800 (PST) X-Google-Smtp-Source: AJdET5dXL2ln24xbanQ0Ks93MIy5fimB9+R5Rt3CyjYS2YRNdwO7U1ndlDiPP178tbWZfa14UxgA X-Received: by 2002:a65:6684:: with SMTP id b4mr13886732pgw.55.1541937903092; Sun, 11 Nov 2018 04:05:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541937903; cv=none; d=google.com; s=arc-20160816; b=LL1VZypV7jjC1WbaNr7j11X+KvW8m4Z+IEDHF6+S78We7vr1b1ZDW07lyXjATdWV9N ghh8alk9REdGoZzyNzbIey/VHD2cXcH9syU6TpbUpRzrhZ+x1QESlV+RaiJYsGb6tLoi 2g9nRzfw9Jx7eFAoDgxvhYntWfHpogvpVWvssgK5O6QMoILJVjwR71hEt7Z9HEd7Cfjw mfKg0Q/3nFTxYGoiVo4R2D5mW+eH8FGXjx47XZMXLbmpdBMcOp2N7AqO0+jjeRzdfVB4 JWWx4IEmo1lf4DUT/HIsfDUVW9OAO/Ra1yPpRzD0dU2CpZLYIqSoIYOU6XdbiDld2hqI WpvA== 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=FPFmXrjAqFCiCQPkxRVJOc+1EXV9R1ys9ssDIW+UPjE=; b=vSYey5l3+34ZIJA95Y00gtl/EDtDr465qLu+/aHcItyIzZtorWufmq+Qi7oOda+aul 5/zPX0UB881jpDC6oPAM6rL7aD5QONfyghwieD94l41zl7NOzU0J5V0HooThYkQ/H7zA Mssjd3D8UlScG9rKZFp23awWqNk/we09BJglggCv7RLeSq08YC/rrVl4pwIpec7NrA5d CK9tJ4fh3FjCsPNlSOavGJvf7XLGONizSgRxVECSMfpCEUsPMQN3AvaQfgUy5Sk2PzQp kRjEMz79dvFpmSDF+qSrTND/kALhBHcD3mZvRZdvmRNvht/z8zuh8iF3Tqx0xivqRJTs hOZQ== 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 k6si13982327pgr.500.2018.11.11.04.04.47; Sun, 11 Nov 2018 04:05:03 -0800 (PST) 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 S1727950AbeKKVvc (ORCPT + 99 others); Sun, 11 Nov 2018 16:51:32 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:44784 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727492AbeKKVvc (ORCPT ); Sun, 11 Nov 2018 16:51:32 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id E2D6E806CF; Sun, 11 Nov 2018 13:03:03 +0100 (CET) Date: Sun, 11 Nov 2018 13:02:34 +0100 From: Pavel Machek To: Jacek Anaszewski Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robh@kernel.org, Baolin Wang , Daniel Mack , Dan Murphy , Linus Walleij , Oleh Kravchenko , Sakari Ailus , Simon Shields , Xiaotong Lu Subject: Re: [PATCH 02/24] leds: core: Add support for composing LED class device names Message-ID: <20181111120234.GA28794@amd> References: <1541542052-10081-1-git-send-email-jacek.anaszewski@gmail.com> <1541542052-10081-3-git-send-email-jacek.anaszewski@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <1541542052-10081-3-git-send-email-jacek.anaszewski@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 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > Add public led_compose_name() API for composing LED class device > name basing on fwnode_handle data. The function composes device name > according to either a new pattern or the legacy > pattern. The decision on using the > particular pattern is made basing on whether fwnode contains new > "function" and "color" properties, or the legacy "label" proeprty. >=20 > Backwards compatibility with in-driver hard-coded LED class device > names is assured thanks to the default_desc argument. >=20 > In case none of the aformentioned properties was found, then, for OF > nodes, the node name is adopted for LED class device name. >=20 > diff --git a/Documentation/leds/leds-class.txt b/Documentation/leds/leds-= class.txt > index 836cb16..e9009c4 100644 > --- a/Documentation/leds/leds-class.txt > +++ b/Documentation/leds/leds-class.txt > @@ -43,7 +43,7 @@ LED Device Naming > =20 > Is currently of the form: > =20 > -"devicename:colour:function" > +"colour:function" > =20 I don't think we want to do it in all cases. So, on my cellphone seeing lp5523:green:led is indeed not useful. But on notebook with usb keyboard attached, you need to keep the devicename to be able to distinguish capslock on internal keyboard and capslock on first USB keyboard and capslock on second USB keyboard. Taking look at the list of functions, here's stuff like "hdd" and "hdderr". I assume the first means hdd activity... If we can do it, it would be nicest to have "sda:green:activity" and maybe "sda:red:error". For a raid array with 8 drives... For example I have a router running linux. It has 4 lan ports, with correspondings LED, and an wan led. Having "green:lan1" to "green:lan4" and "green:wan" plus "red:wanerror" would work, but I'd really preffer "eth0:green:link"... "adsl0:green:link", "adsl0:red:error". There are now phones with flashes on both main and selfie cameras. Again, knowing which device is which is important. As is knowing which display is controlled by particular backlight. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlvoGlkACgkQMOfwapXb+vICOQCdFvVBqzp2X/0dVIEOHUK+NFmw 4BkAoK5b2Pmc8pjkO8kfELLQLjeuythv =t3w5 -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--