From: Zach Brown <zach.brown@ni.com>
To: f.fainelli@gmail.com
Cc: devel@driverdev.osuosl.org, florian.c.schilhabel@googlemail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Larry.Finger@lwfinger.net, mlindner@marvell.com
Subject: [RFC 0/3] Add support for led triggers on phy link state change
Date: Wed, 14 Sep 2016 16:55:46 -0500 [thread overview]
Message-ID: <1473890149-2066-1-git-send-email-zach.brown@ni.com> (raw)
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
next reply other threads:[~2016-09-14 21:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 21:55 Zach Brown [this message]
2016-09-14 21:55 ` [RFC 1/3] skge: Change LED_OFF to LED_REG_OFF in marvel skge driver to avoid conflicts with leds namespace Zach Brown
2016-09-14 21:55 ` [RFC 2/3] staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace Zach Brown
2016-09-15 0:13 ` Larry Finger
2016-09-14 21:55 ` [RFC 3/3] phy,leds: add support for led triggers on phy link state change Zach Brown
2016-09-14 23:16 ` Florian Fainelli
2016-09-19 15:48 ` Zach Brown
2016-10-07 14:13 ` [RFC 0/3] Add " Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473890149-2066-1-git-send-email-zach.brown@ni.com \
--to=zach.brown@ni.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=f.fainelli@gmail.com \
--cc=florian.c.schilhabel@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mlindner@marvell.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).