Extend the apu2_leds definition to make the leds exportable via the
legacy gpio subsystem. Without this change the leds are not visible
under "/sys/class/leds" and could not be configured.

Signed-off-by: Florian Eckert <f...@dev.tdt.de>
---
 drivers/platform/x86/pcengines-apuv2.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/pcengines-apuv2.c 
b/drivers/platform/x86/pcengines-apuv2.c
index f6d8ed100cab..d50a50e9d34c 100644
--- a/drivers/platform/x86/pcengines-apuv2.c
+++ b/drivers/platform/x86/pcengines-apuv2.c
@@ -75,9 +75,24 @@ static const struct amd_fch_gpio_pdata board_apu2 = {
 /* gpio leds device */
 
 static const struct gpio_led apu2_leds[] = {
-       { .name = "apu:green:1" },
-       { .name = "apu:green:2" },
-       { .name = "apu:green:3" }
+       {
+               .name            = "apu:green:1",
+               .gpio            = 505,
+               .default_trigger = "default-off",
+               .active_low      = 1,
+       },
+       {
+               .name            = "apu:green:2",
+               .gpio            = 506,
+               .default_trigger = "default-off",
+               .active_low      = 1,
+       },
+       {
+               .name            = "apu:green:3",
+               .gpio            = 507,
+               .default_trigger = "default-off",
+               .active_low      = 1,
+       }
 };
 
 static const struct gpio_led_platform_data apu2_leds_pdata = {
-- 
2.11.0

Reply via email to