summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/jz4740-adc.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: core: Push irqdomain mapping out into devicesMark Brown2012-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | Currently the MFD core supports remapping MFD cell interrupts using an irqdomain but only if the MFD is being instantiated using device tree and only if the device tree bindings use the pattern of registering IPs in the device tree with compatible properties. This will be actively harmful for drivers which support non-DT platforms and use this pattern for their DT bindings as it will mean that the core will silently change remapping behaviour and it is also limiting for drivers which don't do DT with this particular pattern. There is also a potential fragility if there are interrupts not associated with MFD cells and all the cells are omitted from the device tree for some reason. Instead change the code to take an IRQ domain as an optional argument, allowing drivers to take the decision about the parent domain for their interrupts. The one current user of this feature is ab8500-core, it has the domain lookup pushed out into the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Don't declare jz4740_adc_cells constAxel Lin2012-01-091-1/+1
| | | | | | | | | | | | | | | Remove the const keyword to fix below warning: CC drivers/mfd/jz4740-adc.o drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_probe': drivers/mfd/jz4740-adc.c:290: warning: passing argument 3 of 'mfd_add_devices' discards qualifiers from pointer target type include/linux/mfd/core.h:93: note: expected 'struct mfd_cell *' but argument is of type 'const struct mfd_cell *' Also make jz4740_adc_cells static, is not used outside this driver so no need to make the symbol global. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Convert MFD drivers to use module_platform_driverMark Brown2012-01-091-11/+1
| | | | | | | | | Factors out some boilerplate code for drivers doing the default thing for platform driver registration. Drivers using platform_driver_probe or an initcall other than module_init can't be converted. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Include linux/io.h to jz4740-adcAxel Lin2011-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Include linux/io.h to fix below build error: CC drivers/mfd/jz4740-adc.o drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_irq_demux': drivers/mfd/jz4740-adc.c:73: error: implicit declaration of function 'readb' drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_set_enabled': drivers/mfd/jz4740-adc.c:110: error: implicit declaration of function 'writeb' drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_set_config': drivers/mfd/jz4740-adc.c:146: error: implicit declaration of function 'readl' drivers/mfd/jz4740-adc.c:151: error: implicit declaration of function 'writel' drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_probe': drivers/mfd/jz4740-adc.c:249: error: implicit declaration of function 'ioremap_nocache' drivers/mfd/jz4740-adc.c:249: warning: assignment makes pointer from integer without a cast drivers/mfd/jz4740-adc.c:289: warning: passing argument 3 of 'mfd_add_devices' discards qualifiers from pointer target type include/linux/mfd/core.h:93: note: expected 'struct mfd_cell *' but argument is of type 'const struct mfd_cell *' drivers/mfd/jz4740-adc.c:299: error: implicit declaration of function 'iounmap' make[2]: *** [drivers/mfd/jz4740-adc.o] Error 1 make[1]: *** [drivers/mfd] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Make jz4740_adc_driver staticLars-Peter Clausen2011-10-241-1/+1
| | | | | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix generic irq chip ack function name for jz4740-adcLars-Peter Clausen2011-09-211-1/+1
| | | | | | | | | In commit 659fb32d1b6("genirq: replace irq_gc_ack() with {set,clr}_bit variants"), irq_gc_ack was renamed to irq_gc_ack_set_bit. The jz4740-adc driver still uses the old name which results in a compile error. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Use generic irq chip for jz4740-adcLars-Peter Clausen2011-07-311-62/+28
| | | | | | | | | Use the generic irq chip framework for implementing the irq chip for the jz4740-adc driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Cleanup irq namespaceThomas Gleixner2011-03-271-8/+8
| | | | | | | | Converted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: mfd_cell is now implicitly available to jz4740 driversAndres Salomon2011-03-231-4/+0
| | | | | | | | | | | No need to explicitly set the cell's platform_data/data_size. Modify clients to use mfd_get_cell helper function instead of accessing platform_data directly. Signed-off-by: Andres Salomon <dilinger@queued.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Convert jz4740-adc to new irq_ methodsMark Brown2011-01-141-13/+12
| | | | | | | | | | Convert the jz4740-adc driver to use the recently introduced IRQ API variants which are passed struct irq_data rather than an IRQ number. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix jz4740_adc_set_enabledAxel Lin2010-10-291-1/+1
| | | | | | | | When enabled is false, clear BIT(engine) of JZ_REG_ADC_ENABLE register. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Check jz4740-adc kmalloc() resultAxel Lin2010-08-121-0/+4
| | | | | | | If kmalloc() fails exit with -ENOMEM. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix jz4740-adc resource reclaim in probe error pathAxel Lin2010-08-121-1/+7
| | | | | | | If mfd_add_devices() fail, we need to relese allocated resources. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add JZ4740 ADC driverLars-Peter Clausen2010-08-121-0/+384
This patch adds a MFD driver for the JZ4740 ADC unit. The driver is used to demultiplex IRQs and synchronize access to shared registers between the battery, hwmon and (future) touchscreen driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
OpenPOWER on IntegriCloud