All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: kgene.kim@samsung.com
Cc: ben-linux@fluff.org, linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	laforge@openmoko.org
Subject: [PATCH 03/10] ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
Date: Sat, 30 Jun 2012 14:08:55 +0200	[thread overview]
Message-ID: <1341058142-30438-4-git-send-email-sylvester.nawrocki@gmail.com> (raw)
In-Reply-To: <1341058142-30438-1-git-send-email-sylvester.nawrocki@gmail.com>

Replace SoC specific GPIO functions with the gpiolib API. The LED
gpio is freed right after it is configured so it can be acquired
in the s3c24xx_led driver.

This change is required for converting the s3c24xx_led driver
to the gpiolib API.

Cc: laforge@openmoko.org
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
This change was only compile tested. If there is someone still
using this board please provide a "Tested-by" tag.
---
 arch/arm/mach-s3c24xx/mach-qt2410.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index b868ddd..678bbca 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -47,7 +47,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
 #include <mach/leds-gpio.h>
 #include <mach/regs-lcd.h>
 #include <plat/regs-serial.h>
@@ -325,8 +324,9 @@ static void __init qt2410_machine_init(void)
 	}
 	s3c24xx_fb_set_platdata(&qt2410_fb_info);
 
-	s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT);
-	s3c2410_gpio_setpin(S3C2410_GPB(0), 1);
+	/* set initial state of the LED GPIO */
+	WARN_ON(gpio_request_one(S3C2410_GPB(0), GPIOF_OUT_INIT_HIGH, NULL));
+	gpio_free(S3C2410_GPB(0));
 
 	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
 	s3c_i2c0_set_platdata(NULL);
-- 
1.7.4.1

WARNING: multiple messages have this Message-ID (diff)
From: sylvester.nawrocki@gmail.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/10] ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
Date: Sat, 30 Jun 2012 14:08:55 +0200	[thread overview]
Message-ID: <1341058142-30438-4-git-send-email-sylvester.nawrocki@gmail.com> (raw)
In-Reply-To: <1341058142-30438-1-git-send-email-sylvester.nawrocki@gmail.com>

Replace SoC specific GPIO functions with the gpiolib API. The LED
gpio is freed right after it is configured so it can be acquired
in the s3c24xx_led driver.

This change is required for converting the s3c24xx_led driver
to the gpiolib API.

Cc: laforge at openmoko.org
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
This change was only compile tested. If there is someone still
using this board please provide a "Tested-by" tag.
---
 arch/arm/mach-s3c24xx/mach-qt2410.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index b868ddd..678bbca 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -47,7 +47,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
 #include <mach/leds-gpio.h>
 #include <mach/regs-lcd.h>
 #include <plat/regs-serial.h>
@@ -325,8 +324,9 @@ static void __init qt2410_machine_init(void)
 	}
 	s3c24xx_fb_set_platdata(&qt2410_fb_info);
 
-	s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT);
-	s3c2410_gpio_setpin(S3C2410_GPB(0), 1);
+	/* set initial state of the LED GPIO */
+	WARN_ON(gpio_request_one(S3C2410_GPB(0), GPIOF_OUT_INIT_HIGH, NULL));
+	gpio_free(S3C2410_GPB(0));
 
 	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
 	s3c_i2c0_set_platdata(NULL);
-- 
1.7.4.1

  parent reply	other threads:[~2012-06-30 12:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-30 12:08 [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes Sylwester Nawrocki
2012-06-30 12:08 ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 01/10] ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-07-01 17:36   ` Juergen Beisert
2012-07-01 17:36     ` Juergen Beisert
2012-06-30 12:08 ` [PATCH 02/10] ARM: S3C24XX: Convert SMDK board file to the gpiolib API Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` Sylwester Nawrocki [this message]
2012-06-30 12:08   ` [PATCH 03/10] ARM: S3C24XX: Convert QT2410 " Sylwester Nawrocki
2012-07-01  5:46   ` Harald Welte
2012-07-01  5:46     ` Harald Welte
2012-06-30 12:08 ` [PATCH 04/10] ARM: S3C24XX: Convert the PM code to " Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 05/10] ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 06/10] ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 07/10] ARM: S3C24XX: Remove unused GPIO definitions for port J Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:09 ` [PATCH 08/10] ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board Sylwester Nawrocki
2012-06-30 12:09   ` Sylwester Nawrocki
2012-06-30 12:09 ` [PATCH 09/10] ARM: S3C24XX: Correct AC97 clock control bit for S3C2440 Sylwester Nawrocki
2012-06-30 12:09   ` Sylwester Nawrocki
2012-06-30 12:09 ` [PATCH 10/10] ARM: S3C24XX: Correct CAMIF interrupt definitions Sylwester Nawrocki
2012-06-30 12:09   ` Sylwester Nawrocki
2012-07-12  9:19 ` [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes Kukjin Kim
2012-07-12  9:19   ` Kukjin Kim

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=1341058142-30438-4-git-send-email-sylvester.nawrocki@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=laforge@openmoko.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /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.