Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4247363imu; Mon, 12 Nov 2018 08:03:41 -0800 (PST) X-Google-Smtp-Source: AJdET5e8d6SJfrvuZU2SGCgKbmVpaq2hUGUXpeeQ7WEoGEfBIMRP1pKcT58FhymuFJ83+DXnlj/P X-Received: by 2002:a17:902:503:: with SMTP id 3-v6mr1512732plf.88.1542038621608; Mon, 12 Nov 2018 08:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542038621; cv=none; d=google.com; s=arc-20160816; b=KXYm0VppFBBMYlaUhKCtUimjWBTcXYTx8tyxSCc8IVmb64lezTTxmUsvzrl1GlD04r mPiUon3OgRFrc4qw2VhMnHTbBpEJkF4V9upDx/Z0qFLIIzPSeKlqgP1C0O/BS3Fs8ARf hrfThZPI+H4vhpp3UYE6UnC/W6jdjwi2omZL7kXSidi/GeyT6BjKoQ5P1GmLhuIzgMEE gznH+9VCdeqT5wtCr7YIPno/dKLp+ywjgeCZkJePoJST8bMDXJKsceWOOdI4HMhrAkiT wM7xnklkHXt1kCD9pg1829bZCO3yqD4mvjvecdpq4oxt3HNwDvcNe7A09CGPRTfFjTEx Ehhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=iHARkkcpWI1aYE4SY2b7mAcbIynGpF9Vg+t2AvXBvXU=; b=LZvzAx1GKFx0Evx887k1TBmdCe7wD99W6LreTursWd03JYUDM0r+iCTyGMWt1ZUgif YOJqbIis4Ka6zCn4Yiur5BEK+9KdFLNhSkREtLUZs3QeiePYo4QmQkqt5GFlmxYRdlKQ QC1N4f271g51DUHuowsO4WjQ39b6WhlMZaQVIilW5RXX8f7H4/g/FgPvyF9yySKCTtpF Rt4DvY9Mkttx7B3eBYjYqI3KYzzsAlmfK9RU7llbDca49oFG4lIln5EeOvedj4838Bdz LM6pCM7kodK67MWxyMuaMI/JU3CuPmjyNQFJ4/TlGYSawXBngZqJFggJXQhhRPc/tLGX MBtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lSjrxQyt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p18si16826472pgb.469.2018.11.12.08.03.15; Mon, 12 Nov 2018 08:03:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lSjrxQyt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730071AbeKMBz5 (ORCPT + 99 others); Mon, 12 Nov 2018 20:55:57 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:43063 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729992AbeKMBz4 (ORCPT ); Mon, 12 Nov 2018 20:55:56 -0500 Received: by mail-lf1-f68.google.com with SMTP id u18so6533135lff.10; Mon, 12 Nov 2018 08:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iHARkkcpWI1aYE4SY2b7mAcbIynGpF9Vg+t2AvXBvXU=; b=lSjrxQyt9WIFpJy3Wqg9EyBiaA5rv/8RQna+pJhV+tRuwFkAmTj/6Fa3Pe7yeJUCoE pXqWlh/I3FT4Jebq5at/qm//ubATv9eIXBAELnRy1qrjwf+1gKLvOsr3sB9ovczTVqnV jLY3ScCdIxN+3jsKD5ZwNYfC9BwIx1hSZhgmA9P1vJDq7NmEFZUiwJ+Jrmj30FqRUBsq 8XHXxkS0UkyejOLFDFNkL7Z3zfkOmAN6B+nfAk72+JZFDYEdXrzrfRIrTSss7mrUEufw G/rPEYro0E/fXSkNBOzhyaSSi4u0OF0eCttvnGbnpjjtGOLmWe+8/x8CsmtgkAF5AXho XtsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iHARkkcpWI1aYE4SY2b7mAcbIynGpF9Vg+t2AvXBvXU=; b=Tiwt7EKwNzVuoR1AqdbTFT+qJQjp1L2fKSDyVjuBsLfMKb03c3d0yQQNlCNtSozeoQ lYQy20UpyBqXbgDdPfntQunDfRP9O6Q85ie0OmlsgWn9BF4h+ZaeEXOqzG0k1Fv3UO6m Qq8icMcOblITdzI86ZPSiwpGTSPpseX9bGe3b7cKjWOpero3ycqu0o1oOeX5iCaEFLIo b2dNY7itQPC/MM/Xe43EdCZw16Rf8O6erSm0/oiW6VyfHJQ4ADAeC71tIwD2anHJffJB cDM8/0BC143aDV9ypaHIN1D+C0o9xqdmgVw1t2hVLdo9wwoxxrbuKiOA1zreoQojNWHP 9rpg== X-Gm-Message-State: AGRZ1gJCeSj1iR5PDTFKcrtES0megfC8QsrlT7HR5qWoKLHvOjaXAdhQ muUg9BKqYsJaIjjT/70jV+k= X-Received: by 2002:a19:3b12:: with SMTP id i18mr1030792lfa.28.1542038522472; Mon, 12 Nov 2018 08:02:02 -0800 (PST) Received: from [192.168.1.18] (bgt69.neoplus.adsl.tpnet.pl. [83.28.83.69]) by smtp.gmail.com with ESMTPSA id t6-v6sm2981158ljd.2.2018.11.12.08.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 08:02:01 -0800 (PST) Subject: Re: [PATCH 02/24] leds: core: Add support for composing LED class device names To: Pavel Machek 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 References: <1541542052-10081-1-git-send-email-jacek.anaszewski@gmail.com> <1541542052-10081-3-git-send-email-jacek.anaszewski@gmail.com> <20181111120234.GA28794@amd> <20181111201605.GA20160@amd> <57b77d4e-39a0-aaf2-5952-c2c25dc58593@gmail.com> <20181112103513.GB5695@amd> From: Jacek Anaszewski Message-ID: <662c02ba-455b-e2bf-a5e2-ae3933161894@gmail.com> Date: Mon, 12 Nov 2018 17:01:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181112103513.GB5695@amd> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 11/12/2018 11:35 AM, Pavel Machek wrote: > Hi! > >>>> It's overcomplicating the naming again. In every case you can tweak >>>> the function name to eth0_link, eth1_link etc. >>> >>> Well, but in such case it would be good to keep existing scheme. >>> >>> My system looks like this: >>> >>> input16::capslock tpacpi::bay_active tpacpi::standby >>> input16::numlock tpacpi::dock_active tpacpi::thinklight >>> input16::scrolllock tpacpi::dock_batt tpacpi::thinkvantage >>> input5::capslock tpacpi::dock_status1 tpacpi::unknown_led >>> input5::numlock tpacpi::dock_status2 tpacpi::unknown_led2 >>> input5::scrolllock tpacpi:green:batt tpacpi::unknown_led3 >>> >>> I agree that we should get rid of "tpacpi:" part in some cases. But >>> it does not make sense to get rid of "input16:" part -- it tells you >>> if the LED is on USB or on built-in keyboard. >>> >>> Ideally, tpacpi::thinklight would be input5::frontlight (as it is >>> frontlight for the keyboard). >>> >>> Yes we should simplify, but it still needs to work in all cases. >> >> Well, label is not being removed. You still can use it an the old >> fashion, even when using new led_compose_name(). >> >> Maybe removing the description of the old LED naming from >> Documentation/leds/leds-class.txt was too drastic move. >> I'll keep it next to the new one, and only add a note that >> it is kept only for backwards compatibility. > > I agree that removing it is "just too drastic". > > But it is not just for backwards compatibility. See my examples above, > it is needed to tell which device the LED is asociated with, and it is > absolutely required for USB devices (for example). For USB devices there is already ledtrig-usbport available, which provides sysfs interface for defining and reading the usb ports, the status of which the LED indicates. Since the USB devices can be attached/removed dynamically, it would be impossible to reflect the associations in the LED class device name. > And even for "embedded" stuff like routers, we want eth0:green:link, > eth0:yellow:activity and not some kind of hack. eth0 is not something you can be certain of at the stage of defining DT node. > Ideally, colors would come from fixed list, functions would come from > fixed list, and device part would come from name used elsewhere in the > kernel. > > (And yes, it probably means we should have something in device tree to > link LED to its device. device = "name" would be good start...) Why would you need such link? -- Best regards, Jacek Anaszewski