All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
	linux-leds@vger.kernel.org, Ben Dooks <ben-linux@fluff.org>,
	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Subject: Re: [PATCH] leds: s3c24xx: Convert to use GPIO descriptors
Date: Mon, 29 Jun 2020 20:40:43 +0200	[thread overview]
Message-ID: <20200629184043.GA21110@kozik-lap> (raw)
In-Reply-To: <20200627001015.427376-1-linus.walleij@linaro.org>

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@fluff.org>
> Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  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

  reply	other threads:[~2020-06-29 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-27  0:10 [PATCH] leds: s3c24xx: Convert to use GPIO descriptors Linus Walleij
2020-06-29 18:40 ` Krzysztof Kozlowski [this message]
2020-06-29 21:49 ` Jacek Anaszewski
2020-07-08  7:08   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200629184043.GA21110@kozik-lap \
    --to=krzk@kernel.org \
    --cc=ben-linux@fluff.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sylvester.nawrocki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.