linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs
@ 2024-04-23 13:53 Linus Walleij
  2024-04-23 13:53 ` [PATCH 1/5] ARM: orion5x: Convert D2Net board to GPIO descriptors " Linus Walleij
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Linus Walleij @ 2024-04-23 13:53 UTC (permalink / raw)
  To: Andrew Lunn, Sebastian Hesselbarth, Gregory Clement
  Cc: linux-arm-kernel, linux-gpio, Linus Walleij

Fix up the orion boards to use GPIO descriptor tables
instead of hardcoded GPIO numbers in all board files.

git grep 'struct gpio_led_platform_data' gives a list of
suspects. We wade through them and root out the use of
global GPIO numbers in favor of descriptors.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Linus Walleij (5):
      ARM: orion5x: Convert D2Net board to GPIO descriptors for LEDs
      ARM: orion5x: Convert DNS323 board to GPIO descriptors for LEDs
      ARM: orion5x: Convert MV2120 board to GPIO descriptors for LEDs
      ARM: orion5x: Convert Net2big board to GPIO descriptors for LEDs
      ARM: orion5x: Convert TS409 board to GPIO descriptors for LEDs

 arch/arm/mach-orion5x/board-d2net.c   | 16 +++++++--
 arch/arm/mach-orion5x/dns323-setup.c  | 63 ++++++++++++++++++++++++++---------
 arch/arm/mach-orion5x/mv2120-setup.c  | 29 +++++++++++-----
 arch/arm/mach-orion5x/net2big-setup.c | 21 +++++++++---
 arch/arm/mach-orion5x/ts409-setup.c   | 25 +++++++++-----
 5 files changed, 116 insertions(+), 38 deletions(-)
---
base-commit: 4cece764965020c22cff7665b18a012006359095
change-id: 20240423-gpio-leds-9d584c9a8659

Best regards,
-- 
Linus Walleij <linus.walleij@linaro.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] ARM: orion5x: Convert D2Net board to GPIO descriptors for LEDs
  2024-04-23 13:53 [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs Linus Walleij
@ 2024-04-23 13:53 ` Linus Walleij
  2024-04-23 13:53 ` [PATCH 2/5] ARM: orion5x: Convert DNS323 " Linus Walleij
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2024-04-23 13:53 UTC (permalink / raw)
  To: Andrew Lunn, Sebastian Hesselbarth, Gregory Clement
  Cc: linux-arm-kernel, linux-gpio, Linus Walleij

This makes the LEDs on the D2Net Orion5x board use GPIO
descriptors instead of hardcoded GPIOs from the global
numberspace.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-orion5x/board-d2net.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-orion5x/board-d2net.c b/arch/arm/mach-orion5x/board-d2net.c
index 0297e302d7bc..09bf366d05ff 100644
--- a/arch/arm/mach-orion5x/board-d2net.c
+++ b/arch/arm/mach-orion5x/board-d2net.c
@@ -14,6 +14,7 @@
 #include <linux/irq.h>
 #include <linux/leds.h>
 #include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
@@ -55,12 +56,9 @@ static struct gpio_led d2net_leds[] = {
 	{
 		.name = "d2net:blue:sata",
 		.default_trigger = "default-on",
-		.gpio = D2NET_GPIO_BLUE_LED_OFF,
-		.active_low = 1,
 	},
 	{
 		.name = "d2net:red:fail",
-		.gpio = D2NET_GPIO_RED_LED,
 	},
 };
 
@@ -77,6 +75,17 @@ static struct platform_device d2net_gpio_leds = {
 	},
 };
 
+static struct gpiod_lookup_table d2net_leds_gpio_table = {
+	.dev_id = "leds-gpio",
+	.table = {
+		GPIO_LOOKUP_IDX("orion_gpio0", D2NET_GPIO_BLUE_LED_OFF, NULL,
+				0, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", D2NET_GPIO_RED_LED, NULL,
+				1, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
 static void __init d2net_gpio_leds_init(void)
 {
 	int err;
@@ -91,6 +100,7 @@ static void __init d2net_gpio_leds_init(void)
 	if (err)
 		pr_err("d2net: failed to configure blue LED blink GPIO\n");
 
+	gpiod_add_lookup_table(&d2net_leds_gpio_table);
 	platform_device_register(&d2net_gpio_leds);
 }
 

-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] ARM: orion5x: Convert DNS323 board to GPIO descriptors for LEDs
  2024-04-23 13:53 [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs Linus Walleij
  2024-04-23 13:53 ` [PATCH 1/5] ARM: orion5x: Convert D2Net board to GPIO descriptors " Linus Walleij
@ 2024-04-23 13:53 ` Linus Walleij
  2024-04-23 13:53 ` [PATCH 3/5] ARM: orion5x: Convert MV2120 " Linus Walleij
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2024-04-23 13:53 UTC (permalink / raw)
  To: Andrew Lunn, Sebastian Hesselbarth, Gregory Clement
  Cc: linux-arm-kernel, linux-gpio, Linus Walleij

This makes the LEDs on the D-Link DNS323 Orion5x board use GPIO
descriptors instead of hardcoded GPIOs from the global
numberspace.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-orion5x/dns323-setup.c | 63 +++++++++++++++++++++++++++---------
 1 file changed, 48 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index d69259b6b60d..062109efa0ec 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -14,6 +14,7 @@
  *
  */
 #include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/delay.h>
@@ -254,37 +255,64 @@ static int __init dns323_read_mac_addr(void)
 static struct gpio_led dns323ab_leds[] = {
 	{
 		.name = "power:blue",
-		.gpio = DNS323_GPIO_LED_POWER2,
 		.default_trigger = "default-on",
 	}, {
 		.name = "right:amber",
-		.gpio = DNS323_GPIO_LED_RIGHT_AMBER,
-		.active_low = 1,
 	}, {
 		.name = "left:amber",
-		.gpio = DNS323_GPIO_LED_LEFT_AMBER,
-		.active_low = 1,
 	},
 };
 
+static struct gpiod_lookup_table dns323a1_leds_gpio_table = {
+	.dev_id = "leds-gpio",
+	.table = {
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323_GPIO_LED_POWER2, NULL,
+				0, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323_GPIO_LED_RIGHT_AMBER, NULL,
+				1, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323_GPIO_LED_LEFT_AMBER, NULL,
+				2, GPIO_ACTIVE_LOW),
+		{ },
+	},
+};
+
+/* B1 is the same but power LED is active high */
+static struct gpiod_lookup_table dns323b1_leds_gpio_table = {
+	.dev_id = "leds-gpio",
+	.table = {
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323_GPIO_LED_POWER2, NULL,
+				0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323_GPIO_LED_RIGHT_AMBER, NULL,
+				1, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323_GPIO_LED_LEFT_AMBER, NULL,
+				2, GPIO_ACTIVE_LOW),
+		{ },
+	},
+};
 
 static struct gpio_led dns323c_leds[] = {
 	{
 		.name = "power:blue",
-		.gpio = DNS323C_GPIO_LED_POWER,
 		.default_trigger = "timer",
-		.active_low = 1,
 	}, {
 		.name = "right:amber",
-		.gpio = DNS323C_GPIO_LED_RIGHT_AMBER,
-		.active_low = 1,
 	}, {
 		.name = "left:amber",
-		.gpio = DNS323C_GPIO_LED_LEFT_AMBER,
-		.active_low = 1,
 	},
 };
 
+static struct gpiod_lookup_table dns323c_leds_gpio_table = {
+	.dev_id = "leds-gpio",
+	.table = {
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323C_GPIO_LED_POWER, NULL,
+				0, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323C_GPIO_LED_RIGHT_AMBER, NULL,
+				1, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", DNS323C_GPIO_LED_LEFT_AMBER, NULL,
+				2, GPIO_ACTIVE_LOW),
+		{ },
+	},
+};
 
 static struct gpio_led_platform_data dns323ab_led_data = {
 	.num_leds	= ARRAY_SIZE(dns323ab_leds),
@@ -621,16 +649,21 @@ static void __init dns323_init(void)
 		/* The 5181 power LED is active low and requires
 		 * DNS323_GPIO_LED_POWER1 to also be low.
 		 */
-		 dns323ab_leds[0].active_low = 1;
-		 gpio_request(DNS323_GPIO_LED_POWER1, "Power Led Enable");
-		 gpio_direction_output(DNS323_GPIO_LED_POWER1, 0);
-		fallthrough;
+		gpiod_add_lookup_table(&dns323a1_leds_gpio_table);
+		gpio_request(DNS323_GPIO_LED_POWER1, "Power Led Enable");
+		gpio_direction_output(DNS323_GPIO_LED_POWER1, 0);
+		i2c_register_board_info(0, dns323ab_i2c_devices,
+					ARRAY_SIZE(dns323ab_i2c_devices));
+
+		break;
 	case DNS323_REV_B1:
+		gpiod_add_lookup_table(&dns323b1_leds_gpio_table);
 		i2c_register_board_info(0, dns323ab_i2c_devices,
 				ARRAY_SIZE(dns323ab_i2c_devices));
 		break;
 	case DNS323_REV_C1:
 		/* Hookup LEDs & Buttons */
+		gpiod_add_lookup_table(&dns323c_leds_gpio_table);
 		dns323_gpio_leds.dev.platform_data = &dns323c_led_data;
 		dns323_button_device.dev.platform_data = &dns323c_button_data;
 

-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] ARM: orion5x: Convert MV2120 board to GPIO descriptors for LEDs
  2024-04-23 13:53 [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs Linus Walleij
  2024-04-23 13:53 ` [PATCH 1/5] ARM: orion5x: Convert D2Net board to GPIO descriptors " Linus Walleij
  2024-04-23 13:53 ` [PATCH 2/5] ARM: orion5x: Convert DNS323 " Linus Walleij
@ 2024-04-23 13:53 ` Linus Walleij
  2024-04-23 13:54 ` [PATCH 4/5] ARM: orion5x: Convert Net2big " Linus Walleij
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2024-04-23 13:53 UTC (permalink / raw)
  To: Andrew Lunn, Sebastian Hesselbarth, Gregory Clement
  Cc: linux-arm-kernel, linux-gpio, Linus Walleij

This makes the LEDs on the MV2120 Orion5x board use GPIO
descriptors instead of hardcoded GPIOs from the global
numberspace.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-orion5x/mv2120-setup.c | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
index 2bf8ec75e908..b7327a612835 100644
--- a/arch/arm/mach-orion5x/mv2120-setup.c
+++ b/arch/arm/mach-orion5x/mv2120-setup.c
@@ -8,6 +8,7 @@
  * License, or (at your option) any later version.
  */
 #include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
@@ -139,34 +140,45 @@ static struct i2c_board_info __initdata mv2120_i2c_rtc = {
 static struct gpio_led mv2120_led_pins[] = {
 	{
 		.name			= "mv2120:blue:health",
-		.gpio			= 0,
 	},
 	{
 		.name			= "mv2120:red:health",
-		.gpio			= 1,
 	},
 	{
 		.name			= "mv2120:led:bright",
-		.gpio			= 4,
 		.default_trigger	= "default-on",
 	},
 	{
 		.name			= "mv2120:led:dimmed",
-		.gpio			= 5,
 	},
 	{
 		.name			= "mv2120:red:sata0",
-		.gpio			= 8,
-		.active_low		= 1,
 	},
 	{
 		.name			= "mv2120:red:sata1",
-		.gpio			= 9,
-		.active_low		= 1,
 	},
 
 };
 
+static struct gpiod_lookup_table mv2120_leds_gpio_table = {
+	.dev_id = "leds-gpio",
+	.table = {
+		GPIO_LOOKUP_IDX("orion_gpio0", 0, NULL,
+				0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", 1, NULL,
+				1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", 4, NULL,
+				2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", 5, NULL,
+				3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", 8, NULL,
+				4, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", 9, NULL,
+				5, GPIO_ACTIVE_LOW),
+		{ },
+	},
+};
+
 static struct gpio_led_platform_data mv2120_led_data = {
 	.leds		= mv2120_led_pins,
 	.num_leds	= ARRAY_SIZE(mv2120_led_pins),
@@ -219,6 +231,7 @@ static void __init mv2120_init(void)
 			gpio_free(MV2120_GPIO_RTC_IRQ);
 	}
 	i2c_register_board_info(0, &mv2120_i2c_rtc, 1);
+	gpiod_add_lookup_table(&mv2120_leds_gpio_table);
 	platform_device_register(&mv2120_leds);
 
 	/* register mv2120 specific power-off method */

-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] ARM: orion5x: Convert Net2big board to GPIO descriptors for LEDs
  2024-04-23 13:53 [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs Linus Walleij
                   ` (2 preceding siblings ...)
  2024-04-23 13:53 ` [PATCH 3/5] ARM: orion5x: Convert MV2120 " Linus Walleij
@ 2024-04-23 13:54 ` Linus Walleij
  2024-04-23 13:54 ` [PATCH 5/5] ARM: orion5x: Convert TS409 " Linus Walleij
  2024-05-05 16:19 ` [PATCH 0/5] Decrease the usage of global GPIO numbers " Gregory CLEMENT
  5 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2024-04-23 13:54 UTC (permalink / raw)
  To: Andrew Lunn, Sebastian Hesselbarth, Gregory Clement
  Cc: linux-arm-kernel, linux-gpio, Linus Walleij

This makes the LEDs on the Net2big Orion5x board use GPIO
descriptors instead of hardcoded GPIOs from the global
numberspace.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-orion5x/net2big-setup.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c
index 695cc683cd83..6ad9740b426b 100644
--- a/arch/arm/mach-orion5x/net2big-setup.c
+++ b/arch/arm/mach-orion5x/net2big-setup.c
@@ -18,6 +18,7 @@
 #include <linux/i2c.h>
 #include <linux/ata_platform.h>
 #include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <linux/delay.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -214,19 +215,30 @@ static void __init net2big_sata_power_init(void)
 static struct gpio_led net2big_leds[] = {
 	{
 		.name = "net2big:red:power",
-		.gpio = NET2BIG_GPIO_PWR_RED_LED,
 	},
 	{
 		.name = "net2big:blue:power",
-		.gpio = NET2BIG_GPIO_PWR_BLUE_LED,
 	},
 	{
 		.name = "net2big:red:sata0",
-		.gpio = NET2BIG_GPIO_SATA0_RED_LED,
 	},
 	{
 		.name = "net2big:red:sata1",
-		.gpio = NET2BIG_GPIO_SATA1_RED_LED,
+	},
+};
+
+static struct gpiod_lookup_table net2big_leds_gpio_table = {
+	.dev_id = "leds-gpio",
+	.table = {
+		GPIO_LOOKUP_IDX("orion_gpio0", NET2BIG_GPIO_PWR_RED_LED, NULL,
+				0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", NET2BIG_GPIO_PWR_BLUE_LED, NULL,
+				1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", NET2BIG_GPIO_SATA0_RED_LED, NULL,
+				2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("orion_gpio0", NET2BIG_GPIO_SATA1_RED_LED, NULL,
+				3, GPIO_ACTIVE_HIGH),
+		{ },
 	},
 };
 
@@ -282,6 +294,7 @@ static void __init net2big_gpio_leds_init(void)
 	if (err)
 		pr_err("net2big: failed to setup SATA1 blue LED GPIO\n");
 
+	gpiod_add_lookup_table(&net2big_leds_gpio_table);
 	platform_device_register(&net2big_gpio_leds);
 }
 

-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] ARM: orion5x: Convert TS409 board to GPIO descriptors for LEDs
  2024-04-23 13:53 [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs Linus Walleij
                   ` (3 preceding siblings ...)
  2024-04-23 13:54 ` [PATCH 4/5] ARM: orion5x: Convert Net2big " Linus Walleij
@ 2024-04-23 13:54 ` Linus Walleij
  2024-05-05 16:19 ` [PATCH 0/5] Decrease the usage of global GPIO numbers " Gregory CLEMENT
  5 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2024-04-23 13:54 UTC (permalink / raw)
  To: Andrew Lunn, Sebastian Hesselbarth, Gregory Clement
  Cc: linux-arm-kernel, linux-gpio, Linus Walleij

This makes the LEDs on the TS409 Orion5x board use GPIO
descriptors instead of hardcoded GPIOs from the global
numberspace.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-orion5x/ts409-setup.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
index 6f60dc1dfa22..8131982c10d9 100644
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -8,6 +8,7 @@
  * Copyright (C) 2008  Martin Michlmayr <tbm@cyrius.com>
  */
 #include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
@@ -168,20 +169,27 @@ static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = {
 static struct gpio_led ts409_led_pins[] = {
 	{
 		.name		= "ts409:red:sata1",
-		.gpio		= 4,
-		.active_low	= 1,
 	}, {
 		.name		= "ts409:red:sata2",
-		.gpio		= 5,
-		.active_low	= 1,
 	}, {
 		.name		= "ts409:red:sata3",
-		.gpio		= 6,
-		.active_low	= 1,
 	}, {
 		.name		= "ts409:red:sata4",
-		.gpio		= 7,
-		.active_low	= 1,
+	},
+};
+
+static struct gpiod_lookup_table ts409_leds_gpio_table = {
+	.dev_id = "leds-gpio",
+	.table = {
+		GPIO_LOOKUP_IDX("orion_gpio0", 4, NULL,
+				0, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", 5, NULL,
+				1, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", 6, NULL,
+				2, GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP_IDX("orion_gpio0", 7, NULL,
+				3, GPIO_ACTIVE_LOW),
+		{ },
 	},
 };
 
@@ -300,6 +308,7 @@ static void __init qnap_ts409_init(void)
 	if (qnap_ts409_i2c_rtc.irq == 0)
 		pr_warn("qnap_ts409_init: failed to get RTC IRQ\n");
 	i2c_register_board_info(0, &qnap_ts409_i2c_rtc, 1);
+	gpiod_add_lookup_table(&ts409_leds_gpio_table);
 	platform_device_register(&ts409_leds);
 
 	/* register tsx09 specific power-off method */

-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs
  2024-04-23 13:53 [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs Linus Walleij
                   ` (4 preceding siblings ...)
  2024-04-23 13:54 ` [PATCH 5/5] ARM: orion5x: Convert TS409 " Linus Walleij
@ 2024-05-05 16:19 ` Gregory CLEMENT
  5 siblings, 0 replies; 7+ messages in thread
From: Gregory CLEMENT @ 2024-05-05 16:19 UTC (permalink / raw)
  To: Linus Walleij, Andrew Lunn, Sebastian Hesselbarth
  Cc: linux-arm-kernel, linux-gpio, Linus Walleij

Linus Walleij <linus.walleij@linaro.org> writes:

> Fix up the orion boards to use GPIO descriptor tables
> instead of hardcoded GPIO numbers in all board files.
>
> git grep 'struct gpio_led_platform_data' gives a list of
> suspects. We wade through them and root out the use of
> global GPIO numbers in favor of descriptors.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

All patches applied on mvebu/arm

Thanks,

Gregory
> ---
> Linus Walleij (5):
>       ARM: orion5x: Convert D2Net board to GPIO descriptors for LEDs
>       ARM: orion5x: Convert DNS323 board to GPIO descriptors for LEDs
>       ARM: orion5x: Convert MV2120 board to GPIO descriptors for LEDs
>       ARM: orion5x: Convert Net2big board to GPIO descriptors for LEDs
>       ARM: orion5x: Convert TS409 board to GPIO descriptors for LEDs
>
>  arch/arm/mach-orion5x/board-d2net.c   | 16 +++++++--
>  arch/arm/mach-orion5x/dns323-setup.c  | 63 ++++++++++++++++++++++++++---------
>  arch/arm/mach-orion5x/mv2120-setup.c  | 29 +++++++++++-----
>  arch/arm/mach-orion5x/net2big-setup.c | 21 +++++++++---
>  arch/arm/mach-orion5x/ts409-setup.c   | 25 +++++++++-----
>  5 files changed, 116 insertions(+), 38 deletions(-)
> ---
> base-commit: 4cece764965020c22cff7665b18a012006359095
> change-id: 20240423-gpio-leds-9d584c9a8659
>
> Best regards,
> -- 
> Linus Walleij <linus.walleij@linaro.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-05 16:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23 13:53 [PATCH 0/5] Decrease the usage of global GPIO numbers for LEDs Linus Walleij
2024-04-23 13:53 ` [PATCH 1/5] ARM: orion5x: Convert D2Net board to GPIO descriptors " Linus Walleij
2024-04-23 13:53 ` [PATCH 2/5] ARM: orion5x: Convert DNS323 " Linus Walleij
2024-04-23 13:53 ` [PATCH 3/5] ARM: orion5x: Convert MV2120 " Linus Walleij
2024-04-23 13:54 ` [PATCH 4/5] ARM: orion5x: Convert Net2big " Linus Walleij
2024-04-23 13:54 ` [PATCH 5/5] ARM: orion5x: Convert TS409 " Linus Walleij
2024-05-05 16:19 ` [PATCH 0/5] Decrease the usage of global GPIO numbers " Gregory CLEMENT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).