public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Varun Wadekar <vwadekar@nvidia.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	LAK <linux-arm-kernel@lists.infradead.org>,
	Russell King <linux@arm.linux.org.uk>,
	Lennert Buytenhek <buytenh@wantstofly.org>,
	Colin Cross <ccross@android.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [patch 02/23] arm: tegra: Remove unused function which fiddles with	irq_desc
Date: Sun, 27 Mar 2011 01:42:07 +0530	[thread overview]
Message-ID: <4D8E4897.5030705@nvidia.com> (raw)
In-Reply-To: <20110325132047.552074703@linutronix.de>


Thomas, then how do you think we should handle restoring of gpio states
across suspend-resume cycles?

On Friday 25 March 2011 06:51 PM, Thomas Gleixner wrote:
> These functions are unused and in the way of cleanups in the core
> code. If you have special requirements vs. irqs and PM then please
> talk to me. Access to the generic core internals is going away.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Colin Cross <ccross@android.com>
> Cc: linux-tegra@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>  arch/arm/mach-tegra/gpio.c                 |   63 -----------------------------
>  arch/arm/mach-tegra/include/mach/suspend.h |    2 
>  2 files changed, 65 deletions(-)
>
> Index: linux-2.6/arch/arm/mach-tegra/gpio.c
> ===================================================================
> --- linux-2.6.orig/arch/arm/mach-tegra/gpio.c
> +++ linux-2.6/arch/arm/mach-tegra/gpio.c
> @@ -254,69 +254,6 @@ static void tegra_gpio_irq_handler(unsig
>  }
>  
>  #ifdef CONFIG_PM
> -void tegra_gpio_resume(void)
> -{
> -	unsigned long flags;
> -	int b, p, i;
> -
> -	local_irq_save(flags);
> -
> -	for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) {
> -		struct tegra_gpio_bank *bank = &tegra_gpio_banks[b];
> -
> -		for (p = 0; p < ARRAY_SIZE(bank->oe); p++) {
> -			unsigned int gpio = (b<<5) | (p<<3);
> -			__raw_writel(bank->cnf[p], GPIO_CNF(gpio));
> -			__raw_writel(bank->out[p], GPIO_OUT(gpio));
> -			__raw_writel(bank->oe[p], GPIO_OE(gpio));
> -			__raw_writel(bank->int_lvl[p], GPIO_INT_LVL(gpio));
> -			__raw_writel(bank->int_enb[p], GPIO_INT_ENB(gpio));
> -		}
> -	}
> -
> -	local_irq_restore(flags);
> -
> -	for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
> -		struct irq_desc *desc = irq_to_desc(i);
> -		if (!desc || (desc->status & IRQ_WAKEUP))
> -			continue;
> -		enable_irq(i);
> -	}
> -}
> -
> -void tegra_gpio_suspend(void)
> -{
> -	unsigned long flags;
> -	int b, p, i;
> -
> -	for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
> -		struct irq_desc *desc = irq_to_desc(i);
> -		if (!desc)
> -			continue;
> -		if (desc->status & IRQ_WAKEUP) {
> -			int gpio = i - INT_GPIO_BASE;
> -			pr_debug("gpio %d.%d is wakeup\n", gpio/8, gpio&7);
> -			continue;
> -		}
> -		disable_irq(i);
> -	}
> -
> -	local_irq_save(flags);
> -	for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) {
> -		struct tegra_gpio_bank *bank = &tegra_gpio_banks[b];
> -
> -		for (p = 0; p < ARRAY_SIZE(bank->oe); p++) {
> -			unsigned int gpio = (b<<5) | (p<<3);
> -			bank->cnf[p] = __raw_readl(GPIO_CNF(gpio));
> -			bank->out[p] = __raw_readl(GPIO_OUT(gpio));
> -			bank->oe[p] = __raw_readl(GPIO_OE(gpio));
> -			bank->int_enb[p] = __raw_readl(GPIO_INT_ENB(gpio));
> -			bank->int_lvl[p] = __raw_readl(GPIO_INT_LVL(gpio));
> -		}
> -	}
> -	local_irq_restore(flags);
> -}
> -
>  static int tegra_gpio_wake_enable(struct irq_data *d, unsigned int enable)
>  {
>  	struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
> Index: linux-2.6/arch/arm/mach-tegra/include/mach/suspend.h
> ===================================================================
> --- linux-2.6.orig/arch/arm/mach-tegra/include/mach/suspend.h
> +++ linux-2.6/arch/arm/mach-tegra/include/mach/suspend.h
> @@ -23,14 +23,12 @@
>  
>  void tegra_pinmux_suspend(void);
>  void tegra_irq_suspend(void);
> -void tegra_gpio_suspend(void);
>  void tegra_clk_suspend(void);
>  void tegra_dma_suspend(void);
>  void tegra_timer_suspend(void);
>  
>  void tegra_pinmux_resume(void);
>  void tegra_irq_resume(void);
> -void tegra_gpio_resume(void);
>  void tegra_clk_resume(void);
>  void tegra_dma_resume(void);
>  void tegra_timer_resume(void);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2011-03-26 20:12 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 13:21 [patch 00/23] ARM: Final genirq cleanup Thomas Gleixner
2011-03-25 13:21 ` [patch 01/23] arm: Ns9xxx: Remove private irq flow handler Thomas Gleixner
2011-03-25 13:21 ` [patch 02/23] arm: tegra: Remove unused function which fiddles with irq_desc Thomas Gleixner
2011-03-26 20:12   ` Varun Wadekar [this message]
2011-03-26 20:24     ` Thomas Gleixner
2011-03-26 22:37       ` Colin Cross
2011-03-27  8:07         ` Thomas Gleixner
2011-03-25 13:21 ` [patch 03/23] arm: Use genirq lockdep helper to set lock class Thomas Gleixner
2011-03-25 13:21 ` [patch 04/23] arm: Use irq flag setter function Thomas Gleixner
2011-03-25 13:21 ` [patch 05/23] arm: msm: Convert to new irq chip functions Thomas Gleixner
2011-03-25 13:21 ` [patch 06/23] arm: Cleanup irq_desc access Thomas Gleixner
2011-03-25 13:21 ` [patch 07/23] arm: plat-samsung: Use proper irq accessor functions Thomas Gleixner
2011-03-25 13:21 ` [patch 08/23] arm: stmp3xxx: Use generic_handle_irq() Thomas Gleixner
2011-03-25 13:21 ` [patch 09/23] arm: nomadik: Use local irq state Thomas Gleixner
2011-03-25 13:22 ` [patch 10/23] arm: plat-omap: Cleanup irq_desc access Thomas Gleixner
2011-03-25 13:22 ` [patch 11/23] arm: msm: Use proper irq accessor functions Thomas Gleixner
2011-03-25 13:22 ` [patch 12/23] arm: vt8500: Use proper irq accessors Thomas Gleixner
2011-03-25 13:22 ` [patch 13/23] arm: mxc: Use generic_handle_irq() Thomas Gleixner
2011-03-25 13:22 ` [patch 14/23] arm: gemini: Use proper irq accessor functions Thomas Gleixner
2011-03-25 13:22 ` [patch 15/23] arm: ep93xx: " Thomas Gleixner
2011-03-25 13:22 ` [patch 16/23] arm: davinci: Cleanup irq chip code Thomas Gleixner
2011-03-25 13:22 ` [patch 17/23] arm: at91: Cleanup irq chip Thomas Gleixner
2011-03-25 21:03   ` Thomas Gleixner
2011-03-27 15:02     ` Sergei Shtylyov
2011-03-27 15:47       ` Thomas Gleixner
2011-03-25 13:22 ` [patch 18/23] arm: gic: Use proper accessor functions Thomas Gleixner
2011-03-25 13:22 ` [patch 19/23] arm: dove: Use proper irq " Thomas Gleixner
2011-03-25 13:22 ` [patch 20/23] arm: Use generic show_interrupts() Thomas Gleixner
2011-03-25 13:22 ` [patch 21/23] arm: Cleanup the irq namespace Thomas Gleixner
2011-04-18 17:43   ` H Hartley Sweeten
2011-03-25 13:22 ` [patch 22/23] arm: Reorder irq_set_ function calls Thomas Gleixner
2011-03-25 13:22 ` [patch 23/23] arm: Fold irq_set_chip/irq_set_handler Thomas Gleixner

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=4D8E4897.5030705@nvidia.com \
    --to=vwadekar@nvidia.com \
    --cc=buytenh@wantstofly.org \
    --cc=ccross@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox