From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CAE1C433E5 for ; Sat, 25 Jul 2020 17:48:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 495EB206E3 for ; Sat, 25 Jul 2020 17:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727923AbgGYRsG (ORCPT ); Sat, 25 Jul 2020 13:48:06 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:55396 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726727AbgGYRsG (ORCPT ); Sat, 25 Jul 2020 13:48:06 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jzOH8-006piy-Gj; Sat, 25 Jul 2020 19:47:58 +0200 Date: Sat, 25 Jul 2020 19:47:58 +0200 From: Andrew Lunn To: Marek Behun Cc: Pavel Machek , netdev@vger.kernel.org, linux-leds@vger.kernel.org, jacek.anaszewski@gmail.com, Dan Murphy , =?utf-8?Q?Ond=C5=99ej?= Jirman , Russell King , Thomas Petazzoni , Gregory Clement , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC leds + net-next v3 2/2] net: phy: marvell: add support for PHY LEDs via LED class Message-ID: <20200725174758.GM1472201@lunn.ch> References: <20200724164603.29148-1-marek.behun@nic.cz> <20200724164603.29148-3-marek.behun@nic.cz> <20200725092339.GB29492@amd> <20200725113450.0d4c936b@nic.cz> <20200725150342.GG1472201@lunn.ch> <20200725193950.20cc9732@nic.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200725193950.20cc9732@nic.cz> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Jul 25, 2020 at 07:39:50PM +0200, Marek Behun wrote: > On Sat, 25 Jul 2020 17:03:42 +0200 > Andrew Lunn wrote: > > > Does hi-z mean off? In the implementation i did, i did not list off > > and on as triggers. I instead used them for untriggered > > brightness. That allowed the software triggers to work, so i had the > > PHY blinking the heartbeat etc. But i had to make it optional, since a > > quick survey of datasheets suggested not all PHYs support simple > > on/off control. > > I don't actually know what hi-z means, but enabling it disabled the LED. > But there is another register value for OFF... Can the pin be used for other things? Maybe it needs to be configured for high impedance when it is used as a shared interrupt? If it does not seem like a useful LED setting, i would drop it for the moment. > > Something beyond the scope of this patchset is implementing etHool -p > > > > -p --identify > > Initiates adapter-specific action intended to enable an operator to > > easily identify the adapter by sight. Typically this involves blink‐ > > ing one or more LEDs on the specific network port. > > > > If we have software controlled on/off, then a software trigger seems > > like i good way to do this. > > I'll look into this. No rush. As i said, out of scope for this patchset. Just keep it in mind. It should be something we can implement once in phylib, and then all phy drivers which have LED support get it for free. Andrew