On Fri, Sep 20, 2013 at 06:50:56PM +0200, Gabor Juhos wrote:
> 2013.09.19. 23:50 keltezéssel, Sebastian Kemper írta:
> > Hello list,
> > 
> > Activating GPIO 20 hands over the control of the blue planet LED (WAN
> > LED) to the switch. Add this so we can put it to use.
> > 
> > Signed-off-by: Sebastian Kemper <sebastian...@gmx.net>
> > 
> > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c 
> > b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c
> > index c2ddfa8..8d9e7af 100644
> > --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c
> > +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c
> > @@ -36,6 +36,8 @@
> >  #define DIR825C1_GPIO_LED_BLUE_PLANET              18
> >  #define DIR825C1_GPIO_LED_WIFI_BGN         13
> >  
> > +#define DIR825C1_GPIO_LED_SWITCH_CONTROL   20
> > +
> >  #define DIR825C1_GPIO_BTN_RESET                    17
> >  #define DIR825C1_GPIO_BTN_WPS                      16
> >  
> > @@ -82,6 +84,11 @@ static struct gpio_led dir825c1_leds_gpio[] __initdata = 
> > {
> >             .gpio           = DIR825C1_GPIO_LED_WIFI_BGN,
> >             .active_low     = 1,
> >     },
> > +   {
> > +           .name           = "d-link:none:wan_led_switch_ctrl",
> > +           .gpio           = DIR825C1_GPIO_LED_SWITCH_CONTROL,
> > +           .active_low     = 1,
> > +   },
> 
> This looks quite ugly. The GPIO line should be configured directly from the
> board setup code instead of adding a dummy LED. See the 'gpio_request_one()'
> call in mach-tew-712br.c for example.

Thanks for the tip. I'll try it out.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to