18 #include <linux/kernel.h>
22 #include <linux/module.h>
23 #include <mach/hardware.h>
26 #define FSG_LED_WLAN_BIT 0
27 #define FSG_LED_WAN_BIT 1
28 #define FSG_LED_SATA_BIT 2
29 #define FSG_LED_USB_BIT 4
30 #define FSG_LED_RING_BIT 5
31 #define FSG_LED_SYNC_BIT 7
33 static short __iomem *latch_address;
34 static unsigned short latch_value;
37 static void fsg_led_wlan_set(
struct led_classdev *led_cdev,
42 *latch_address = latch_value;
45 *latch_address = latch_value;
49 static void fsg_led_wan_set(
struct led_classdev *led_cdev,
54 *latch_address = latch_value;
57 *latch_address = latch_value;
61 static void fsg_led_sata_set(
struct led_classdev *led_cdev,
66 *latch_address = latch_value;
69 *latch_address = latch_value;
73 static void fsg_led_usb_set(
struct led_classdev *led_cdev,
78 *latch_address = latch_value;
81 *latch_address = latch_value;
85 static void fsg_led_sync_set(
struct led_classdev *led_cdev,
90 *latch_address = latch_value;
93 *latch_address = latch_value;
97 static void fsg_led_ring_set(
struct led_classdev *led_cdev,
102 *latch_address = latch_value;
105 *latch_address = latch_value;
111 .name =
"fsg:blue:wlan",
112 .brightness_set = fsg_led_wlan_set,
117 .name =
"fsg:blue:wan",
118 .brightness_set = fsg_led_wan_set,
123 .name =
"fsg:blue:sata",
124 .brightness_set = fsg_led_sata_set,
129 .name =
"fsg:blue:usb",
130 .brightness_set = fsg_led_usb_set,
135 .name =
"fsg:blue:sync",
136 .brightness_set = fsg_led_sync_set,
141 .name =
"fsg:blue:ring",
142 .brightness_set = fsg_led_ring_set,
153 if (!latch_address) {
158 latch_value = 0xffff;
159 *latch_address = latch_value;
220 .probe = fsg_led_probe,
221 .remove = fsg_led_remove,