aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/Kconfig
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-14 17:14:24 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-05-20 11:27:07 -0400
commitcd99758ba3bde64347a8ece381cbae2fb5c745b2 (patch)
treece74c5150978f1cd29861e33e8847bc5dd667ed7 /drivers/mfd/Kconfig
parent4492c4c3ff7bbb5fd400f021532643a3493f0723 (diff)
mfd: Convert wm831x to irq_domain
The modern idiom is to use irq_domain to allocate interrupts. This is useful partly to allow further infrastructure to be based on the domains and partly because it makes it much easier to allocate virtual interrupts to devices as we don't need to allocate a contiguous range of interrupt numbers. Convert the wm831x driver over to this infrastructure, using a legacy IRQ mapping if an irq_base is specified in platform data and otherwise using a linear mapping, always registering the interrupts even if they won't ever be used. Only boards which need to use the GPIOs as interrupts should need to use an irq_base. This means that we can't use the MFD irq_base management since the unless we're using an explicit irq_base from platform data we can't rely on a linear mapping of interrupts. Instead we need to map things via the irq_domain - provide a conveniencem function wm831x_irq() to save a small amount of typing when doing so. Looking at this I couldn't clearly see anything the MFD core could do to make this nicer. Since we're not supporting device tree yet there's no meaningful advantage if we don't do this conversion in one, the fact that the interrupt resources are used for repeated IP blocks makes accessor functions for the irq_domain more trouble to do than they're worth. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/Kconfig')
-rw-r--r--drivers/mfd/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index a0e1b834af61..8325c44c04c6 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -496,6 +496,7 @@ config MFD_WM831X_I2C
496 select MFD_CORE 496 select MFD_CORE
497 select MFD_WM831X 497 select MFD_WM831X
498 select REGMAP_I2C 498 select REGMAP_I2C
499 select IRQ_DOMAIN
499 depends on I2C=y && GENERIC_HARDIRQS 500 depends on I2C=y && GENERIC_HARDIRQS
500 help 501 help
501 Support for the Wolfson Microelecronics WM831x and WM832x PMICs 502 Support for the Wolfson Microelecronics WM831x and WM832x PMICs
@@ -508,6 +509,7 @@ config MFD_WM831X_SPI
508 select MFD_CORE 509 select MFD_CORE
509 select MFD_WM831X 510 select MFD_WM831X
510 select REGMAP_SPI 511 select REGMAP_SPI
512 select IRQ_DOMAIN
511 depends on SPI_MASTER && GENERIC_HARDIRQS 513 depends on SPI_MASTER && GENERIC_HARDIRQS
512 help 514 help
513 Support for the Wolfson Microelecronics WM831x and WM832x PMICs 515 Support for the Wolfson Microelecronics WM831x and WM832x PMICs