2008-04-25 03:06:52 +04:00
|
|
|
/*
|
|
|
|
* LED Kernel Default ON Trigger
|
|
|
|
*
|
|
|
|
* Copyright 2008 Nick Forbes <nick.forbes@incepta.com>
|
|
|
|
*
|
|
|
|
* Based on Richard Purdie's ledtrig-timer.c.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/leds.h>
|
2013-02-20 12:36:01 +04:00
|
|
|
#include "../leds.h"
|
2008-04-25 03:06:52 +04:00
|
|
|
|
2018-07-02 23:05:21 +03:00
|
|
|
static int defon_trig_activate(struct led_classdev *led_cdev)
|
2008-04-25 03:06:52 +04:00
|
|
|
{
|
2015-10-07 12:10:41 +03:00
|
|
|
led_set_brightness_nosleep(led_cdev, led_cdev->max_brightness);
|
2018-07-02 23:05:21 +03:00
|
|
|
return 0;
|
2008-04-25 03:06:52 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct led_trigger defon_led_trigger = {
|
|
|
|
.name = "default-on",
|
|
|
|
.activate = defon_trig_activate,
|
|
|
|
};
|
2018-07-02 23:05:31 +03:00
|
|
|
module_led_trigger(defon_led_trigger);
|
2008-04-25 03:06:52 +04:00
|
|
|
|
|
|
|
MODULE_AUTHOR("Nick Forbes <nick.forbes@incepta.com>");
|
|
|
|
MODULE_DESCRIPTION("Default-ON LED trigger");
|
2018-07-02 23:05:20 +03:00
|
|
|
MODULE_LICENSE("GPL v2");
|