14 #include <linux/kernel.h>
15 #include <linux/list.h>
16 #include <linux/module.h>
27 static void led_set_software_blink(
struct led_classdev *led_cdev,
28 unsigned long delay_on,
29 unsigned long delay_off)
31 int current_brightness;
33 current_brightness = led_get_brightness(led_cdev);
34 if (current_brightness)
56 static void led_blink_setup(
struct led_classdev *led_cdev,
57 unsigned long *delay_on,
58 unsigned long *delay_off)
62 !led_cdev->
blink_set(led_cdev, delay_on, delay_off))
66 if (!*delay_on && !*delay_off)
67 *delay_on = *delay_off = 500;
69 led_set_software_blink(led_cdev, *delay_on, *delay_off);
73 unsigned long *delay_on,
74 unsigned long *delay_off)
81 led_blink_setup(led_cdev, delay_on, delay_off);
86 unsigned long *delay_on,
87 unsigned long *delay_off,
102 led_blink_setup(led_cdev, delay_on, delay_off);
124 __led_set_brightness(led_cdev, brightness);