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

2016-10-18 Thread Zach Brown
On Tue, Oct 18, 2016 at 09:13:50AM +0200, Andrew Lunn wrote: > On Mon, Oct 17, 2016 at 10:49:55AM -0500, Zach Brown wrote: > > 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 >

[PATCH v5 0/4] Add support for led triggers on phy link state change

2016-10-17 Thread Zach Brown
ist of triggers to dynamic list determined by speeds return by phy_supported_speeds. Zach Brown (4): skge: Rename LED_OFF and LED_ON in marvel skge driver to avoid conflicts with leds namespace net: phy: Encapsulate actions performed during link state changes into funct

[PATCH v5 2/4] net: phy: Encapsulate actions performed during link state changes into function phy_adjust_link

2016-10-17 Thread Zach Brown
ore. Actions that should occur whenever the phy link is adjusted can now be added to the phy_adjust_link function. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/phy.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/phy.c

[PATCH v5 1/4] skge: Rename LED_OFF and LED_ON in marvel skge driver to avoid conflicts with leds namespace

2016-10-17 Thread Zach Brown
changed LED_ON to LED_REG_ON to avoid possible future conflict and for consistency. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/ethernet/marvell/skge.c | 6 +++--- drivers/net/ethernet/marvell/skge.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/d

[PATCH v5 4/4] net: phy: leds: add support for led triggers on phy link state change

2016-10-17 Thread Zach Brown
by this patch the leds not controlled by the phy can be configured to show the current speed of the ethernet connection. The leds controlled by the phy are unaffected. Signed-off-by: Josh Cartwright <josh.cartwri...@ni.com> Signed-off-by: Nathan Sullivan <nathan.sulli...@ni.com> Signed-off-by

[PATCH v5 3/4] net: phy: Create phy_supported_speeds function which lists speeds currently supported by a phydevice

2016-10-17 Thread Zach Brown
phy_supported_speeds provides a means to get a list of all the speeds a phy device currently supports. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/phy.c | 35 +++ include/linux/phy.h | 15 +++ 2 files changed, 50 inse

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

2016-10-13 Thread Zach Brown
On Thu, Oct 13, 2016 at 10:46:34AM -0400, David Miller wrote: > From: Zach Brown <zach.br...@ni.com> > Date: Tue, 11 Oct 2016 15:26:20 -0500 > > > From: Josh Cartwright <josh.cartwri...@ni.com> > > > > Create an option CONFIG_LED_TRIGGER_PHY (default

Re: [RFC v3 3/3] phy,leds: add support for led triggers on phy link state change

2016-10-12 Thread Zach Brown
On Mon, Oct 10, 2016 at 02:03:32AM -0700, Florian Fainelli wrote: > > + > > +#ifdef CONFIG_LED_TRIGGER_PHY > > + > > +#include > > +#include > > + > > +#define PHY_LINK_LED_MAX_TRIGGERS 5 > > +#define PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE 7 > > +#define PHY_MII_BUS_ID_SIZE(20 - 3) > >

Re: [PATCH v4 1/3] skge: Rename LED_OFF and LED_ON in marvel skge driver to avoid conflicts with leds namespace

2016-10-11 Thread Zach Brown
On Tue, Oct 11, 2016 at 02:14:07PM -0700, Stephen Hemminger wrote: > On Tue, 11 Oct 2016 15:26:18 -0500 > Zach Brown <zach.br...@ni.com> wrote: > > > Adding led support for phy causes namespace conflicts for some > > phy drivers. > > > > The marvel skge d

[PATCH v4 2/3] net: phy: Encapsulate actions performed during link state changes into function phy_adjust_link

2016-10-11 Thread Zach Brown
ore. Actions that should occur whenever the phy link is adjusted can now be added to the phy_adjust_link function. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/phy.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/phy.c

[PATCH v4 0/3] Add support for led triggers on phy link state change

2016-10-11 Thread Zach Brown
and improve consistency. * Dropped rtl8712 patch that was accepted separately. v4: * tweaked commit message Josh Cartwright (1): net: phy: leds: add support for led triggers on phy link state change Zach Brown (2): skge: Rename LED_OFF and LED_ON in marvel skge driver to avoid conflicts

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

2016-10-11 Thread Zach Brown
f LEDs to represent link state changes on the phy. Signed-off-by: Josh Cartwright <josh.cartwri...@ni.com> Signed-off-by: Nathan Sullivan <nathan.sulli...@ni.com> Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/Kconfig| 13 +++- drivers/net/phy/

[PATCH v4 1/3] skge: Rename LED_OFF and LED_ON in marvel skge driver to avoid conflicts with leds namespace

2016-10-11 Thread Zach Brown
changed LED_ON to LED_REG_ON to avoid possible future conflict and for consistency. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/ethernet/marvell/skge.c | 6 +++--- drivers/net/ethernet/marvell/skge.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/d

[RFC v3 2/3] phy: Encapsulate actions performed during link state changes into function phy_adjust_link

2016-10-07 Thread Zach Brown
ore. Actions that should occur whenever the phy link is adjusted can now be added to the phy_adjust_link function. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/phy.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/phy.c

[RFC v3 3/3] phy, leds: add support for led triggers on phy link state change

2016-10-07 Thread Zach Brown
f LEDs to represent link state changes on the phy. Signed-off-by: Josh Cartwright <josh.cartwri...@ni.com> Signed-off-by: Nathan Sullivan <nathan.sulli...@ni.com> Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/Kconfig| 13 +++- drivers/net/phy/

[RFC v3 1/3] skge: Rename LED_OFF and LED_ON in marvel skge driver to avoid conflicts with leds namespace

2016-10-07 Thread Zach Brown
changed LED_ON to LED_REG_ON to avoid possible future conflict and for consistency. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/ethernet/marvell/skge.c | 6 +++--- drivers/net/ethernet/marvell/skge.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/d

[PATCH 0/3] Add support for led triggers on phy link state change

2016-10-07 Thread Zach Brown
and improve consistency. * Dropped rtl8712 patch that was accepted separately. Josh Cartwright (1): phy,leds: add support for led triggers on phy link state change Zach Brown (2): skge: Change LED_OFF to LED_REG_OFF in marvel skge driver to avoid conflicts with leds namespace phy: Encapsulate

[RFC v2 1/4] skge: Change LED_OFF to LED_REG_OFF in marvel skge driver to avoid conflicts with leds namespace

2016-09-27 Thread Zach Brown
Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/ethernet/marvell/skge.c | 4 ++-- drivers/net/ethernet/marvell/skge.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 7173836..f

[RFC v2 2/4] staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace

2016-09-27 Thread Zach Brown
future collision LED_ON was changed to LED_STATE_ON as well. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/staging/rtl8712/rtl8712_led.c | 388 +- 1 file changed, 194 insertions(+), 194 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_le

[RFC v2 4/4] phy, leds: add support for led triggers on phy link state change

2016-09-27 Thread Zach Brown
f LEDs to represent link state changes on the phy. Signed-off-by: Josh Cartwright <josh.cartwri...@ni.com> Signed-off-by: Nathan Sullivan <nathan.sulli...@ni.com> Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/Kconfig| 13 +++- drivers/net/phy/

[RFC v2 0/4] Add support for led triggers on phy link state change

2016-09-27 Thread Zach Brown
Zach Brown (3): skge: Change LED_OFF to LED_REG_OFF in marvel skge driver to avoid conflicts with leds namespace staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace phy: Encapsulate actions performed during link state changes into function

[RFC v2 3/4] phy: Encapsulate actions performed during link state changes into function phy_adjust_link

2016-09-27 Thread Zach Brown
ore. Actions that should occur whenever the phy link is adjusted can now be added to the phy_adjust_link function. Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/phy.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/net/ph

Re: [RFC 3/3] phy,leds: add support for led triggers on phy link state change

2016-09-19 Thread Zach Brown
On Wed, Sep 14, 2016 at 04:16:15PM -0700, Florian Fainelli wrote: > On 09/14/2016 02:55 PM, Zach Brown wrote: > > From: Josh Cartwright <josh.cartwri...@ni.com> > > > > Create an option CONFIG_LED_TRIGGER_PHY (default n), which will > > create a set of led t

[RFC 2/3] staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace

2016-09-14 Thread Zach Brown
Adding led support for phy causes namespace conflicts for some phy drivers. The rtl871 driver declared an enum for representing LED states. The enum contains constant LED_OFF which conflicted with declartation found in linux/leds.h. LED_OFF changed to LED_STATE_OFF Signed-off-by: Zach Brown

[RFC 3/3] phy, leds: add support for led triggers on phy link state change

2016-09-14 Thread Zach Brown
f LEDs to represent link state changes on the phy. Signed-off-by: Josh Cartwright <josh.cartwri...@ni.com> Signed-off-by: Nathan Sullivan <nathan.sulli...@ni.com> Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/phy/Kconfig| 12 drivers/net/phy/

[RFC 1/3] skge: Change LED_OFF to LED_REG_OFF in marvel skge driver to avoid conflicts with leds namespace

2016-09-14 Thread Zach Brown
Signed-off-by: Zach Brown <zach.br...@ni.com> --- drivers/net/ethernet/marvell/skge.c | 4 ++-- drivers/net/ethernet/marvell/skge.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 7173836..f

[RFC 0/3] Add support for led triggers on phy link state change

2016-09-14 Thread Zach Brown
to do so. Josh Cartwright (1): phy,leds: add support for led triggers on phy link state change Zach Brown (2): skge: Change LED_OFF to LED_REG_OFF in marvel skge driver to avoid conflicts with leds namespace staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts