edit: Still can’t export and I’M SURE that the gpio pin number is calculated by:
(Bank - 1) * 32 + pin_number
For example, to export PL8 you should type:
echo 360 > /sys/class/gpio/export … BUT doesn’t appear the …/gpio/gpio360 folder
If I type cat /sys/kernel/debug/gpio , I can see the GPIO360 as output and with low state
To be sure that PL8 = gpio360, I put in the shell:
echo 1 > sys/class/gpio_sw/PL8/data
and tachan!!, I can see the gpio360 with output=1
I have read that gpio folder is controlled directly by kernel and gpio_sw folder is controlled by sys_class.fex file, I am right?
Why I can’t export PL8 (gpio360) from sys/class/gpio folder but I can control it from sys/class/gpio_sw/PL8/data???
I should change something from the Kernel configuration? Or I should disable the gpio_sw folder?
I think that because PL8 exits in gpio_sw can’t be do the export in gpio folder. Could be?
Please check the attachment for all m64 gpio numberm64_gpio_number (19.4 KB)
gpio_sw is created by gpio-sunxi module, 40pin gpios are requested if this driver loaded, and you can’t request them again by gpio export way. So rmmod gpio-sunxi module before using gpio sysfs control.