lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu,  4 Jul 2019 11:02:04 +0200
From:   Florian Eckert <fe@....tdt.de>
To:     Eckert.Florian@...glemail.com, info@...ux.net,
        dvhart@...radead.org, andy@...radead.org
Cc:     platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
        Florian Eckert <fe@....tdt.de>
Subject: [PATCH 2/3] platform/x86/pcengines-apuv2: add legacy leds gpio definitions

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@....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

Powered by blists - more mailing lists