Hi Gabor,

I know what you mean but if I boot the OpenWrt shipped with the
RouterStation I can see

[...]
Registered led device: ubnt:green:led0
Registered led device: ubnt:green:led1
Registered led device: ubnt:green:rf
Registered led device: ubnt:green:led3
Registered led device: ubnt:green:led4
Registered led device: ubnt:green:led5
Registered led device: ubnt:green:led6
Registered led device: ubnt:green:led7
[...]

for this reason I patched my kernel, but your solution is better.

Thanks a lot.
Andrea

On Sat, Jan 31, 2009 at 10:22 PM, Gabor Juhos <juh...@openwrt.org> wrote:
> Andrea Tassi írta:
>> This enables all gpio lines of the Ubiquiti RouterStation. In
>> particular with this patch I can successfully access to the user gpio
>> header "J33" (http://wiki.ubnt.com/wiki/index.php/RouterStation).
>>
>> Signed-off-by: Andrea Tassi <andrea.tassi at gmail.com> and WiFi(ed) -
>> The Embedded Development Team (of Riccardo Coppola <coppola.riccardo
>> at gmail.com>, Andrea Tassi <andrea.tassi at gmail.com> and
>> Massimiliano Toce <massimiliano.toce at gmail.com>)
>>
>> ---
>>
>> --- kamikaze.orig/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c     
>>  2009-01-28
>> 00:55:10.000000000 +0100
>> +++ kamikaze/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c   
>> 2009-01-31
>> 12:32:28.000000000 +0100
>> @@ -20,7 +20,14 @@
>>  #include <asm/mach-ar71xx/pci.h>
>>  #include <asm/mach-ar71xx/platform.h>
>>
>> +#define UBNT_RS_GPIO_LED_0   0
>> +#define UBNT_RS_GPIO_LED_1   1
>>  #define UBNT_RS_GPIO_LED_RF  2
>> +#define UBNT_RS_GPIO_LED_3   3
>> +#define UBNT_RS_GPIO_LED_4   4
>> +#define UBNT_RS_GPIO_LED_5   5
>> +#define UBNT_RS_GPIO_LED_6   6
>> +#define UBNT_RS_GPIO_LED_7   7
>>  #define UBNT_RS_GPIO_SW4     8
>>
>>  #define UBNT_BUTTONS_POLL_INTERVAL   20
>> @@ -55,6 +62,34 @@
>>               .name           = "ubnt:green:rf",
>>               .gpio           = UBNT_RS_GPIO_LED_RF,
>>               .active_low     = 0,
>> +     }, {
>> +             .name           = "ubnt:green:led0",
>> +             .gpio           = UBNT_RS_GPIO_LED_0,
>> +             .active_low     = 0,
>> +     }, {
>> +             .name           = "ubnt:green:led1",
>> +             .gpio           = UBNT_RS_GPIO_LED_1,
>> +             .active_low     = 0,
>> +     }, {
>> +             .name           = "ubnt:green:led3",
>> +             .gpio           = UBNT_RS_GPIO_LED_3,
>> +             .active_low     = 0,
>> +     }, {
>> +             .name           = "ubnt:green:led4",
>> +             .gpio           = UBNT_RS_GPIO_LED_4,
>> +             .active_low     = 0,
>> +     }, {
>> +             .name           = "ubnt:green:led5",
>> +             .gpio           = UBNT_RS_GPIO_LED_5,
>> +             .active_low     = 0,
>> +     }, {
>> +             .name           = "ubnt:green:led6",
>> +             .gpio           = UBNT_RS_GPIO_LED_6,
>> +             .active_low     = 0,
>> +     }, {
>> +             .name           = "ubnt:green:led7",
>> +             .gpio           = UBNT_RS_GPIO_LED_7,
>> +             .active_low     = 0,
>>       }
>>  };
>
> NAK.
>
> The RouterStation has one GPIO controlled LED (RF) only by default, although
> more GPIO lines are available on the 'J33' header. If we would register each 
> of
> them as a 'gpio_led' device, the users won't be able to use it for something 
> else.
>
> If you want to control these GPIO lines from user-space you may use the sysfs
> interface:
>
> echo 0 > /sys/class/gpio/export
> echo out > /sys/class/gpio/gpio0/direction
> echo 1 > /sys/class/gpio/gpio0/value
>
> Regards,
> Gabor
>
>
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to