Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500307

Re: [PATCH v4 3/3] net: phy: leds: add support for led triggers on phy link state change

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/3] net: phy: leds: add support for led triggers on phy link state change
Date 2016-10-13 16:50 +0200
Message-ID <srPux-4ML-7@gated-at.bofh.it> (permalink)
References <srbQt-2QB-7@gated-at.bofh.it> <srbQt-2QB-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Zach Brown <zach.brown@ni.com>
Date: Tue, 11 Oct 2016 15:26:20 -0500

> From: Josh Cartwright <josh.cartwright@ni.com>
> 
> 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 <josh.cartwright@ni.com>
> Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
> Signed-off-by: Zach Brown <zach.brown@ni.com>
 ...
> +	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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 3/3] net: phy: leds: add support for led triggers on phy link state change Zach Brown <zach.brown@ni.com> - 2016-10-11 22:30 +0200
  Re: [PATCH v4 3/3] net: phy: leds: add support for led triggers on  phy link state change David Miller <davem@davemloft.net> - 2016-10-13 16:50 +0200
    Re: [PATCH v4 3/3] net: phy: leds: add support for led triggers on  phy link state change David Miller <davem@davemloft.net> - 2016-10-13 18:10 +0200
    Re: [PATCH v4 3/3] net: phy: leds: add support for led triggers on  phy link state change Andrew Lunn <andrew@lunn.ch> - 2016-10-13 20:30 +0200

csiph-web