您尚未登录。

楼主 #1 2020-11-03 19:50:09

aodzip
会员
注册时间: 2019-10-15
已发帖子: 130
积分: 100

主线Linux驱动 16路GPIO+全端口中断扩展芯片 AW9523B 驱动尝鲜

I2C 16路GPIO复合全端口中断扩展芯片 AW9523B
给F1C100/200s扩展中断扩展GPIO,一拖16,对于低频率的外设中断挺管用的
https://item.szlcsc.com/159410.html
我觉得还蛮小蛮便宜的 4x4 TQFN 立创1000+:¥1.1954 / 个
测试Linux内核版本: Linux 5.4.73

&pio {
	aw9523b_pins: aw9523b-pins {
		pins = "PE10";
		function = "gpio_in";
		bias-pull-up;
	};
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pe_pins>;
	status = "okay";

	aw9523b: gpio-expander@5b {
		compatible = "awinic,aw9523b-gpio";
		reg = <0x5b>;
		pinctrl-names = "default";
		pinctrl-0 = <&aw9523b_pins>;
		interrupt-parent = <&pio>;
		interrupts = <4 10 IRQ_TYPE_EDGE_FALLING>;
		gpio-controller;
		#gpio-cells = <2>;
		interrupt-controller;
		#interrupt-cells = <2>;
		wakeup-source;
	};
};

aw9523b.zip

恒流LED部分的驱动?没有

最近编辑记录 aodzip (2020-11-03 19:56:49)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn