[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 1/8] ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro
From: |
Geert Uytterhoeven |
Subject: |
[PATCH v6 1/8] ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro |
Date: |
Tue, 24 Mar 2020 14:56:46 +0100 |
impd1_probe() fills in the GPIO lookup table by manually populating an
array of gpiod_lookup structures. Use the existing GPIO_LOOKUP() helper
macro instead, to relax a dependency on the gpiod_lookup structure's
member names.
Signed-off-by: Geert Uytterhoeven <address@hidden>
Cc: address@hidden
---
While this patch is a dependency for "[PATCH v6 4/8] gpiolib: Add
support for GPIO lookup by line name", it can be applied independently.
But an Acked-by would be nice, too.
Cover letter and full series at
https://lore.kernel.org/r/address@hidden/
v6:
- New.
---
arch/arm/mach-integrator/impd1.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index 1ecbea5331d6ed8b..6f875ded841924d8 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -410,13 +410,10 @@ static int __ref impd1_probe(struct lm_device *dev)
* 5 = Key lower right
*/
/* We need the two MMCI GPIO entries */
- lookup->table[0].chip_label = chipname;
- lookup->table[0].chip_hwnum = 3;
- lookup->table[0].con_id = "wp";
- lookup->table[1].chip_label = chipname;
- lookup->table[1].chip_hwnum = 4;
- lookup->table[1].con_id = "cd";
- lookup->table[1].flags = GPIO_ACTIVE_LOW;
+ lookup->table[0] = (struct gpiod_lookup)
+ GPIO_LOOKUP(chipname, 3, "wp", 0);
+ lookup->table[1] = (struct gpiod_lookup)
+ GPIO_LOOKUP(chipname, 4, "cd", GPIO_ACTIVE_LOW);
gpiod_add_lookup_table(lookup);
}
--
2.17.1
- [PATCH v6 0/8] gpio: Add GPIO Aggregator, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 1/8] ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro,
Geert Uytterhoeven <=
- [PATCH v6 8/8] MAINTAINERS: Add GPIO Aggregator section, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 7/8] docs: gpio: Add GPIO Aggregator documentation, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 3/8] mfd: sm501: Use GPIO_LOOKUP_IDX() helper macro, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 2/8] i2c: i801: Use GPIO_LOOKUP() helper macro, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 6/8] gpio: Add GPIO Aggregator, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 4/8] gpiolib: Add support for GPIO lookup by line name, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config(), Geert Uytterhoeven, 2020/03/24