- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我有一 block 板,我正在为其修复/编写设备树,基于 rk3288 (rockchip)。在该文件中,目前有以下三个独立监管机构的定义:
dovdd_1v8: dovdd-1v8-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&dvp_pwr>;
regulator-name = "dovdd_1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_io>;
};
vcc28_dvp: vcc28-dvp-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&dvp_pwr>;
regulator-name = "vcc28_dvp";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
vin-supply = <&vcc_io>;
};
af_28: af_28-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&dvp_pwr>;
regulator-name = "af_28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
vin-supply = <&vcc_io>;
};
问题是内核提示它无法将相同的 GPIO 引脚分配给这 3 个调节器。在电路板原理图中,调节器由相同的 GPIO 引脚控制。
正确的做法是什么?
谢谢!B
编辑:这是我在串行控制台上看到的错误消息:
[ 0.270507] rockchip-pinctrl pinctrl: pin gpio0-11 already requested
by dovdd-1v8-regulator; cannot claim for vcc28-dvp-regulator
[ 0.270570] rockchip-pinctrl pinctrl: pin-11 (vcc28-dvp-regulator) status -22
[ 0.270611] rockchip-pinctrl pinctrl: could not request pin 11 (gpio0-11) from group dvp-pwr on device rockchip-pinctrl
[ 0.270663] reg-fixed-voltage vcc28-dvp-regulator: Error applying setting, reverse things back
最佳答案
稳压器子系统允许单个 GPIO 启用多个稳压器。
我在 fixed.c 中找不到代码或 core.c这将禁止多个监管机构共享一个启用 GPIO。
既然您已经添加了显着错误消息,问题就更清楚了。
您收到的错误消息不是来自 GPIO 资源管理,而是来自 pinctrl 子系统。
可能的原因是每个调节器的 pinctrl 组声明不正确。(您还没有发布设备树的那部分。)
因此你会得到一个 pinctrl 分配错误,这与 GPIO 分配错误不同。
(pinctrl 子系统处于比 GPIO 管理更低的级别,并且可以为外围功能分配引脚,也就是引脚多路复用,以及 GPIO。)
我不确定 DT 中的正确修复应该是什么。
假设只有一个 pinctrl 组为使能 GPIO 声明,您可以尝试在一个调节器节点中只使用一次。 IOW 删除其他两个调节器中的 pinctrl 属性。
关于linux - 在 linux devicetree (arm) 中定义 3 个由相同 GPIO 引脚控制的调节器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40037988/
我正在尝试为嵌入式系统创 build 备树,并想向用户空间公开一些 GPIO。这些不是也不应该被内核驱动程序使用。例如,有一个 USB 设备焊接到由用户空间驱动程序控制的板上。它有一个 GPIO 复位
对于我的C++ RTOS我正在使用 pyparsing 模块在 Python 中编写 devicetree“源”文件(.dts)的解析器。我能够将 devicetree 的结构解析为(嵌套)字典,其中
我想定义一个具有用户模式访问权限的 SPI 设备,例如在 http://linux-sunxi.org/SPIdev 中解释的 按照这些示例,我在设备树中添加了以下内容: &ecspi1 {
如果我从 shell 加载我自己的设备树覆盖层,它可以正常加载,但如果我尝试在启动时加载它,它就不会这样做。我错过了什么? 这是我使用bone-debian-7.4-2014-04-23-2gb.im
我想为文件系统编写 minifilter 驱动程序,我将代码编译到 .sys 文件中(没有错误),但安装后,我无法在 DbgView 中看到日志。但是过滤器可以在DeviceTree 程序中看到。请告
我正在尝试使用 DMA 对连接到 OMAP-L138 的 SPI 总线的 FPGA 进行编程,但没有成功。 目前,我正在使用 linux 3.19 附带的 davinci-spi 驱动程序 (driv
我有一 block 板,我正在为其修复/编写设备树,基于 rk3288 (rockchip)。在该文件中,目前有以下三个独立监管机构的定义: dovdd_1v8: dovdd-1v8-regu
我使用的是带有 Zynq XC72010 的定制开发板,用于运行 Linux 4.5 内核。我正在为我们正在内部测试的芯片开发设备驱动程序,我在尝试将 GPIO 线绑定(bind)到软件 IRQ 时遇
我是一名优秀的程序员,十分优秀!