From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765842AbcINV4A (ORCPT ); Wed, 14 Sep 2016 17:56:00 -0400 Received: from skprod2.natinst.com ([130.164.80.23]:49026 "EHLO ni.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1763763AbcINVzz (ORCPT ); Wed, 14 Sep 2016 17:55:55 -0400 From: Zach Brown To: f.fainelli@gmail.com Cc: 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 Subject: [RFC 0/3] Add support for led triggers on phy link state change Date: Wed, 14 Sep 2016 16:55:46 -0500 Message-Id: <1473890149-2066-1-git-send-email-zach.brown@ni.com> X-Mailer: git-send-email 2.7.4 X-MIMETrack: Itemize by SMTP Server on US-AUS-MGWOut1/AUS/H/NIC(Release 8.5.3FP6 HF1218|December 12, 2014) at 09/14/2016 04:55:49 PM, Serialize by Router on US-AUS-MGWOut1/AUS/H/NIC(Release 8.5.3FP6 HF1218|December 12, 2014) at 09/14/2016 04:55:49 PM, Serialize complete at 09/14/2016 04:55:49 PM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-14_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some drivers that include phy.h defined LED_OFF which conflicts with definition in leds.h. phy led support uses leds.h so the two namespaces are no longer isolated. The first two patches fix the two net drivers that declared enum constants that conflict with enum constants in linux/leds.h. The final patch adds support for led triggers on phy link state changes by adding a config option. When set the config option will create a set of led triggers for each phy device. Users can use the led triggers to represent link state changes on the phy. The changes assumes that there are 5 speed options 10Mb,100Mb,1Gb,2.5Gb,10Gb The assumption makes mapping a phy_device's current speed to a trigger easy, but means there are triggers made that aren't used if the phy doesn't support the corresponding speeds. Thoughts on how to better manage the triggers created would be appreciated if is important 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 with LED namespace drivers/net/ethernet/marvell/skge.c | 4 +- drivers/net/ethernet/marvell/skge.h | 2 +- drivers/net/phy/Kconfig | 12 +++ drivers/net/phy/Makefile | 1 + drivers/net/phy/phy.c | 8 ++ drivers/net/phy/phy_device.c | 4 + drivers/net/phy/phy_led_triggers.c | 109 +++++++++++++++++++ drivers/staging/rtl8712/rtl8712_led.c | 192 +++++++++++++++++----------------- include/linux/phy.h | 9 ++ include/linux/phy_led_triggers.h | 42 ++++++++ 10 files changed, 284 insertions(+), 99 deletions(-) create mode 100644 drivers/net/phy/phy_led_triggers.c create mode 100644 include/linux/phy_led_triggers.h -- 2.7.4