All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavan Kondeti <pkondeti@codeaurora.org>
To: Gregory Bean <gbean@codeaurora.org>
Cc: dwalker@codeaurora.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] msm: gpio: Add irq support to v2 gpiolib.
Date: Thu, 18 Nov 2010 16:45:27 +0530	[thread overview]
Message-ID: <20101118111527.GD11700@codeaurora.org> (raw)
In-Reply-To: <1289943516-11367-2-git-send-email-gbean@codeaurora.org>

Hi Greg,

On Tue, Nov 16, 2010 at 01:38:36PM -0800, Gregory Bean wrote:
> Complete the MSM v2 gpio subsystem by adding irq_chip.
> 
> Signed-off-by: Gregory Bean <gbean@codeaurora.org>
> ---
>  arch/arm/mach-msm/gpio-v2.c |  344 ++++++++++++++++++++++++++++++++++++++++---
>  1 files changed, 326 insertions(+), 18 deletions(-)
> 
>  
> +#ifdef CONFIG_PM
> +static int msm_gpio_suspend_noirq(struct device *dev)
> +{
> +	unsigned long irq_flags;
> +	unsigned long i;
> +
> +	spin_lock_irqsave(&tlmm_lock, irq_flags);
> +	for_each_set_bit(i, msm_gpio.enabled_irqs, NR_GPIO_IRQS) {
> +		if (!test_bit(i, msm_gpio.wake_irqs))
> +			writel(TARGET_PROC_NONE, GPIO_INTR_CFG_SU(i));
> +	}
If none of the enabled irqs is configured as a wakeup source, should not we
disable the summary IRQ?
> +	spin_unlock_irqrestore(&tlmm_lock, irq_flags);
> +	return 0;
> +}
> +
> +static int msm_gpio_resume_noirq(struct device *dev)
> +{
> +	unsigned long irq_flags;
> +	unsigned long i;
> +
> +	spin_lock_irqsave(&tlmm_lock, irq_flags);
> +	for_each_set_bit(i, msm_gpio.enabled_irqs, NR_GPIO_IRQS)
> +		writel(TARGET_PROC_SCORPION, GPIO_INTR_CFG_SU(i));
> +	spin_unlock_irqrestore(&tlmm_lock, irq_flags);
> +	return 0;
> +}
> +#else
> +#define msm_gpio_suspend_noirq NULL
> +#define msm_gpio_resume_noirq NULL
> +#endif
> +
-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


WARNING: multiple messages have this Message-ID (diff)
From: pkondeti@codeaurora.org (Pavan Kondeti)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] msm: gpio: Add irq support to v2 gpiolib.
Date: Thu, 18 Nov 2010 16:45:27 +0530	[thread overview]
Message-ID: <20101118111527.GD11700@codeaurora.org> (raw)
In-Reply-To: <1289943516-11367-2-git-send-email-gbean@codeaurora.org>

Hi Greg,

On Tue, Nov 16, 2010 at 01:38:36PM -0800, Gregory Bean wrote:
> Complete the MSM v2 gpio subsystem by adding irq_chip.
> 
> Signed-off-by: Gregory Bean <gbean@codeaurora.org>
> ---
>  arch/arm/mach-msm/gpio-v2.c |  344 ++++++++++++++++++++++++++++++++++++++++---
>  1 files changed, 326 insertions(+), 18 deletions(-)
> 
>  
> +#ifdef CONFIG_PM
> +static int msm_gpio_suspend_noirq(struct device *dev)
> +{
> +	unsigned long irq_flags;
> +	unsigned long i;
> +
> +	spin_lock_irqsave(&tlmm_lock, irq_flags);
> +	for_each_set_bit(i, msm_gpio.enabled_irqs, NR_GPIO_IRQS) {
> +		if (!test_bit(i, msm_gpio.wake_irqs))
> +			writel(TARGET_PROC_NONE, GPIO_INTR_CFG_SU(i));
> +	}
If none of the enabled irqs is configured as a wakeup source, should not we
disable the summary IRQ?
> +	spin_unlock_irqrestore(&tlmm_lock, irq_flags);
> +	return 0;
> +}
> +
> +static int msm_gpio_resume_noirq(struct device *dev)
> +{
> +	unsigned long irq_flags;
> +	unsigned long i;
> +
> +	spin_lock_irqsave(&tlmm_lock, irq_flags);
> +	for_each_set_bit(i, msm_gpio.enabled_irqs, NR_GPIO_IRQS)
> +		writel(TARGET_PROC_SCORPION, GPIO_INTR_CFG_SU(i));
> +	spin_unlock_irqrestore(&tlmm_lock, irq_flags);
> +	return 0;
> +}
> +#else
> +#define msm_gpio_suspend_noirq NULL
> +#define msm_gpio_resume_noirq NULL
> +#endif
> +
-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2010-11-18 11:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 21:38 [PATCH v3 1/2] msm: gpio: Add v2 gpio support to MSM SoCs Gregory Bean
2010-11-16 21:38 ` Gregory Bean
2010-11-16 21:38 ` [PATCH v3 2/2] msm: gpio: Add irq support to v2 gpiolib Gregory Bean
2010-11-16 21:38   ` Gregory Bean
2010-11-18 11:15   ` Pavan Kondeti [this message]
2010-11-18 11:15     ` Pavan Kondeti
2010-11-18 19:20     ` Gregory Bean
2010-11-18 19:20       ` Gregory Bean
2010-11-18 10:52 ` [PATCH v3 1/2] msm: gpio: Add v2 gpio support to MSM SoCs Pavan Kondeti
2010-11-18 10:52   ` Pavan Kondeti

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=20101118111527.GD11700@codeaurora.org \
    --to=pkondeti@codeaurora.org \
    --cc=dwalker@codeaurora.org \
    --cc=gbean@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@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.