Commit Graph

27 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Edmunt Pienkowsky fdc7cc9907 base-files: add interval option to netdev LED trigger configuration
Add an uci option to set the interval parameter of the netdev trigger.

Signed-off-by: Edmunt Pienkowsky <roed@onet.eu>
7 years ago
Rafał Miłecki 2187f57db6 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>
8 years ago
Rafał Miłecki 0658527e1e switch to the new usbport LED trigger
This makes init.d script handle existing UCI entries using the new
trigger. It also switches all targets to use its package.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Karl Palsson ad8d197b82 base-files: support oneshot leds properly.
oneshot trigger configurations for LEDs are created, but the on/off
timing configurations are ignored.  generate_config is correctly creating
oneshot configs, but the later led script doesn't recognise the trigger
details.

Fixes: c0c3f2d4c9 leds: support oneshot as well as timer triggers
Signed-off-by: Karl Palsson <karlp@etactica.com>
8 years ago
Felix Fietkau 577f873daf kernel: remove unused morse led trigger driver
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 35b33f0413 base-files: maintain LED config state
Record the state of any hardware LED configured through UCI and use that
information to revert the state when applying updated settings while
maintaining default behaviour of system LEDs.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 33a4d22f4c base-files: reset LED state
Attempt to reset all LED states before applying the UCI configuration to
avoid leaving disabled LEDs behind in lingering glowing state, e.g. when
changing the sysfs entry in the config from one hardware LED to another.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 285d9e364e base-files: add support for speed mask to switch config init scripts
This patch adds extra parameter to switch LED trigger initialization
functions.  New functionality maintains backward compatibility, so
calling functions without setting new speed_mask parameter works
as expected.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48776
8 years ago
John Crispin ec6b85ca0e base-files: use max_brightness to set LED
LEDs which are controlled by a PWM need to use the supplied
max_brightness instead. Otherwise they might appear to be
very dim / broken.

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47854
9 years ago
John Crispin d0d3ca2a1b base-files: added option to configure the gpio led trigger in uci-defaults
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>

SVN-Revision: 46341
9 years ago
Felix Fietkau 2659762e62 base-files: fix logic error in led default handling (patch from #19593)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45600
9 years ago
Felix Fietkau 93fb3cac1b base-files: reorder led trigger/brightness writes
Depending on configuration, disable the LED before writing the trigger
and enable it after writing it. Fixes LEDs where the value defaults to 1

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45463
9 years ago
John Crispin b54f3ad6e7 base-files: fix led script to skip missing triggers
this is based on http://patchwork.ozlabs.org/patch/424451/

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44087
9 years ago
Luka Perkov 3fea61afe8 base-files: update copyright headers
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41334
10 years ago
Gabor Juhos 38fced86ee base-files: add support for the morse LED trigger
Write "delay" and "message" options to their respective files,
allowing Morse code message configuration through UCI.
The delay (dit length) defaults to 150ms (about 8 words per minute,
suitable for beginners).

Signed-off-by: Petr Viktorin <encukou@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34380
12 years ago
Florian Fainelli d3f22617a2 base-files: skip LEDs handled by rssileds in led init-script
Without this, /etc/init.d/led will try to set the non-existing 'rssi' trigger.
This doesn't harm as the kernel will refuse this setting, but it outputs some
ugly log-lines:
Jun 24 10:15:19 OpenWrt user.info sysinit: setting up led RSSILOW
Jun 24 10:15:19 OpenWrt user.info sysinit: sh: write error: Invalid argument
...

In order to avoid this, skip LEDs with trigger = "rssi" in /etc/init.d/led

Signed-off-by: Daniel Golle <dgolle@allnet.de>

SVN-Revision: 33717
12 years ago
Gabor Juhos ff89832fdb package/base-files: add support for the switch LED trigger
SVN-Revision: 29629
13 years ago
Gabor Juhos 3f85c52a3a package/base-files: use case statement in led init script
SVN-Revision: 29628
13 years ago
Florian Fainelli d7fe921089 base-files: support port_state in led config (#6763)
Signed-off-by: Alexey Torkhov <atorkhov@gmail.com>

SVN-Revision: 25172
13 years ago
Gabor Juhos 63c786dde7 base-files: add support for the usbdev LED trigger
SVN-Revision: 24647
14 years ago
Felix Fietkau 8ec79b460c run led init after /etc/init.d/done to keep the configured led settings active after the system has finished booting Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
SVN-Revision: 19050
15 years ago
Felix Fietkau ae0745e240 base-files: port init.d/led to new config_get
... and don't call logger directly, rcS takes care of the correct redirection

Signed-off-by: Malte S. Stretz <mss@apache.org>

SVN-Revision: 17158
15 years ago
Travis Kemen 91d3e6b05b make option name optional
SVN-Revision: 12585
16 years ago
John Crispin 12df593510 fixes broken if-then in led init script
SVN-Revision: 12411
16 years ago
John Crispin 3403cbe948 remove /etc/functions.sh call from led hotplug script
SVN-Revision: 12312
16 years ago
Steven Barth 6b6d027172 added support for the timer-trigger to uci LED support
SVN-Revision: 12236
16 years ago
John Crispin 72396bd614 add uci led support - /etc/config/system can hold led info which is applied at boot - adds /sbin/led.sh to set/clear leds via a name defined in /etc/config/system
SVN-Revision: 12104
16 years ago