我在你们board-mx6q_sabresd.c文件中
#if defined(CONFIG_LEDS_TRIGGER) || defined(CONFIG_LEDS_GPIO)
static struct gpio_led imx6q_gpio_leds[] = {
GPIO_LED(SABRESD_CHARGE_NOW, "chg_now_led", 0, 1,
"charger-charging"),
GPIO_LED(LED_TEST, "my_led", 0, 1,
"led"),
};
static struct gpio_led_platform_data imx6q_gpio_leds_data = {
.leds = imx6q_gpio_leds,
.num_leds = ARRAY_SIZE(imx6q_gpio_leds),
};
static struct platform_device imx6q_gpio_led_device = {
.name = "leds-gpio",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &imx6q_gpio_leds_data,
}
};
static void __init imx6q_add_device_gpio_leds(void)
{
//if (!uart5_enabled)
platform_device_register(&imx6q_gpio_led_device);
}
#else
static void __init imx6q_add_device_gpio_leds(void) {
platform_device_register(&imx6q_gpio_led_device);
}
#endif
我屏蔽了这一行if(!uart5_eabled),这样就给设备注册到驱动上了,
但是我编译完成了,通过超级终端/sys/class/leds/没有创建的文件,是个空的文件目录,希望飞思卡尔能给说明这是什么问题?
我把你们给的软件包里面的kconfig和Makefile 包括默认文件都看了,没有找出问题,KCONFIG里面是直接编译到内核,menconfig里面没有这个选项leds-gpio,menuconfig默认就选择LED Class Support 和LED Support 选择 LED Support for GPIO connected LEDs 和 Platform device bindings for GPIO LEDs LED Trigger support ,为什么编译后的文件下载到开发板上/sys/class/leds/没有创建的文件呢? |
|