LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 05-14-2012, 05:30 AM   #1
swmail
LQ Newbie
 
Registered: May 2012
Posts: 2

Rep: Reputation: Disabled
How to change trigger in BSP for LED device


Hi!
I have register in BSP's driver a LED
Code:
static struct gpio_led ic_leds[] = {
        {
                .name                   = "led1:green",
                .gpio                   = USER_LED,
                .default_trigger        = "heartbeat",
                .active_low             = 1,
        },
};

static struct gpio_led_platform_data ic_led_info = {
        .num_leds       = ARRAY_SIZE(ic_leds),
        .leds           = ic_leds,
};

static struct platform_device ic_leds_device = {
        .name   = "leds-gpio",
        .id     = -1,
        .dev    = {
                .platform_data = &ic_led_info,
        },
};

static void __init ic_add_device_leds(void)
{
        platform_device_register(&ic_leds_device);
}
How can I change the trigger in run time?
 
Old 05-30-2012, 03:40 AM   #2
swmail
LQ Newbie
 
Registered: May 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
I know that it's possible with sysfs, but maybe exist another way?
 
  


Reply

Tags
kernel, led, linux, trigger


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
udev/udevadm trigger led to disks being unable to spin down for more than a second exscape Linux - Kernel 0 01-03-2010 10:23 AM
Possible to change search timeout trigger? slakmagik LQ Suggestions & Feedback 0 08-13-2007 06:03 PM
LXer: BSP Marathon / BSP in Berlin (Germany) September 22-24 LXer Syndicated Linux News 0 09-06-2006 08:54 PM
LXer: BSP Marathon / BSP in =?iso-8859-1?Q?ich?= (Germany) 15.-17. September LXer Syndicated Linux News 0 08-23-2006 09:54 PM
How to write Device Driver to control LED? mcp_achindra Programming 1 04-01-2004 07:33 AM


All times are GMT -5. The time now is 11:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration