From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E559618C2A for ; Wed, 21 Jun 2023 14:55:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1E27C433C0; Wed, 21 Jun 2023 14:55:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687359317; bh=XmUJrXEv6FpzPmLHQQVKfx65ofQ5ze4boTYNspgJr0Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kYY4WwazOEzAfa9uKMwIbqFeb+IwrNPKg0dDGTL6E7G6rgUqeA0xh8V/X/BLAsJhV XDXyL+NFeKMO2zqsjJ1rcizAgnq1s7xYwvZT4mLYs1F1FmPSKv0RW/NjLyP+PNCv+0 QwEryrNC1YNYuoZsGXdEIc5G4hpbgicTWFN36uW9/MZXO+XenFgx0etsg+4rFu6vs0 VF3r7OeijylkG4EdhEFUXQcL8ih80xDn/M/Y8htSzcG9/mqw62TfHt9Aw2tjf7uvMh m5PPoUII+bQqsaECsXCOVfgaw0EOp4mDPJ9/4Co35eUq4hgbL9IWgpdGUxUwHcPZay tT30H/lAr7EkA== Date: Wed, 21 Jun 2023 15:55:12 +0100 From: Lee Jones To: Christian Marangi Cc: Pavel Machek , Andrew Lunn , "David S. Miller" , Dan Carpenter , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [net-next PATCH v5 2/3] leds: trigger: netdev: add additional specific link duplex mode Message-ID: <20230621145512.GB10378@google.com> References: <20230619204700.6665-1-ansuelsmth@gmail.com> <20230619204700.6665-3-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230619204700.6665-3-ansuelsmth@gmail.com> On Mon, 19 Jun 2023, Christian Marangi wrote: > Add additional modes for specific link duplex. Use ethtool APIs to get the > current link duplex and enable the LED accordingly. Under netdev event > handler the rtnl lock is already held and is not needed to be set to > access ethtool APIs. > > This is especially useful for PHY and Switch that supports LEDs hw > control for specific link duplex. > > Add additional modes: > - half_duplex: Turn on LED when link is half duplex > - full_duplex: Turn on LED when link is full duplex > > Signed-off-by: Christian Marangi > Reviewed-by: Andrew Lunn > --- > drivers/leds/trigger/ledtrig-netdev.c | 27 +++++++++++++++++++++++++-- > include/linux/leds.h | 2 ++ > 2 files changed, 27 insertions(+), 2 deletions(-) Acked-by: Lee Jones -- Lee Jones [李琼斯]