Commit 194e15ba authored by Linus Walleij's avatar Linus Walleij

pinctrl: nomadik: rename secondary to latent

The "secondary irq" in the nomadik pin control driver is actually
not secondary (as in: can occur any time alongside the ordinary
irq), it is a latent IRQ. It is an IRQ that has occurred when
the system was in sleep state and has been cached in a special
register flagged from the low power management unit (PRCM).
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 6a8a0c1d
...@@ -254,7 +254,7 @@ struct nmk_gpio_platform_data { ...@@ -254,7 +254,7 @@ struct nmk_gpio_platform_data {
int first_gpio; int first_gpio;
int first_irq; int first_irq;
int num_gpio; int num_gpio;
u32 (*get_secondary_status)(unsigned int bank); u32 (*get_latent_status)(unsigned int bank);
void (*set_ioforce)(bool enable); void (*set_ioforce)(bool enable);
bool supports_sleepmode; bool supports_sleepmode;
}; };
...@@ -266,8 +266,8 @@ struct nmk_gpio_chip { ...@@ -266,8 +266,8 @@ struct nmk_gpio_chip {
struct clk *clk; struct clk *clk;
unsigned int bank; unsigned int bank;
unsigned int parent_irq; unsigned int parent_irq;
int secondary_parent_irq; int latent_parent_irq;
u32 (*get_secondary_status)(unsigned int bank); u32 (*get_latent_status)(unsigned int bank);
void (*set_ioforce)(bool enable); void (*set_ioforce)(bool enable);
spinlock_t lock; spinlock_t lock;
bool sleepmode; bool sleepmode;
...@@ -926,11 +926,11 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -926,11 +926,11 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
__nmk_gpio_irq_handler(irq, desc, status); __nmk_gpio_irq_handler(irq, desc, status);
} }
static void nmk_gpio_secondary_irq_handler(unsigned int irq, static void nmk_gpio_latent_irq_handler(unsigned int irq,
struct irq_desc *desc) struct irq_desc *desc)
{ {
struct nmk_gpio_chip *nmk_chip = irq_get_handler_data(irq); struct nmk_gpio_chip *nmk_chip = irq_get_handler_data(irq);
u32 status = nmk_chip->get_secondary_status(nmk_chip->bank); u32 status = nmk_chip->get_latent_status(nmk_chip->bank);
__nmk_gpio_irq_handler(irq, desc, status); __nmk_gpio_irq_handler(irq, desc, status);
} }
...@@ -940,10 +940,10 @@ static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) ...@@ -940,10 +940,10 @@ static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip)
irq_set_chained_handler(nmk_chip->parent_irq, nmk_gpio_irq_handler); irq_set_chained_handler(nmk_chip->parent_irq, nmk_gpio_irq_handler);
irq_set_handler_data(nmk_chip->parent_irq, nmk_chip); irq_set_handler_data(nmk_chip->parent_irq, nmk_chip);
if (nmk_chip->secondary_parent_irq >= 0) { if (nmk_chip->latent_parent_irq >= 0) {
irq_set_chained_handler(nmk_chip->secondary_parent_irq, irq_set_chained_handler(nmk_chip->latent_parent_irq,
nmk_gpio_secondary_irq_handler); nmk_gpio_latent_irq_handler);
irq_set_handler_data(nmk_chip->secondary_parent_irq, nmk_chip); irq_set_handler_data(nmk_chip->latent_parent_irq, nmk_chip);
} }
return 0; return 0;
...@@ -1263,7 +1263,7 @@ static int nmk_gpio_probe(struct platform_device *dev) ...@@ -1263,7 +1263,7 @@ static int nmk_gpio_probe(struct platform_device *dev)
struct gpio_chip *chip; struct gpio_chip *chip;
struct resource *res; struct resource *res;
struct clk *clk; struct clk *clk;
int secondary_irq; int latent_irq;
void __iomem *base; void __iomem *base;
int irq; int irq;
int ret; int ret;
...@@ -1287,8 +1287,8 @@ static int nmk_gpio_probe(struct platform_device *dev) ...@@ -1287,8 +1287,8 @@ static int nmk_gpio_probe(struct platform_device *dev)
if (irq < 0) if (irq < 0)
return irq; return irq;
secondary_irq = platform_get_irq(dev, 1); latent_irq = platform_get_irq(dev, 1);
if (secondary_irq >= 0 && !pdata->get_secondary_status) if (latent_irq >= 0 && !pdata->get_latent_status)
return -EINVAL; return -EINVAL;
res = platform_get_resource(dev, IORESOURCE_MEM, 0); res = platform_get_resource(dev, IORESOURCE_MEM, 0);
...@@ -1314,8 +1314,8 @@ static int nmk_gpio_probe(struct platform_device *dev) ...@@ -1314,8 +1314,8 @@ static int nmk_gpio_probe(struct platform_device *dev)
nmk_chip->addr = base; nmk_chip->addr = base;
nmk_chip->chip = nmk_gpio_template; nmk_chip->chip = nmk_gpio_template;
nmk_chip->parent_irq = irq; nmk_chip->parent_irq = irq;
nmk_chip->secondary_parent_irq = secondary_irq; nmk_chip->latent_parent_irq = latent_irq;
nmk_chip->get_secondary_status = pdata->get_secondary_status; nmk_chip->get_latent_status = pdata->get_latent_status;
nmk_chip->set_ioforce = pdata->set_ioforce; nmk_chip->set_ioforce = pdata->set_ioforce;
nmk_chip->sleepmode = pdata->supports_sleepmode; nmk_chip->sleepmode = pdata->supports_sleepmode;
spin_lock_init(&nmk_chip->lock); spin_lock_init(&nmk_chip->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment