linux - Linux 调节器用户空间消耗驱动程序:sysfs 下的缺失状态
问题描述
我正在尝试使用reg-userspace-consumer驱动程序来打开/关闭 USB 总线电源。看起来驱动程序被反向移植到4.4.143。我所要做的就是用驱动程序编译内核:
CONFIG_REGULATOR_USERSPACE_CONSUMER=y
并通过设备树将其与目标调节器链接:
vcc_otg_vbus: otg-vbus-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&otg_vbus_drv>;
regulator-name = "vcc_otg_vbus";
};
vcc_otg_vbus_switch {
status = "okay";
compatible = "reg-userspace-consumer";
regulator-name = "vcc-otg-vbus-consumer";
#regulator-boot-on;
regulator-supplies = "vbus";
vbus-supply = <&vcc_otg_vbus>;
comment = "USB OTG power switch";
};
sysfs 挂钩确实出现了,但它缺少状态文件:
root# ls /sys/devices/platform/vcc_otg_vbus_switch/
driver_override modalias of_node power subsystem uevent
据我所见,驱动程序并没有从用户空间提供对调节器的更多控制,而不是调节器固定。我错过了什么吗?谢谢。
解决方案
驱动程序在上游,但未应用此处描述的补丁。
推荐阅读
- visual-studio - 如何转到下一个 HTML 属性?可视化代码快捷方式
- c# - 了解 LINQ 子查询
- xslt-2.0 - 使用 xslt2 搜索和替换 xml 错误
- linux-kernel - 在自定义 YOCTO 层中使用配置片段添加内核配置选项
- python - 容器与 python 请求的通信
- python-3.x - “Aufgabe”对象没有属性“beanworten”(Python 3.6)
- javascript - 如何在 Vue 中动态创建组件上获取更新的 $refs?
- javascript - 如何使用 DataTables、Ajax 调用和 Json 响应重新加载表数据?
- google-cloud-storage - 如何使用 gsutil 查找和复制?
- ruby - 有什么方法可以从 EC2 windows 实例连接到 VPN?