firefly-rk3288 leds-gpio驱动设备树引脚计算方法
作者:互联网
firefly-rk3288 设备树引用GPIO引脚计算@TOC
例如: GPIO5_B4
GPIO5 BANK = 5
PIN计算: A=0 B=1 C=2 D=3
例如: B4 PIN = 1 * 8 + 4 = 12
gpionumber = BANK * 32 + PIN
gpionumber为 5 * 32 + 1 * 8 + 4 = 172
设备树中引用为:
gpios = <&(gpio label) PIN GPIO_ACTIVE_LOW>;
gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
以此类推.
标签:firefly,gpios,leds,PIN,GPIO5,gpionumber,引脚 来源: https://blog.csdn.net/qq_30898641/article/details/89515799