From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755980AbcJMOqm (ORCPT ); Thu, 13 Oct 2016 10:46:42 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:33572 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbcJMOqh (ORCPT ); Thu, 13 Oct 2016 10:46:37 -0400 Date: Thu, 13 Oct 2016 10:46:34 -0400 (EDT) Message-Id: <20161013.104634.2079376697690971907.davem@davemloft.net> To: zach.brown@ni.com Cc: f.fainelli@gmail.com, mlindner@marvell.com, stephen@networkplumber.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, florian.c.schilhabel@googlemail.com, Larry.Finger@lwfinger.net, gregkh@linuxfoundation.org, rpurdie@rpsys.net, j.anaszewski@samsung.com, linux-leds@vger.kernel.org, andrew@lunn.ch Subject: Re: [PATCH v4 3/3] net: phy: leds: add support for led triggers on phy link state change From: David Miller In-Reply-To: <1476217580-21229-4-git-send-email-zach.brown@ni.com> References: <1476217580-21229-1-git-send-email-zach.brown@ni.com> <1476217580-21229-4-git-send-email-zach.brown@ni.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 13 Oct 2016 07:46:36 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zach Brown Date: Tue, 11 Oct 2016 15:26:20 -0500 > From: Josh Cartwright > > Create an option CONFIG_LED_TRIGGER_PHY (default n), which will > create a set of led triggers for each instantiated PHY device. There is > one LED trigger per link-speed, per-phy. > > This allows for a user to configure their system to allow a set of LEDs > to represent link state changes on the phy. > > Signed-off-by: Josh Cartwright > Signed-off-by: Nathan Sullivan > Signed-off-by: Zach Brown ... > + static const char * const name_suffix[] = { > + "10Mbps", > + "100Mbps", > + "1Gbps", > + "2.5Gbps", > + "10Gbps", This choice of both the array size and the speeds to support seems entirely arbitrary and is inappropriate for a generic driver of this kind. This seems to be hard coding this to support the list of speeds supported by whatever driver you want to use with this new LED facility, and sorry that's not how we build nice generic pieces of infrastructure. Thanks.