16 #include <linux/slab.h>
17 #include <linux/module.h>
23 #define DELL_LED_BIOS_GUID "F6E4FE6E-909D-47cb-8BAB-C9F6F2F8D396"
27 #define INVALID_DEVICE_ID 250
28 #define INVALID_PARAMETER 251
29 #define INVALID_BUFFER 252
30 #define INTERFACE_ERROR 253
31 #define UNSUPPORTED_COMMAND 254
32 #define UNSPECIFIED_ERROR 255
35 #define DEVICE_ID_PANEL_BACK 1
39 #define CMD_LED_OFF 17
40 #define CMD_LED_BLINK 18
51 static int dell_led_perform_fn(
u8 length,
102 static int led_on(
void)
104 return dell_led_perform_fn(3,
112 static int led_off(
void)
114 return dell_led_perform_fn(3,
122 static int led_blink(
unsigned char on_eighths,
123 unsigned char off_eighths)
125 return dell_led_perform_fn(5,
142 static int dell_led_blink(
struct led_classdev *led_cdev,
143 unsigned long *delay_on,
144 unsigned long *delay_off)
146 unsigned long on_eighths;
147 unsigned long off_eighths;
152 on_eighths = (*delay_on + 124) / 125;
155 if (on_eighths > 255)
157 *delay_on = on_eighths * 125;
159 off_eighths = (*delay_off + 124) / 125;
160 if (0 == off_eighths)
162 if (off_eighths > 255)
164 *delay_off = off_eighths * 125;
175 .brightness_set = dell_led_set,
176 .blink_set = dell_led_blink,
180 static int __init dell_led_init(
void)
194 static void __exit dell_led_exit(
void)