aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-08-20 06:53:36 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-14 03:52:13 -0400
commit80633f05b0dbf5819ef28f626f2f0b7c885d1f88 (patch)
tree37a823068072239eeb4f17e0080caea0ce24c22b
parent4f600ada70beeb1dfe08e11e871bf31015aa0a3d (diff)
mfd: ab8500: Make ab8500_irq_get_virq() static
MFD core now takes care of HWIRQ <-> VIRQ mapping, so the helper ab8500_irq_get_virq() is no longer used by ab8500 subordinate devices to obtain a Linux wide Virtual IRQ. The AB8500 IRQ controller still uses it internally though, so we'll just hide it from the rest of the world by making it static instead. Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/mfd/ab8500-core.c33
-rw-r--r--include/linux/mfd/abx500/ab8500.h2
2 files changed, 16 insertions, 19 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 47adf800024e..dd91951c68f0 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -472,6 +472,22 @@ static irqreturn_t ab8500_hierarchical_irq(int irq, void *dev)
472 return IRQ_HANDLED; 472 return IRQ_HANDLED;
473} 473}
474 474
475/**
476 * ab8500_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ
477 *
478 * @ab8500: ab8500_irq controller to operate on.
479 * @irq: index of the interrupt requested in the chip IRQs
480 *
481 * Useful for drivers to request their own IRQs.
482 */
483static int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq)
484{
485 if (!ab8500)
486 return -EINVAL;
487
488 return irq_create_mapping(ab8500->domain, irq);
489}
490
475static irqreturn_t ab8500_irq(int irq, void *dev) 491static irqreturn_t ab8500_irq(int irq, void *dev)
476{ 492{
477 struct ab8500 *ab8500 = dev; 493 struct ab8500 *ab8500 = dev;
@@ -511,23 +527,6 @@ static irqreturn_t ab8500_irq(int irq, void *dev)
511 return IRQ_HANDLED; 527 return IRQ_HANDLED;
512} 528}
513 529
514/**
515 * ab8500_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ
516 *
517 * @ab8500: ab8500_irq controller to operate on.
518 * @irq: index of the interrupt requested in the chip IRQs
519 *
520 * Useful for drivers to request their own IRQs.
521 */
522int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq)
523{
524 if (!ab8500)
525 return -EINVAL;
526
527 return irq_create_mapping(ab8500->domain, irq);
528}
529EXPORT_SYMBOL_GPL(ab8500_irq_get_virq);
530
531static int ab8500_irq_map(struct irq_domain *d, unsigned int virq, 530static int ab8500_irq_map(struct irq_domain *d, unsigned int virq,
532 irq_hw_number_t hwirq) 531 irq_hw_number_t hwirq)
533{ 532{
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 3764cb6759e3..1491044efa10 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -341,6 +341,4 @@ static inline int is_ab8500_2p0(struct ab8500 *ab)
341 return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0)); 341 return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0));
342} 342}
343 343
344int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq);
345
346#endif /* MFD_AB8500_H */ 344#endif /* MFD_AB8500_H */