Bug 211462 - AR8327 Etherswitch led control patch
Summary: AR8327 Etherswitch led control patch
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Keywords: patch
Depends on:
Reported: 2016-07-30 16:53 UTC by Dan Nelson
Modified: 2016-08-02 21:07 UTC (History)
1 user (show)

See Also:

userland and kernel patch (16.18 KB, patch)
2016-07-30 16:53 UTC, Dan Nelson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nelson 2016-07-30 16:53:06 UTC
Created attachment 173123 [details]
userland and kernel patch

The attached patch extends the etherswitch code to support controlling the LEDs associated with switch ports.  An etherswitchcfg "led" subcommand is added, and led(4) device nodes are created for each led as well.  There is backend code for the AR8327 switch, and support other switches should be easy to add.

Example usage: 

etherswitchcfg port1 led 1 on port2 led 1 on port3 led 1 blink port4 led 1 off port5 led 1 default
echo 0 > /dev/led/arswitch0port1led1