Re: [LEDE-DEV] [PATCH ver. B] ramips: unify etc/board.d/01_leds configuration

2016-07-26 Thread p . wassi
Just to transport the idea what I'm thinking of: take set_wifi_led as an example. Imagine the function was built like this: > set_wifi_led() { > case $# in > 1|\ > 2) > ucidef_set_led_netdev "wifi_led" "wifi" "${1}" > "${2:-wlan0}" >

Re: [LEDE-DEV] [PATCH ver. B] ramips: unify etc/board.d/01_leds configuration

2016-07-26 Thread p . wassi
> > What about this approach: > > without changing every call to set_usb_led(), we leave set_usb_led() in > > place, > > don't use a hardcoded triggering device there, but instead have a second > > parameter, with a default value. > > Something like ${2:-wlan0} ? > > yes, that sound like a good p

Re: [LEDE-DEV] [PATCH ver. B] ramips: unify etc/board.d/01_leds configuration

2016-07-25 Thread John Crispin
On 23/07/2016 23:30, p.wa...@gmx.at wrote: > Hi, > > you're correct, this patch does not change any behaviour at the moment. > I'm currently doing work on a device which requires a non-default USB > triggering device. One option is to just use ucidef_set_led_usbdev for this > single device. Then

Re: [LEDE-DEV] [PATCH ver. B] ramips: unify etc/board.d/01_leds configuration

2016-07-23 Thread p . wassi
Hi, you're correct, this patch does not change any behaviour at the moment. I'm currently doing work on a device which requires a non-default USB triggering device. One option is to just use ucidef_set_led_usbdev for this single device. Then there's the option to bring this functionality (addition

Re: [LEDE-DEV] [PATCH ver. B] ramips: unify etc/board.d/01_leds configuration

2016-07-23 Thread John Crispin
Hi, why is this change needed > John On 23/07/2016 16:42, p.wa...@gmx.at wrote: > From: P.Wassi > > Enhance local set_*_led functions to allow more parameters > Signed-off-by: P.Wassi > --- > linux/ramips/base-files/etc/board.d/01_leds | 148 > 1 file changed, 74 inse

[LEDE-DEV] [PATCH ver. B] ramips: unify etc/board.d/01_leds configuration

2016-07-23 Thread p . wassi
From: P.Wassi Enhance local set_*_led functions to allow more parameters Signed-off-by: P.Wassi --- linux/ramips/base-files/etc/board.d/01_leds | 148 1 file changed, 74 insertions(+), 74 deletions(-) diff -rupN a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/lin