lkml.org 
[lkml]   [2019]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] platform/x86/pcengines-apuv2: add legacy leds gpio definitions
Date
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 <fe@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
\
 
 \ /
  Last update: 2019-07-04 11:11    [W:0.251 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site