Skip to content

Commit 56176cc

Browse files
committed
Support controlling red LED strips on side of FS67xx devices
It's those red strips on the left and right side of the power button. They're controlled by three GPIOs that are exposed as the new LEDs red:side_inner, red:side_mid and red:side_outer One of them was previously controlled by power:front_panel, but I changed it so it's more consistent with the other two LEDs (LED pairs?) of the strips
1 parent 9c9cc66 commit 56176cc

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ On many systems, ASUSTOR uses a mix of IT87 and CPU GPIOs to control leds and bu
3636
- AS6602T, AS6604T (NOT TESTED!)
3737
- AS6702T, AS6704T, AS6706T
3838
- AS5402T, AS5404T (NOT TESTED!)
39-
- FS6706T (NOT TESTED!), FS6712X
39+
- FS6706T, FS6712X
4040
- .. possibly more, if they're similar enough.
4141

4242
The following DMI system-manufacturer / system-product-name combinations are currently supported

asustor_main.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ static struct gpio_led asustor_leds[] = {
8383
DISK_ERR_LED("sata6"), // 20
8484
NVME_ACT_LED("nvme1"), // 21
8585
NVME_ERR_LED("nvme1"), // 22
86+
{ .name = "red:side_inner", .default_state = LEDS_GPIO_DEFSTATE_ON }, // 23
87+
{ .name = "red:side_mid", .default_state = LEDS_GPIO_DEFSTATE_ON }, // 24
88+
{ .name = "red:side_outer", .default_state = LEDS_GPIO_DEFSTATE_ON }, // 25
8689
};
8790

8891
static const struct gpio_led_platform_data asustor_leds_pdata = {
@@ -93,10 +96,8 @@ static const struct gpio_led_platform_data asustor_leds_pdata = {
9396
static struct gpiod_lookup_table asustor_fs6700_gpio_leds_lookup = {
9497
.dev_id = "leds-gpio",
9598
.table = {
96-
// Red LEDs to the left and right of the
97-
// power button on the side of the unit
98-
GPIO_LOOKUP_IDX(GPIO_IT87, 52, NULL, 0, GPIO_ACTIVE_LOW), // power:front_panel
99-
// 1
99+
// 0 - no front panel on this device
100+
// 1 - no LCD either
100101
// blue:power also controls the red LED
101102
// inside the power button on the side
102103
GPIO_LOOKUP_IDX(GPIO_IT87, 56, NULL, 2, GPIO_ACTIVE_LOW), // blue:power
@@ -109,6 +110,10 @@ static struct gpiod_lookup_table asustor_fs6700_gpio_leds_lookup = {
109110
// LEDs 9 - 20 don't exist in this system
110111
GPIO_LOOKUP_IDX(GPIO_IT87, 12, NULL, 21, GPIO_ACTIVE_LOW), // nvme1:green:disk
111112
GPIO_LOOKUP_IDX(GPIO_IT87, 13, NULL, 22, GPIO_ACTIVE_LOW), // nvme1:red:disk
113+
// red LED strip next to the power button on the side
114+
GPIO_LOOKUP_IDX(GPIO_IT87, 46, NULL, 23, GPIO_ACTIVE_LOW), // red:side_inner
115+
GPIO_LOOKUP_IDX(GPIO_IT87, 47, NULL, 24, GPIO_ACTIVE_LOW), // red:side_mid
116+
GPIO_LOOKUP_IDX(GPIO_IT87, 52, NULL, 25, GPIO_ACTIVE_LOW), // red:side_outer
112117
{}
113118
},
114119
};

0 commit comments

Comments
 (0)