From: Grant Likely Date: Thu, 5 Jan 2012 18:05:51 +0000 (-0700) Subject: Merge branch 'gpio-for-grant' of git://sources.calxeda.com/kernel/linux into gpio... X-Git-Tag: v3.3-rc1~64^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fda87903f4e9caf87e02d52768c2611e417b7efb;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git Merge branch 'gpio-for-grant' of git://sources.calxeda.com/kernel/linux into gpio/next Conflicts: drivers/gpio/gpio-pl061.c --- fda87903f4e9caf87e02d52768c2611e417b7efb diff --cc drivers/gpio/gpio-pl061.c index 42a5d56,23065f6..2f399ec --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@@ -23,7 -22,7 +22,8 @@@ #include #include #include +#include + #include #define GPIODIR 0x400 #define GPIOIS 0x404 @@@ -36,40 -35,18 +36,33 @@@ #define PL061_GPIO_NR 8 +#ifdef CONFIG_PM +struct pl061_context_save_regs { + u8 gpio_data; + u8 gpio_dir; + u8 gpio_is; + u8 gpio_ibe; + u8 gpio_iev; + u8 gpio_ie; +}; +#endif + struct pl061_gpio { - /* We use a list of pl061_gpio structs for each trigger IRQ in the main - * interrupts controller of the system. We need this to support systems - * in which more that one PL061s are connected to the same IRQ. The ISR - * interates through this list to find the source of the interrupt. - */ - struct list_head list; - /* Each of the two spinlocks protects a different set of hardware * regiters and data structurs. This decouples the code of the IRQ from * the GPIO code. This also makes the case of a GPIO routine call from * the IRQ code simpler. */ spinlock_t lock; /* GPIO registers */ - spinlock_t irq_lock; /* IRQ registers */ void __iomem *base; - unsigned irq_base; + int irq_base; + struct irq_chip_generic *irq_gc; struct gpio_chip gc; + +#ifdef CONFIG_PM + struct pl061_context_save_regs csave_regs; +#endif }; static int pl061_direction_input(struct gpio_chip *gc, unsigned offset) @@@ -339,15 -276,8 +292,10 @@@ static int pl061_probe(struct amba_devi else pl061_direction_input(&chip->gc, i); } - - irq_set_chip_and_handler(i + chip->irq_base, &pl061_irqchip, - handle_simple_irq); - set_irq_flags(i+chip->irq_base, IRQF_VALID); - irq_set_chip_data(i + chip->irq_base, chip); } + amba_set_drvdata(dev, chip); + return 0; iounmap: