All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: Christian Pellegrin <chripell@fsfe.org>
Cc: ben-linux@fluff.org, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v2] Fix GPIOs bank H and J not being preserved during suspend
Date: Mon, 8 Mar 2010 15:55:22 +0000	[thread overview]
Message-ID: <20100308155522.GE24864@trinity.fluff.org> (raw)
In-Reply-To: <1268047288-11166-1-git-send-email-chripell@fsfe.org>

On Mon, Mar 08, 2010 at 12:21:28PM +0100, Christian Pellegrin wrote:
> This patch adds bank H and J GPIOs (present on S3C244X CPUs) to the list
> of registers that must be saved/resumed during suspend.
> 
> Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
> ---
>  arch/arm/mach-s3c2410/include/mach/gpio-core.h |    2 +-
>  arch/arm/plat-s3c/pm-gpio.c                    |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
> index f8b879a..7c33ecf 100644
> --- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h
> +++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
> @@ -24,7 +24,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
>  {
>  	struct s3c_gpio_chip *chip;
>  
> -	if (pin > S3C2410_GPG(10))
> +	if (pin > S3C_GPIO_END)
>  		return NULL;
>  
>  	chip = &s3c24xx_gpios[pin/32];
> diff --git a/arch/arm/plat-s3c/pm-gpio.c b/arch/arm/plat-s3c/pm-gpio.c
> index cfd326a..b3cc8db 100644
> --- a/arch/arm/plat-s3c/pm-gpio.c
> +++ b/arch/arm/plat-s3c/pm-gpio.c
> @@ -343,7 +343,7 @@ void s3c_pm_save_gpios(void)
>  			  ourchip->pm_save[2],
>  			  ourchip->pm_save[3]);
>  
> -		gpio_nr += ourchip->chip.ngpio;
> +		gpio_nr += ourchip->chip.ngpio - 1;
>  		gpio_nr += CONFIG_S3C_GPIO_SPACE;
>  	}
>  }
> @@ -374,7 +374,7 @@ void s3c_pm_restore_gpios(void)
>  
>  		s3c_pm_resume_gpio(ourchip);
>  
> -		gpio_nr += ourchip->chip.ngpio;
> +		gpio_nr += ourchip->chip.ngpio - 1;
>  		gpio_nr += CONFIG_S3C_GPIO_SPACE;
>  	}
>  }

Still not getting why you're changing this from x, to x - 1.

> 1.5.6.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
-- 
Ben

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

WARNING: multiple messages have this Message-ID (diff)
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] Fix GPIOs bank H and J not being preserved during suspend
Date: Mon, 8 Mar 2010 15:55:22 +0000	[thread overview]
Message-ID: <20100308155522.GE24864@trinity.fluff.org> (raw)
In-Reply-To: <1268047288-11166-1-git-send-email-chripell@fsfe.org>

On Mon, Mar 08, 2010 at 12:21:28PM +0100, Christian Pellegrin wrote:
> This patch adds bank H and J GPIOs (present on S3C244X CPUs) to the list
> of registers that must be saved/resumed during suspend.
> 
> Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
> ---
>  arch/arm/mach-s3c2410/include/mach/gpio-core.h |    2 +-
>  arch/arm/plat-s3c/pm-gpio.c                    |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
> index f8b879a..7c33ecf 100644
> --- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h
> +++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
> @@ -24,7 +24,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
>  {
>  	struct s3c_gpio_chip *chip;
>  
> -	if (pin > S3C2410_GPG(10))
> +	if (pin > S3C_GPIO_END)
>  		return NULL;
>  
>  	chip = &s3c24xx_gpios[pin/32];
> diff --git a/arch/arm/plat-s3c/pm-gpio.c b/arch/arm/plat-s3c/pm-gpio.c
> index cfd326a..b3cc8db 100644
> --- a/arch/arm/plat-s3c/pm-gpio.c
> +++ b/arch/arm/plat-s3c/pm-gpio.c
> @@ -343,7 +343,7 @@ void s3c_pm_save_gpios(void)
>  			  ourchip->pm_save[2],
>  			  ourchip->pm_save[3]);
>  
> -		gpio_nr += ourchip->chip.ngpio;
> +		gpio_nr += ourchip->chip.ngpio - 1;
>  		gpio_nr += CONFIG_S3C_GPIO_SPACE;
>  	}
>  }
> @@ -374,7 +374,7 @@ void s3c_pm_restore_gpios(void)
>  
>  		s3c_pm_resume_gpio(ourchip);
>  
> -		gpio_nr += ourchip->chip.ngpio;
> +		gpio_nr += ourchip->chip.ngpio - 1;
>  		gpio_nr += CONFIG_S3C_GPIO_SPACE;
>  	}
>  }

Still not getting why you're changing this from x, to x - 1.

> 1.5.6.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
-- 
Ben

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

  reply	other threads:[~2010-03-08 15:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 16:05 [PATCH] This patch adds support for GPIO bank J present on S3C244X CPUs. It Christian Pellegrin
2010-03-02 16:11 ` christian pellegrin
2010-03-02 16:11   ` [PATCH resend v2.6.33] Fix support for banks H and J on S3C244X CPUs Christian Pellegrin
2010-03-02 21:54 ` [PATCH] This patch adds support for GPIO bank J present on S3C244X CPUs. It Ben Dooks
2010-03-03  6:58   ` christian pellegrin
2010-03-03  7:00     ` [PATCH] Adds support for banks H and J on S3C244X CPUs Christian Pellegrin
2010-03-03  8:24       ` omap gpio help doron
2010-03-03  7:00     ` [PATCH] Fix GPIOs bank H and J not being preserved during suspend Christian Pellegrin
2010-03-04 23:21       ` Ben Dooks
2010-03-08 11:17         ` christian pellegrin
2010-03-08 11:21           ` [PATCH v2] " Christian Pellegrin
2010-03-08 11:21             ` Christian Pellegrin
2010-03-08 15:55             ` Ben Dooks [this message]
2010-03-08 15:55               ` Ben Dooks
2010-03-08 16:14               ` christian pellegrin
2010-03-08 16:14                 ` christian pellegrin
2010-03-08 16:16                 ` Ben Dooks
2010-03-08 16:16                   ` Ben Dooks
2010-03-12  7:25                   ` christian pellegrin
2010-03-12  7:25                     ` christian pellegrin
2010-03-12  7:28                     ` [PATCH v2] Fix GPIOs banks " Christian Pellegrin
2010-03-12  7:28                       ` Christian Pellegrin
2010-03-12  7:29                     ` [PATCH v2] Fix one-too-much bug when building list of regs to be preserved on PM Christian Pellegrin
2010-03-12  7:29                       ` Christian Pellegrin

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=20100308155522.GE24864@trinity.fluff.org \
    --to=ben-linux@fluff.org \
    --cc=chripell@fsfe.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.