如何从用户空间(linux i2c-dev)读取i2c适配器类(例如I2C_CLASS_DDC)?

发布于 2025-01-14 00:31:54 字数 349 浏览 2 评论 0原文

在笔记本电脑之外,更改显示器的亮度等需要 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

作死小能手 2025-01-21 00:31:54

您可以尝试查看 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文