Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4952790pxb; Tue, 5 Oct 2021 14:06:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVjped0zYRmP6MCwyigC4U4Lo8xL+xw3EH5cQTGbLjZu0WUtqrYKgU5w5bkThZuJBexCto X-Received: by 2002:a17:906:f6cd:: with SMTP id jo13mr12431694ejb.563.1633467960057; Tue, 05 Oct 2021 14:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633467960; cv=none; d=google.com; s=arc-20160816; b=AEQAfhVIdzSfddaOfifyYKBp0taqVay2rgZyBFkDm82V5ZHiIH2/4NY+XwaJpw3+OF sap23ydEnuMHkFMFp6aRgM0QFbB7O3s1a2sQJdjVNLFZwRQcluhsxumaRXfhvdnKU7HF 5iafAxibaFmKiNpt4P8/jv5XZYhe/8gCX4D1roU7JHiC+T94rUx/GR8TfuP1i4068hzr D1B+TkfFCSMeSvEO9xBEy5oVAbkUes5T2XvMRl0D5hHxT7qRtil935YxtjQWdUFImafz ay8sNznssrP7XlqNm/81TLs7iUqqWIJatPzbbT57XBgodxWz4zLHL03JMV27lmmIdTlz NziQ== 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=xoD6/I7Cc8crpzzqPjHiA+h57zOy6+xgtG83jf7v3i8=; b=VjHgCbTPQgBxjCYWLc5f4Gt1gKNLcHYhsof31RFs164RsxQZgJ9YvMBzW4PPNvkoBQ dype2BipiKUEsw6f5s3GTNI04vFJ7lD71r4OjFhFwFtVDJXwvEHAKneQm8Mxz8AuFc8h q9yz57VIEV9sx92e1oRcKfdeyKDfEI0cKRYL0RXXK6FIC3a/dHucUfX/RFIpGuhApI1h FzlWsAZucJZmoYM9KhefSh2xCgG8KltFpNDiI7emAd4XthrxXfxhHjzTz7mQHWSAB/Wv grzA3HmUatLH+BS8ox5J+pHElORM9XEEceVSXllnTiwS7TT9I7JGt3yBsMHgR+H5RE4U DScA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NYWTqPej; 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 30si927783ejm.409.2021.10.05.14.05.35; Tue, 05 Oct 2021 14:06:00 -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=NYWTqPej; 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 S236086AbhJEVDN (ORCPT + 99 others); Tue, 5 Oct 2021 17:03:13 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50800 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbhJEVDM (ORCPT ); Tue, 5 Oct 2021 17:03:12 -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=xoD6/I7Cc8crpzzqPjHiA+h57zOy6+xgtG83jf7v3i8=; b=NYWTqPejfFry0n/LrjSsAY4phD Qv1Tdgk05aJiDeQWZbS1BqXiFN/DcEdqUax8IasE+VPxks+3NE3UEyp2JQfM8YXCOsAG4Oogb1FPj SFZsudwdTTCj2sSoyY+bdNG+q9Bbt+LK+gMQf5D8vdH6eIZDVq+QPOqlesfuADycj2UQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mXrYs-009kQB-57; Tue, 05 Oct 2021 23:01:18 +0200 Date: Tue, 5 Oct 2021 23:01:18 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211005222657.7d1b2a19@thinkpad> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > In the discussed case (ethernet PHY LEDs) - it is sometimes possible to > have multiple brightness levels per color channel. For example some > Marvell PHYs allow to set 8 levels of brightness for Dual Mode LEDs. > Dual Mode is what Marvell calls when the PHY allows to pair two > LED pins to control one dual-color LED (green-red, for example) into > one. > > Moreover for this Dual Mode case they also allow for HW control of > this dual LED, which, when enabled, does something like this, in HW: > 1g link green > 100m link yellow > 10m link red > no link off > > Note that actual colors depend on the LEDs themselves. The PHY > documentation does not talk about the color, only about which pin is > on/off. The thing is that if we want to somehow set this mode for the > LED, it should be represented as one LED class device. > > I want to extend the netdev trigger to support such configuration, > so that when you have multicolor LED, you will be able to say which > color should be set for which link mode. This is getting into the exotic level i don't think we need to support. How many PHYs have you seen that support something like this? 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. Andrew