* [PATCH v2] ARM: OMAP1: Move h2 LEDs to GPIO lookup table
@ 2023-01-11 13:24 Linus Walleij
2023-01-19 9:58 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2023-01-11 13:24 UTC (permalink / raw)
To: Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren
Cc: linux-omap, Linus Walleij, Maciej Falkowski
This converts the the H2 GPIO LEDs to use a machine lookup
table.
Cc: Tony Lindgren <tony@atomide.com>
Cc: Maciej Falkowski <maciej.falkowski9@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Rebased on v6.2-rc1
- I suppose Tony picks this up?
---
arch/arm/mach-omap1/board-h2.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index f28a4c3ea501..9301a5fca44e 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -47,6 +47,7 @@
/* The first 16 SoC GPIO lines are on this GPIO chip */
#define OMAP_GPIO_LABEL "gpio-0-15"
+#define OMAP_MPUIO_LABEL "mpuio"
/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
#define OMAP1610_ETHR_START 0x04000300
@@ -276,12 +277,10 @@ static const struct gpio_led h2_gpio_led_pins[] = {
{
.name = "h2:red",
.default_trigger = "heartbeat",
- .gpio = 3,
},
{
.name = "h2:green",
.default_trigger = "cpu0",
- .gpio = OMAP_MPUIO(4),
},
};
@@ -290,6 +289,14 @@ static struct gpio_led_platform_data h2_gpio_led_data = {
.num_leds = ARRAY_SIZE(h2_gpio_led_pins),
};
+static struct gpiod_lookup_table h2_leds_gpio_table = {
+ .table = {
+ GPIO_LOOKUP_IDX(OMAP_GPIO_LABEL, 3, NULL, 0, 0),
+ GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 4, NULL, 1, 0),
+ { },
+ },
+};
+
static struct platform_device h2_gpio_leds = {
.name = "leds-gpio",
.id = -1,
@@ -417,6 +424,7 @@ static void __init h2_init(void)
/* GPIO based LEDs */
omap_cfg_reg(P18_1610_GPIO3);
omap_cfg_reg(MPUIO4);
+ gpiod_add_lookup_table(&h2_leds_gpio_table);
h2_smc91x_resources[1].start = gpio_to_irq(0);
h2_smc91x_resources[1].end = gpio_to_irq(0);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ARM: OMAP1: Move h2 LEDs to GPIO lookup table
2023-01-11 13:24 [PATCH v2] ARM: OMAP1: Move h2 LEDs to GPIO lookup table Linus Walleij
@ 2023-01-19 9:58 ` Tony Lindgren
2023-01-19 10:02 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2023-01-19 9:58 UTC (permalink / raw)
To: Linus Walleij
Cc: Aaro Koskinen, Janusz Krzysztofik, linux-omap, Maciej Falkowski
* Linus Walleij <linus.walleij@linaro.org> [230111 15:24]:
> This converts the the H2 GPIO LEDs to use a machine lookup
> table.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Maciej Falkowski <maciej.falkowski9@gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Rebased on v6.2-rc1
> - I suppose Tony picks this up?
OK thanks, applying into omap-for-v6.3/omap1 branch.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ARM: OMAP1: Move h2 LEDs to GPIO lookup table
2023-01-19 9:58 ` Tony Lindgren
@ 2023-01-19 10:02 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2023-01-19 10:02 UTC (permalink / raw)
To: Linus Walleij
Cc: Aaro Koskinen, Janusz Krzysztofik, linux-omap, Maciej Falkowski
* Tony Lindgren <tony@atomide.com> [230119 09:58]:
> * Linus Walleij <linus.walleij@linaro.org> [230111 15:24]:
> > This converts the the H2 GPIO LEDs to use a machine lookup
> > table.
> >
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Maciej Falkowski <maciej.falkowski9@gmail.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > ChangeLog v1->v2:
> > - Rebased on v6.2-rc1
> > - I suppose Tony picks this up?
>
> OK thanks, applying into omap-for-v6.3/omap1 branch.
Oh actually this file is getting dropped in Linux next, so not
applying.
Regards,
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-19 10:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-11 13:24 [PATCH v2] ARM: OMAP1: Move h2 LEDs to GPIO lookup table Linus Walleij
2023-01-19 9:58 ` Tony Lindgren
2023-01-19 10:02 ` Tony Lindgren
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).