Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.0-rc3 33 lines 884 B view raw
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 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");