如何从用户空间(linux i2c-dev)读取i2c适配器类(例如I2C_CLASS_DDC)?
在笔记本电脑之外,更改显示器的亮度等需要 DDC/CI。我相信,这最好在用户空间中完成。加载i2c-dev
(内核模块)可以访问/dev/i2c-
下的i2c总线。不幸的是,不仅支持 DDC/CI 的显示器具有 i2c 总线,而且在不相关的总线上读/写、同时试图找到哪个连接到哪个总线也远非理想。
看起来 i2c 总线适配器驱动程序已经对其总线进行了分类:例如 I2C_CLASS_DDC 正是我正在寻找的。
有没有办法查看 i2c-dev 设备的适配器类?
(或者同样好:有什么方法可以匹配我想从 X11 工作区或类似的 DDC/CI 与之交谈的设备吗?)
Outside of Laptops, changing e.g. brightness of monitors requires DDC/CI. This is best done in userspace, I believe. Loading i2c-dev
(kernel module) gives access to i2c-buses under /dev/i2c-<number>
. Unfortunately not just monitors supporting DDC/CI have i2c-buses and it is far from ideal to read/write on unrelated buses, while trying to find which connects to what.
It seems that i2c bus adapter drivers already categorize their buses: e.g. I2C_CLASS_DDC for exactly what I’m looking for.
Is there any way to see the adapter class of a i2c-dev
device?
(Or equally good: any way to match the device I want to talk to for DDC/CI from X11 workspaces or similar?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试查看 ddccontrol:
ddccontrol -p
该实用程序扫描 I2C 并以某种方式检测哪些连接到监视器。
您可以检查其源代码并找到解决方案。
聚苯乙烯
这可能不是一个答案,但是,抱歉,我没有足够的“声誉”来撰写评论。
You can try to look at ddccontrol:
ddccontrol -p
This utility scan I2Cs and somehow detects which are connected to monitors.
You can examine it's source code and find solution.
P.S.
This may be not an answer, but, sorry, I have not enough "reputation" to write a comment.