base-files: add ucidef_set_led_usbport for full usbport support
authorRafał Miłecki <rafal@milecki.pl>
Wed, 19 Oct 2016 11:05:53 +0000 (13:05 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Sat, 22 Oct 2016 09:16:01 +0000 (11:16 +0200)
commit2187f57db6f55d41d68704179d309fbb6199b08e
tree2be4b254edec74d16f8091c170e3fa9b07c7025e
parent32c28a78f798dffb983a7f00342b471e5e4ac177
base-files: add ucidef_set_led_usbport for full usbport support

This helper allows using usbport trigger directly. It requires usbport
compatible syntax and supports specifying multiple USB ports, e.g.:
ucidef_set_led_usbport "usb" "USB" "devicename:colour:function" "usb1-port1" "usb2-port1"

This adds a proper object to the board.json, e.g.
"usb": {
"name": "USB",
"type": "usbport",
"sysfs": "devicename:colour:function",
"ports": [
"usb1-port1",
"usb2-port1"
]
}
and supports translating it into uci section.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
package/base-files/files/bin/config_generate
package/base-files/files/etc/init.d/led
package/base-files/files/lib/functions/uci-defaults.sh