Hello,
I've used some bad weather here to write a small kernelmod for the AR5315. It puts the GPIO pins into an /proc/gpio directory.
You can also write to them e.g. by "echo 1 > /proc/gpio/2_dir; echo 1 > /proc/gpio/2_out", which turns the wlan-led on (at least for the fonera device).
For the source and binaries look at this ugly webspace:
http://fghhgh.150m.com/
My question is, how is the nice way to get this into the buildroot (Kamikaze)?
a) as a patch in target/linux/atheros-2.6/
b) as an autonomous kmod_package (such as madwifi)
c) no way, because there are better implementations pending ...
bye,
olg
PS: a screenshoot is attached ...
root@OpenWrt:~# insmod proc_gpio.ko
root@OpenWrt:~# cat /proc/gpio/
/proc/gpio/0_dir /proc/gpio/13_dir /proc/gpio/17_dir /proc/gpio/20_dir /proc/gpio/4_dir /proc/gpio/8_dir
/proc/gpio/0_in /proc/gpio/13_in /proc/gpio/17_in /proc/gpio/20_in /proc/gpio/4_in /proc/gpio/8_in
/proc/gpio/0_out /proc/gpio/13_out /proc/gpio/17_out /proc/gpio/20_out /proc/gpio/4_out /proc/gpio/8_out
/proc/gpio/10_dir /proc/gpio/14_dir /proc/gpio/18_dir /proc/gpio/21_dir /proc/gpio/5_dir /proc/gpio/9_dir
/proc/gpio/10_in /proc/gpio/14_in /proc/gpio/18_in /proc/gpio/21_in /proc/gpio/5_in /proc/gpio/9_in
/proc/gpio/10_out /proc/gpio/14_out /proc/gpio/18_out /proc/gpio/21_out /proc/gpio/5_out /proc/gpio/9_out
/proc/gpio/11_dir /proc/gpio/15_dir /proc/gpio/19_dir /proc/gpio/2_dir /proc/gpio/6_dir /proc/gpio/info
/proc/gpio/11_in /proc/gpio/15_in /proc/gpio/19_in /proc/gpio/2_in /proc/gpio/6_in
/proc/gpio/11_out /proc/gpio/15_out /proc/gpio/19_out /proc/gpio/2_out /proc/gpio/6_out
/proc/gpio/12_dir /proc/gpio/16_dir /proc/gpio/1_dir /proc/gpio/3_dir /proc/gpio/7_dir
/proc/gpio/12_in /proc/gpio/16_in /proc/gpio/1_in /proc/gpio/3_in /proc/gpio/7_in
/proc/gpio/12_out /proc/gpio/16_out /proc/gpio/1_out /proc/gpio/3_out /proc/gpio/7_out
root@OpenWrt:~# cat /proc/gpio/info
GPIO_IN 0X7FFF20
GPIO_OUT 0X05C764
GPIO_DIR 0X1FFF25
root@OpenWrt:~#