-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
realtek-poe: leds: implement led config retrieval
This implements an ubus callback "leds" that retrieves the status from the controller. This is an informative action that may be used in the future for debugging (new) configurations. Example output for ubus call poe leds: HPE 1920-24G PoE JG926A: { "system": { "sys_ok": "on", "in_gb": "off", "out_of_gb": "blink slow", "exceeds_ps": "blink fast", "out_of_gb_off_delay": 5, "exceeds_ps_off_delay": 5, "map_enable": false }, "map": { "map_0_offset": "error", "lan8": 0, "lan7": 0, "lan6": 0, "lan5": 0, "lan4": 0, "lan3": 0, "lan2": 0, "lan1": 0, "map_1_offset": "error", "lan16": 0, "lan15": 0, "lan14": 0, "lan13": 0, "lan12": 0, "lan11": 0, "lan10": 0, "lan9": 0, "map_2_offset": "error", "lan24": 0, "lan23": 0, "lan22": 0, "lan21": 0, "lan20": 0, "lan19": 0, "lan18": 0, "lan17": 0 }, "port": { "enable": false, "interface": "SPI", "shift_order": "LSB", "port_led_count": 1, "state_off": "led off", "state_req": "led on", "state_err": "led on", "state_on": "led on", "blink_override": "blink when port status is 'requesting' or 'fault'" } } ZyXEL GS1900-8HP v1 { "system": { "sys_ok": "on", "in_gb": "off", "out_of_gb": "blink slow", "exceeds_ps": "blink fast", "out_of_gb_off_delay": 5, "exceeds_ps_off_delay": 5, "map_enable": false }, "map": { "lan1": 0, "lan2": 1, "lan3": 2, "lan4": 3, "lan5": 4, "lan6": 5, "lan7": 6, "lan8": 7 }, "port": { "enable": true, "interface": "SPI", "shift_order": "LSB", "port_led_count": 2, "state_off": "led 1 off, led 2 off", "state_req": "led 1 off, led 2 on", "state_err": "led 1 off, led 2 on", "state_on": "led 1 on when PoE+, led 2 on when PoE", "blink_override": "none" } } Signed-off-by: Fabian Groffen <[email protected]>
- Loading branch information
Showing
2 changed files
with
249 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters