我有一个D525 Intel Atom(http://www.amazon.ca/Jetway-NF38QLB-525-Generation-Intel-1-80GHz13W/dp/B00ABZRTDU)似乎有GPIO引脚。
我正在使用4.2 Linux内核并且可以看到目录/ sys / class / gpio /(这在更新到4.2之后出现)但是我似乎无法与GPIO交互。我已按照此处的说明操作:https://www.ridgerun.com/developer/wiki/index.php/How_to_use_GPIO_signals但是我在尝试导出gpio时遇到以下错误
root@wheezy7.8:/# cd /sys/class/gpio/
root@wheezy7.8:/sys/class/gpio# GPIO=1
root@wheezy7.8:/sys/class/gpio# echo $GPIO > export
bash: echo: write error: Invalid argument
我尝试了很多针数(1-32),但没有运气......
这是modinfo gpio_ich
的输出root@wheezy7.8:/sys/class/gpio# modinfo gpio_ich
filename: /lib/modules/4.2.0-040200-generic/kernel/drivers/gpio/gpio- ich.ko
alias: platform:gpio_ich
license: GPL
description: GPIO interface for Intel ICH series
author: Peter Tyser <ptyser@xes-inc.com>
srcversion: 338BC4F9B47008C478E28F3
depends:
intree: Y
vermagic: 4.2.0-040200-generic SMP mod_unload modversions 686
parm: gpiobase:The GPIO number base. -1 means dynamic, which is the default. (int)
我还转储了配置(按照第一个链接中的说明):
root@wheezy7.8:~$ mount -t debugfs none /sys/kernel/debug
root@wheezy7.8:~$ cat /sys/kernel/debug/gpio
GPIOs 462-511, platform/gpio_ich.1.auto, gpio_ich:
这似乎表明引脚是462到511,但事实并非如此:
root@wheezy7.8:/sys/class/gpio# GPIO=462
root@wheezy7.8:/sys/class/gpio# echo $GPIO > export
bash: echo: write error: No such device
root@wheezy7.8:/sys/class/gpio# GPIO=511
root@wheezy7.8:/sys/class/gpio# echo $GPIO > export
bash: echo: write error: No such device