blob: 7f6d9219711e675a632fab68948e809712bd836e [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/*
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
19static 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
25static struct led_trigger defon_led_trigger = {
26 .name = "default-on",
27 .activate = defon_trig_activate,
28};
29module_led_trigger(defon_led_trigger);
30
31MODULE_AUTHOR("Nick Forbes <nick.forbes@incepta.com>");
32MODULE_DESCRIPTION("Default-ON LED trigger");
33MODULE_LICENSE("GPL v2");