Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4998263pxb; Tue, 5 Oct 2021 15:12:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+nc0DMPQ4yMn/2+r3Ha61E1AiV1UaFX/78S9P3gftw44E45yRnsDV8bni0aimThzdt8GQ X-Received: by 2002:a50:d948:: with SMTP id u8mr29539967edj.306.1633471922448; Tue, 05 Oct 2021 15:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633471922; cv=none; d=google.com; s=arc-20160816; b=JbYTYozzfggXYnnEG1T/q2uJnoz8BjkPe4kWjLbC7GDKRuOXqX+mjSq4WZ6dYbteiw i9Tv05eeJUKrB7ywtx4tjuR+lu83u6AMHFrpcPLa64KgLD7dO56mBPvYktaMNZI1zRio CBs6S2mDVtXjAklTFBdn+aBgBQW8excrcpRgHM/XIhNiy5PxqDGpDCTJlTCk9TTEo2uK quz3kmvwQIsG1KTZr/zjkupTbZuJNkofI2Ux4xme7WXOVtX29iIeKp5D5OFZ4Sjs3gbY WnaqlK3ZZWoWRmArV9Tdgj9jVf/XosFvxkl++NOeDHnjtcPGiVV2XmpkaxcalBZG/n5V MGyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Lluhp1JzYl1MdgCun+Ng6rRe2JKMoYgDlOFY52JZHkI=; b=wvUH9qYjaTfAr/h+L0oDbwpP4NdtziKrdMMgzup9Gowl6aisCqpuQjKVdAsL3MPOtM gsYF3A1CkF8/c+jI4OidHLD8LZxq+TvNXNA0EOBW7tbUaUwRsqKvv7z2e26ODsd8sx6L tpc50cU+uVVI2mVLOEYtv9UjOB0keeNLDTC6qzcLnbXjtXNF2JYP47WCQ6tpE7ysmi67 1EK2OsxFEhgRud8WAnL5ef6ZAMHPFEkgjL7KXc1iRvyyvsWHSgE9s0dffj22UOehwTQg mNoXbgzR5OyndZDbp62EYpnIVmZJcezlmveEL4coU19P/uZo0cV0lWTm4WyHY/aZXywM tQIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=A9JRMZYv; 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 a10si24004534ejf.122.2021.10.05.15.11.38; Tue, 05 Oct 2021 15:12:02 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=A9JRMZYv; 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 S236830AbhJEWIy (ORCPT + 99 others); Tue, 5 Oct 2021 18:08:54 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50894 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236816AbhJEWIx (ORCPT ); Tue, 5 Oct 2021 18:08:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Lluhp1JzYl1MdgCun+Ng6rRe2JKMoYgDlOFY52JZHkI=; b=A9JRMZYv+g00Zd38Un+SBqSPMW WRoUi7KZcYTflWhKIy9rp3/T+85FFyO2Q8hmcAU6pe8YXa7hP3Ot3lM4+Zcy515RTSJQZ2yaoY7Y8 tY2k/5Owv1IJbAtwbmdZzCV29K0VRoM6elseDsj54xkO1rRNJPiKHhw4Hvx0G6rAM8Z8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mXsaQ-009kjn-UP; Wed, 06 Oct 2021 00:06:58 +0200 Date: Wed, 6 Oct 2021 00:06:58 +0200 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Jacek Anaszewski , Rob Herring , Pavel Machek , "linux-leds@vger.kernel.org" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: lets settle the LED `function` property regarding the netdev trigger Message-ID: References: <20211001143601.5f57eb1a@thinkpad> <20211003212654.30fa43f5@thinkpad> <20211004170847.3f92ef48@thinkpad> <0b1bc2d7-6e62-5adb-5aed-48b99770d80d@gmail.com> <20211005222657.7d1b2a19@thinkpad> <20211005234342.7334061b@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211005234342.7334061b@thinkpad> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > I suggest we start with simple independent LEDs. That gives enough to > > support the majority of use cases people actually need. And is enough > > to unblock people who i keep NACKing patches and tell them to wait for > > this work to get merged. > > Of course, and I plan to do so. Those netdev trigger extensions and > multi-color function definitions are for later :) Great. > We got side tracked in this discussion, sorry about that. > > In this thread I just wanted to settle the LED function property for > LEDs indicating network ports. > > So would you, Andrew, agree with: > - extending function property to be array of strings instead of only > one string, so that we can do > function = "link", "activity"; I agree with having a list, and we use the combination. If the combination is not possible by the hardware, then -EINVAL, or -EOPNOTSUPP. > - having separate functions for different link modes > function = "link1000", "link100"; I would suggest this, so you can use function = "link1000", "link100", "activity" What could be interesting is how you do this in sysfs? How do you enumerate what the hardware can do? How do you select what you want? Do you need to do echo "link1000 link100 activity" > /sys/class/net/eth0/phy/led/function And we can have something like cat /sys/class/net/eth0/phy/led/function activity link10 activity link100 activity link1000 activity [link100 link1000 activity] link10 link100 link1000 each line being a combination the hardware supports, and the line in [] is the currently select function. Andrew