Hi
I'm working with omap-l138. When switch on the device all LED are glowing. I need to access the user led from kernel so i have configured the /arch/arm/board-omapl138hwk.c and enabled the LED in kernel menu config.
//==========================LED init================
static struct gpio_led gpio_leds[] = {
{
.name = "User-D4",
.gpio = DA850_HAWK_USER_LED0, //GPIO_TO_PIN(1, 7), /* LED4 */
.default_trigger = "timer",
},
{
.name = "User-D3",
.gpio = DA850_HAWK_USER_LED1, //GPIO_TO_PIN(1, 6), /* LED3 */
.default_trigger = "heartbeat",
},
};
static struct gpio_led_platform_data gpio_led_info = {
.leds = gpio_leds,
.num_leds = ARRAY_SIZE(gpio_leds),
};
static struct platform_device leds_gpio = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &gpio_led_info,
},
};
static void gpio_led_init(void)
{
int err;
//setup_pin_mux(gpio_led_mux);
err = platform_device_register(&leds_gpio);
if (err)
pr_err("failed to register gpio led device\n");
}
//==========================LED init end============
static __init void omapl138_hawk_init(void)
{
int ret;
......
gpio_led_init();
......
}
and i boot the device. but there is no reaction in user led. and i've check the file system
root@omapl138-lcdk:/sys/class/leds# ls
there is no node inside the led.
I'm new to OMAP-l138 kernel source so i cant find the mux configuration clearly please let me know how to configure the mux for user led and what's mean by following representation ?
static const struct mux_config da850_pins[] = {
#ifdef CONFIG_DAVINCI_MUX
/* UART0 function */
MUX_CFG(DA850, NUART0_CTS, 3, 24, 15, 2, false)
MUX_CFG(DA850, NUART0_RTS, 3, 28, 15, 2, false)
MUX_CFG(DA850, UART0_RXD, 3, 16, 15, 2, false)
.......
MUX_CFG(DA850, GPIO6_13, 13, 8, 15, 8, false)
MUX_CFG(DA850, RTC_ALARM, 0, 28, 15, 2, false)
#endif
};
whats the description of 7 argument for MUX_CFG(x,x,x,x,x,x,x,) ?
Thanks
Sangly.