gpt4 book ai didi

linux - 如何在设备树中将 PEcflags设置为 SM 总线?

转载 作者:太空宇宙 更新时间:2023-11-04 12:51:00 26 4
gpt4 key购买 nike

我有一个需要 PEC 的 I2C/SMBus 设备我正在为它编写一个内核空间驱动程序。

在 Linux 2.6.37 上我使用 i2c_board_info实例化客户端并在那里设置标志,但现在驱动程序正在移植到 3.14,我找不到 PEcflags的设备树绑定(bind)。

实际上我不认为有这样的绑定(bind)因为the I2C core is not getting any property from device tree other than reg and wakeup-source .

那么我应该在我的设备驱动程序中执行 i2c_client->flags |= I2C_CLIENT_PEC 吗?

最佳答案

在当前的主线内核(4.5)代码中,至少有三个 i2c 客户端驱动程序在驱动程序中启用 I2C_CLIENT_PEcflags(ipmi_ssiflm90pmbus_core),其中之一(lm90)将其暴露给系统文件。

我相信在客户端驱动程序中执行 i2c_client->flags |= I2C_CLIENT_PEC 是安全的。

关于linux - 如何在设备树中将 PEcflags设置为 SM 总线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37173966/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com