LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 05-14-2012, 04: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, 02: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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 09:23 AM
Possible to change search timeout trigger? slakmagik LQ Suggestions & Feedback 0 08-13-2007 05:03 PM
LXer: BSP Marathon / BSP in Berlin (Germany) September 22-24 LXer Syndicated Linux News 0 09-06-2006 07:54 PM
LXer: BSP Marathon / BSP in =?iso-8859-1?Q?ich?= (Germany) 15.-17. September LXer Syndicated Linux News 0 08-23-2006 08:54 PM
How to write Device Driver to control LED? mcp_achindra Programming 1 04-01-2004 06:33 AM


All times are GMT -5. The time now is 10:53 PM.

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