Linux : Activating twice the same module with differents parameters

标签 linux debian kernel-module analog-digital-converter

我正在使用两个带 I2C 接口(interface)的 ADS7828 ADC。 我使用的是具有 3.4.67 内核的 D​​ebian,并使用适用于 Linux 的 ADS7828 模块。 为了启用这个模块并控制组件,我写了:

modprobe ads7828 int_vref=0 vref_mv=3347

echo ads7828 0x48 >/sys/bus/i2c/devices/i2c-0/new_device

并且需要用 5000 vref_mv 配置第二个 ADC,我可以启用同一个模块两次吗?如果是这样的话怎么办?

最佳答案

对于后来寻找这个答案的人,我在 Redhat 的网站上找到了它:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Setting_Module_Parameters.html

For example, if you wanted to load the Intel PRO/1000 network driver with the interrupt throttle rate set to 3000 interrupts per second for the first, second and third instances of the driver, and Energy Efficient Ethernet (EEE) turned on ⁠[5], you would run, as root:

~]# modprobe e1000e InterruptThrottleRate=3000,3000,3000 EEE=1

所以大概你可以做

~]# modprobe ads7828 int_vref=0 vref_mv=3347,5000

虽然那些参数似乎在 2.6 和 3.10 之间的某个地方消失了,但 ads7828 驱动程序不再有我能找到的参数。

关于Linux : Activating twice the same module with differents parameters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24307316/

相关文章:

linux - 在汇编程序中编写 linux 内核模块时的内存访问

linux - 将文件路由到 Linux 中的正确文件夹

linux - 并行和顺序脚本执行

c - 在内核的包头中插入数据

sqlite - 如何在 Debian 上安装 sqlite

c++ - libboost-XXX-dev 和 libboost-XXX 有什么区别?

c - 内核中的地址

linux - 没有符号的 perf 顶 View 反汇编(带有剥离的二进制文件)

python - 比较两个电子表格文件并提取匹配匹配数据的最简单和最快的方法是什么?

linux - 比较 bash 中的整数,需要一元运算符