Exporting GPIO to control devices

I want to use some GPIO pins of BPI R64. but I don’t see the gpio folder here. Can anyone help me? I have loaded the linux kernel 16.04. Thank you everyone


The sysfs interface (/sys/class/gpio/…) needs kernel-option CONFIG_GPIO_SYSFS

I guess your kernel does not have it…afair i have added it to my r64 defconfig

thank you.but how to set kernel-option CONFIG_GPIO_SYSFS. i’m newbie

You can look if there is a module for it and load it with modprobe

cd /lib/modules/$(uname -r)
find . -iname '*gpio*'

If not you need to update your kernel (maybe rebuilding it before)