我正在尝试在i.MX6板上连接两个GPIO LED(红色和蓝色)。两个LED连接到SOM上的GPIO5_16和GPIO5_15引脚(var-som-solo)。我加载了驱动程序并将其放在设备树中:
gpio-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_leds>;
red {
label = "Red";
gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "on";
};
blue {
label = "Blue";
gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "default-on";
default-state = "on";
};
};
LED未亮起。运行cat /sys/kernel/debug/gpio
会产生一些奇怪的问号:
gpio-143 (? ) out lo
gpio-144 (? ) out lo
我检查了驱动程序代码,似乎没有任何错误。如何让LED工作?