Skip to content

Commit 41ee0a2

Browse files
committed
Small improvements to LED table comments
1 parent 0a77a0a commit 41ee0a2

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

asustor.c

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,25 @@
4646
.default_state = LEDS_GPIO_DEFSTATE_OFF \
4747
}
4848

49+
// clang-format off
50+
4951
// ASUSTOR Leds.
5052
// If ledtrig-blkdev ever lands, use that instead of disk-activity:
5153
// https://lore.kernel.org/linux-leds/20210819025053.222710-1-arequipeno@gmail.com/
54+
// Also, the "disk-activity" trigger does (currently?) *not* trigger for NVME devices.
5255
static struct gpio_led asustor_leds[] = {
53-
{ .name = "power:front_panel",
54-
.default_state = LEDS_GPIO_DEFSTATE_ON }, // 0
56+
{ .name = "power:front_panel", // 0
57+
.default_state = LEDS_GPIO_DEFSTATE_ON },
5558
{ .name = "power:lcd", .default_state = LEDS_GPIO_DEFSTATE_ON }, // 1
5659
{ .name = "blue:power", .default_state = LEDS_GPIO_DEFSTATE_ON }, // 2
5760
{ .name = "red:power", .default_state = LEDS_GPIO_DEFSTATE_OFF }, // 3
5861
{ .name = "green:status", .default_state = LEDS_GPIO_DEFSTATE_ON }, // 4
5962
{
60-
.name = "red:status",
63+
.name = "red:status", // 5
6164
.default_state = LEDS_GPIO_DEFSTATE_OFF,
6265
.panic_indicator = 1,
6366
.default_trigger = "panic",
64-
}, // 5
67+
},
6568
{ .name = "blue:usb", .default_state = LEDS_GPIO_DEFSTATE_OFF }, // 6
6669
{ .name = "green:usb", .default_state = LEDS_GPIO_DEFSTATE_OFF }, // 7
6770
{ .name = "blue:lan", .default_state = LEDS_GPIO_DEFSTATE_ON }, // 8
@@ -86,7 +89,6 @@ static const struct gpio_led_platform_data asustor_leds_pdata = {
8689
.num_leds = ARRAY_SIZE(asustor_leds),
8790
};
8891

89-
// clang-format off
9092
static struct gpiod_lookup_table asustor_fs6700_gpio_leds_lookup = {
9193
.dev_id = "leds-gpio",
9294
.table = {
@@ -103,18 +105,7 @@ static struct gpiod_lookup_table asustor_fs6700_gpio_leds_lookup = {
103105
// 6
104106
// 7
105107
GPIO_LOOKUP_IDX(GPIO_IT87, 55, NULL, 8, GPIO_ACTIVE_HIGH), // blue:lan
106-
// 9
107-
// 10
108-
// 11
109-
// 12
110-
// 13
111-
// 14
112-
// 15
113-
// 16
114-
// 17
115-
// 18
116-
// 19
117-
// 20
108+
// LEDs 9 - 20 don't exist in this system
118109
GPIO_LOOKUP_IDX(GPIO_IT87, 12, NULL, 21, GPIO_ACTIVE_LOW), // nvme1:green:disk
119110
GPIO_LOOKUP_IDX(GPIO_IT87, 13, NULL, 22, GPIO_ACTIVE_LOW), // nvme1:red:disk
120111
{}

0 commit comments

Comments
 (0)