移植环境(红色粗字体字为修改后内容,蓝色粗体字为特别注意内容)
1,开发板:韦东山JZ2440。
2,linux 版本:linux-3.4.2
3,参考文献:http://blog.youkuaiyun.com/yi412/article/details/20846291
最近打算使用文件操作的方式控制gpio,发现没有/sys/class/gpio/... (sysfs interface)这个选项,无奈,查了很多资料,还是没有这个选项,于是根据参考文献,进入/linux3.4.2/drivers/gpio/ 查看Kconfig发现如下的描述:
config GPIO_SYSFS
bool "/sys/class/gpio/... (sysfs interface)"
depends on SYSFS && EXPERIMENTAL
help
Say Y here to add a sysfs interface for GPIOs.
This is mostly useful to work around omissions in a system's
kernel support. Those are common in custom and semicustom
hardware assembled using standard kernels with a minimum of
custom patches. In those cases, userspace code may import
a given GPIO fro