|
按照wiki的ADC设置流程,无法出现/proc下文件节点。急急急
发表于 2020-7-6 17:18:51
浏览:6503
|
回复:2
打印
只看该作者
[复制链接]
楼主
rk3288.dtsi 文件配置 如下:saradc: saradc@ff100000 {
compatible = "rockchip,saradc";
reg = <0x0 0xff100000 0x0 0x100>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
#io-channel-cells = <1>;
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
clock-names = "saradc", "apb_pclk";
resets = <&cru SRST_SARADC>;
reset-names = "saradc-apb";
status = "disabled";
};
rk3288-firefly.dts文件配置如下:
&saradc {
status = "okay";
test-adc0{
compatible = "rockchip,test-adc0";
io-channels = <&saradc 0>;
};
};
驱动代码:kernel/drivers/iio/adc/rockchip_saradc.c中match函数也加上了匹配
static const struct of_device_id rockchip_saradc_match[] = {
{
.compatible = "rockchip,saradc",
.data = &saradc_data,
}, {
.compatible = "rockchip,rk3066-tsadc",
.data = &rk3066_tsadc_data,
}, {
.compatible = "rockchip,rk3399-saradc",
.data = &rk3399_saradc_data,
},{
.compatible = "rockchip,test-adc0",
},
{},
};
另外,按照http://dev.t-firefly.com/thread-5529-1-9.html说明也无法在proc下参数文件节点,导致无法测试。
不知道哪里出了问题,请技术大牛帮忙解答。在线等
|
|