linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* s3c24xx gpiolib question
@ 2009-09-27 17:12 Vasily Khoruzhick
  2009-09-28 12:23 ` Ben Dooks
  0 siblings, 1 reply; 2+ messages in thread
From: Vasily Khoruzhick @ 2009-09-27 17:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Is following patch sufficient to add GPJ port support to s3c24xx gpiolib?
And how to switch gpioline to custom function mode (for example TOUT0 on GPB0) 
via gpiolib?

diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c
index 6d7a961..65d79f9 100644
--- a/arch/arm/plat-s3c24xx/gpiolib.c
+++ b/arch/arm/plat-s3c24xx/gpiolib.c
@@ -151,7 +151,8 @@ struct s3c_gpio_chip s3c24xx_gpios[] = {
 			.ngpio			= 16,
 			.to_irq			= s3c24xx_gpiolib_bankg_toirq,
 		},
-	}, {
+	}, 
+	[7] = {
 		.base	= S3C2410_GPHCON,
 		.pm	= __gpio_pm(&s3c_gpio_pm_2bit),
 		.chip	= {
@@ -161,6 +162,16 @@ struct s3c_gpio_chip s3c24xx_gpios[] = {
 			.ngpio			= 11,
 		},
 	},
+	[8] = {
+		.base	= S3C2440_GPJCON,
+		.pm = __gpio_pm(&s3c_gpio_pm_2bit),
+		.chip	= {
+			.base			= S3C2440_GPJ0,
+			.owner			= THIS_MODULE,
+			.label			= "GPIOJ",
+			.ngpio			= 16,
+		},
+	},
 };
 
 static __init int s3c24xx_gpiolib_init(void)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090927/2dd0962b/attachment.sig>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* s3c24xx gpiolib question
  2009-09-27 17:12 s3c24xx gpiolib question Vasily Khoruzhick
@ 2009-09-28 12:23 ` Ben Dooks
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Dooks @ 2009-09-28 12:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Sep 27, 2009 at 08:12:44PM +0300, Vasily Khoruzhick wrote:
> Hi,
> 
> Is following patch sufficient to add GPJ port support to s3c24xx gpiolib?
> And how to switch gpioline to custom function mode (for example TOUT0 on GPB0) 
> via gpiolib?
> 
> diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c
> index 6d7a961..65d79f9 100644
> --- a/arch/arm/plat-s3c24xx/gpiolib.c
> +++ b/arch/arm/plat-s3c24xx/gpiolib.c
> @@ -151,7 +151,8 @@ struct s3c_gpio_chip s3c24xx_gpios[] = {
>  			.ngpio			= 16,
>  			.to_irq			= s3c24xx_gpiolib_bankg_toirq,
>  		},
> -	}, {
> +	}, 
> +	[7] = {
>  		.base	= S3C2410_GPHCON,
>  		.pm	= __gpio_pm(&s3c_gpio_pm_2bit),
>  		.chip	= {
> @@ -161,6 +162,16 @@ struct s3c_gpio_chip s3c24xx_gpios[] = {
>  			.ngpio			= 11,
>  		},
>  	},
> +	[8] = {
> +		.base	= S3C2440_GPJCON,
> +		.pm = __gpio_pm(&s3c_gpio_pm_2bit),
> +		.chip	= {
> +			.base			= S3C2440_GPJ0,

I need to get the gpio number space compressed to get this to
work, it got shuffled out of this round of patches due to urgent
meetings.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-28 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-27 17:12 s3c24xx gpiolib question Vasily Khoruzhick
2009-09-28 12:23 ` Ben Dooks

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).