1 /*
2  * LED Kernel Default ON Trigger
3  *
4  * Copyright 2008 Nick Forbes <nick.forbes@incepta.com>
5  *
6  * Based on Richard Purdie's ledtrig-timer.c.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  */
12 
13 #include <linux/module.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/leds.h>
17 #include "../leds.h"
18 
19 static int defon_trig_activate(struct led_classdev *led_cdev)
20 {
21 	led_set_brightness_nosleep(led_cdev, led_cdev->max_brightness);
22 	return 0;
23 }
24 
25 static struct led_trigger defon_led_trigger = {
26 	.name     = "default-on",
27 	.activate = defon_trig_activate,
28 };
29 module_led_trigger(defon_led_trigger);
30 
31 MODULE_AUTHOR("Nick Forbes <nick.forbes@incepta.com>");
32 MODULE_DESCRIPTION("Default-ON LED trigger");
33 MODULE_LICENSE("GPL v2");
34