On Sat, Jun 27, 2020 at 02:10:15AM +0200, Linus Walleij wrote: > This converts the s3c24xx LED driver to use GPIO descriptors > and also modify all board files to account for these changes > by registering the appropriate GPIO tables for each board. > > The driver was using a custom flag to indicate open drain > (tristate) but this can be handled by standard descriptor > machine tables. > > The driver was setting non-pull-up for the pin using the custom > S3C24xx GPIO API, but this is a custom pin control system used > by the S3C24xx and no generic GPIO function, so this has simply > been pushed back into the respective board files. > > Cc: Ben Dooks <ben-linux@xxxxxxxxx> > Cc: Sylwester Nawrocki <sylvester.nawrocki@xxxxxxxxx> > Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > --- > arch/arm/mach-s3c24xx/common-smdk.c | 67 +++++++++++++++------- > arch/arm/mach-s3c24xx/mach-mini2440.c | 63 +++++++++++++++++--- > arch/arm/mach-s3c24xx/mach-n30.c | 54 +++++++++++++++-- > arch/arm/mach-s3c24xx/mach-qt2410.c | 12 +++- > arch/arm/mach-s3c24xx/mach-vr1000.c | 38 +++++++++++- > drivers/leds/leds-s3c24xx.c | 37 +++--------- > include/linux/platform_data/leds-s3c24xx.h | 6 -- > 7 files changed, 200 insertions(+), 77 deletions(-) > > diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c > index 58e30cad386c..10fc804c4ec5 100644 > --- a/arch/arm/mach-s3c24xx/common-smdk.c > +++ b/arch/arm/mach-s3c24xx/common-smdk.c > @@ -14,6 +14,7 @@ > #include <linux/timer.h> > #include <linux/init.h> > #include <linux/gpio.h> > +#include <linux/gpio/machine.h> > #include <linux/device.h> > #include <linux/platform_device.h> > > @@ -44,29 +45,53 @@ > > /* LED devices */ > > +static struct gpiod_lookup_table smdk_led4_gpio_table = { > + .dev_id = "s3c24xx_led.0", > + .table = { > + GPIO_LOOKUP("GPF", 4, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN), > + { }, > + }, > +}; > + > +static struct gpiod_lookup_table smdk_led5_gpio_table = { > + .dev_id = "s3c24xx_led.1", > + .table = { > + GPIO_LOOKUP("GPF", 6, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN), The original code has here GPF(5). > + { }, > + }, > +}; > + > +static struct gpiod_lookup_table smdk_led6_gpio_table = { > + .dev_id = "s3c24xx_led.2", > + .table = { > + GPIO_LOOKUP("GPF", 5, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN), Ditto, but GPF(6). Rest looks fine. I will need Jacek's/Pavel's/Dan's ack to take it through samsung-soc. Best regards, Krzysztof