When I try to add pin 4 to the export by "sudo echo 4 >/sys/class/gpio/export" I will get this error message.
echo: write error: Device or resource busy
It works fine for all other pin numbers though.
Also when attempting the code a kernel module, when I try to change the gpio pin 4 value to 1 (by "gpio_direction_output(4,1);", it will automatically revert back to 0 after a few seconds.
sudo echo 4 > /sys/class/gpio/unexport
to free the resource and use it.