小白菜 说:1
内核版本linux-zero-4.13.y.zip
基于i2c的AXP203电源管理芯片
在设备书中添加
};
axp209: axp209@34{
reg = <0x34>;
interrupt-parent=;
interrupts=<1 2 IRQ_TYPE_EDGE_FALLING>;
/* focaltech,irq-gpio=;
focaltech,group-id=<1>;
focaltech,i2c-pull-up;*/
status="okay";
};
};
#include "axp209.dtsi"
&ohci0 {
这一段代表设备树中的i2c上的axp设备,其作用,是用于匹配内核中的AXP驱动,带有设备树的linux内核魅力所在
添加完之后接下来是linux内核的配置
执行make menuconfig
进入
Device Drivers --->
Industrial I/O support ---> 一种新的工业级iio文件,困扰了很久,axp的部分实现依赖于这个文件
Analog to digital converters --->
X-Powers AXP20X and AXP22X ADC driver 配置这个文件很有用途,因为我们使用的驱动就是依赖与此
然后返回到Device Drivers --->