summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | mfd: twl-core: Support for proper PWM driversPeter Ujfalusi2012-11-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The twl6030-pwm driver is going to be deleted since it was only able to control the Charging indicator LED on the twl6030 PMIC. The new set of drivers are going to provide support for both PWMs and PWM driven LED outputs on TWL4030 and TWL6030 PMICs. The twl-pwm driver will handle the PWMs (2 instance) while the twl-pwmled driver is to control the two LED instance on TWL4030 and to charging indicator LED (1 instance) on TWL6030. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl-core: Register twl4030-madc child only for twl4030 classPeter Ujfalusi2012-11-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | twl4030-madc driver can only handle twl4030 class MADC. The newer revisions of twl does not have MADC, instead they have different IP called GPADC which is not backward compatible. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Introduce retu-mfd driverAaro Koskinen2012-11-213-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retu is a multi-function device found on Nokia Internet Tablets implementing at least watchdog, RTC, headset detection and power button functionality. This patch implements minimum functionality providing register access, IRQ handling and power off functions. Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl6040: Remove duplicate inclusion of linux/err.hSachin Kamat2012-11-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | linux/err.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: wm5102: Make FLL NCO test registers readableMark Brown2012-11-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They contain documented status readback fields. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65217: Set PMIC to shutdown on PWR_EN toggleColin Foe-Parker2012-11-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set tps65217 PMIC status to OFF if power enable toggle is supported. By setting this bit to 1 to enter PMIC to OFF state when PWR_EN pin is pulled low. Also adds a DT flag to specify that device pmic supports shutdown control or not. Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com> [anilkumar@ti.com: move the additions to tps65217 MFD driver] Signed-off-by: AnilKumar Ch <anilkumar@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65090: Use regmap irq framework for interrupt supportLaxman Dewangan2012-11-211-165/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the regmap irq framework for implementing TPS65090 interrupt support in place of implementing it locally. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65090: Move register access APIs to headerLaxman Dewangan2012-11-211-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since tps65090 register is accessed via regmap, moving the register access APIs to header and making it as inline. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65090: Remove unused member of struct tps65090Laxman Dewangan2012-11-211-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused member from tps65090 data structure as these are not used. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65090: Add error prints when mem alloc failedLaxman Dewangan2012-11-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add error prints when memory allocation failed for tps65090 data. Also cleanups the melloc arguments. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Add battery charger in tps65090 sub devsLaxman Dewangan2012-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TPS65090 supports the battery charging and hence adding the device name in the list of TPS65090 children. Also remove the tps65090-regulator as it duplicates with tps65090-pmic for regulator driver. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Add TI TPS80031 mfd core driverLaxman Dewangan2012-11-213-0/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TPS80031/ TPS80032 Fully Integrated Power Management with Power Path and Battery Charger. The device provides five configurable step-down converters, 11 general purpose LDOs, USB OTG Module, ADC, RTC, 2 PWM, System Voltage Regulator/Battery Charger with Power Path from USB, 32K clock generator. Add the mfd core driver for TPS80031/TPS80032. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: wm5102: Mark some more status registers as volatileMark Brown2012-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: wm5102: Update maximum registerMark Brown2012-11-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DSP memories are mapped into the register map, make them readable and writable by updating max_register appropriately. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Add myself to copyrightDavide Ciminaghi2012-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Add scr (otp registers) platform driverDavide Ciminaghi2012-11-201-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Use one lock per device instead of one lock per mfdDavide Ciminaghi2012-11-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lock is used to implement atomic operations on each platform device's registers, so it looks reasonable having one lock per device instead of one common lock for all the devices belonging to the same sta2x11 instance. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Do not mind about gpio platform dataDavide Ciminaghi2012-11-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gpio platform driver will take care of its platform data, let's not do any checks here. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Only add sta2x11_mfd if it hasn't already been addedDavide Ciminaghi2012-11-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pci probe method is called twice now, so we have to call sta2x11_mfd_add() only once to avoid a -EBUSY error. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Use defines for platform devices' namesDavide Ciminaghi2012-11-201-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there are now many sta2x11-mfd platform devices, using defines for their names looks like a better solution. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Add sta2x11_mfd_get_regs_data() functionDavide Ciminaghi2012-11-201-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A couple of predefined clocks (mux and gated) need to be initialized with the virtual address of the clock's controlling register and the address of a spinlock used to protect against races. This function exports such data for all the mfd cells. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Add regmap supportDavide Ciminaghi2012-11-202-105/+130
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: sta2x11-mfd: Add apb-soc regs driver and factor out common codeDavide Ciminaghi2012-11-201-109/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A driver for the apb-soc registers is needed by the clock infrastructure code to configure and control clocks on the sta2x11 chip. Since some of the functions in sta2x11-mfd.c were almost identical for the two existing platform devices, the following changes have been performed to avoid further code duplication while adding the apb-soc-regs driver: * The sctl_regs and apbreg_regs fields in struct sta2x11_mfd have been turned into just one array of pointers accessed by device index. * Platform probe methods have become one-liners invoking a common probe with the device's index as second parameter. * For loops have been inserted where the same operations were performed for each of the two bars of a pci device. * The apbreg_mask and sctl_mask functions were almost identical, so they were turned into inline functions invoking a common __sta2x11_mfd_mask() with the platform device's index as last parameter. To do this, enum sta2x11_mfd_plat_dev has been declared in sta2x11-mfd.h and more device types have been added to it. Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | iio: adc: Add viperboard adc driverLars Poeschel2012-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the mfd cell to use the adc part of the Nano River Technologies viperboard. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | i2c: Add viperboard i2c master driverLars Poeschel2012-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the mfd cell to use the i2c part of the Nano River Technologies viperboard as i2c master. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | gpio: Add viperboard gpio driverLars Poeschel2012-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the mfd cell to use the gpio a and gpio b part of the Nano River Technologies viperboard. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Add viperboard driverLars Poeschel2012-11-203-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mfd driver for Nano River Technologies viperboard. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Only unregister platform devices allocated by the mfd coreCharles Keepax2012-11-201-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mfd_remove_devices would iterate over all devices sharing a parent with an mfd device regardless of whether they were allocated by the mfd core or not. This especially caused problems when the device structure was not contained within a platform_device, because to_platform_device is used on each device pointer. This patch defines a device_type for mfd devices and checks this is present from mfd_remove_devices_fn before processing the device. Cc: stable@vger.kernel.org Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Tested-by: Peter Tyser <ptyser@xes-inc.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: da9052: Introduce da9052-irq.cFabio Estevam2012-11-203-263/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a da9052-irq.c file so that it can handle interrupt related functions. This is useful for allowing the da9052 drivers to use such functions when dealing with da9052 interrupts. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: da9052-core: Use regmap_irq_get_virq() and fix the probeFabio Estevam2012-11-201-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a mx53qsb dt-kernel the da9052-core driver fails to probe as follows: da9052 1-0048: DA9052 ADC IRQ failed ret=-22 The reason for the error was due to passing only the offset as the interrupt number in request_threaded_irq() without da9052->irq_base. The recommended approach though is to use regmap_get_virq() to acquire the interrupt number and this allows to get rid of da9052->irq_base. Fix it and allow the driver to probe successfully. Also provide a few more error logs and change the irq string to "adc-irq", so that it appears as a single word in 'cat /proc/interrupts' Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65910: Pass irq_domain when adding mfd sub devicesLaxman Dewangan2012-11-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding the sub device "tps65910-rtc", is it passed the IO resource IRQ for the interrupt number. This interrupt needs to map in the device irq domain. Pass the irq domain of device in mfd_add_devices() so that proper irq mapping can be done when adding the sub device RTC. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65910: Move interrupt implementation code to mfd fileLaxman Dewangan2012-11-203-244/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In place of implementing the irq support in separate file, moving implementation to main mfd file. The irq files only contains the table and init steps only and does not need extra file to have this only for this purpose. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65910: Use regmap irq framework for interrupt supportLaxman Dewangan2012-11-201-196/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement irq support of tps65910 with regmap irq framework in place of implementing locally. This reduces the code size significantly and easy to maintain. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: tps65910: Initialize mfd devices after all initialization doneLaxman Dewangan2012-11-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add sub devices of tps65910 after all initialization like interrupt, clock etc. is done. This will make sure that require data gets initialized properly before sub devices probe's get called. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Add irq io-resource for tps6586x rtc sub driverLaxman Dewangan2012-11-131-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add IRQ IORESOURCE for rtc sub driver of this device. The rtc driver can get the irq by calling platform_get_irq(). Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Convert tps6586x to irq_domainLaxman Dewangan2012-11-131-25/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate the irq base if it base is not porvided i.e. in case of device tree invocation of this driver. Convert the tps6586x driver to irq domain, using a legacy IRQ mapping if an irq_base is specified in platform data or dynamically allocated and otherwise using a linear mapping. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl6040: Rename the core driverPeter Ujfalusi2012-11-132-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the regmap_irq conversion there is no need to call the driver as twl6040-core.c since there is only one c file remained. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl6040: Convert to use regmap_irqPeter Ujfalusi2012-11-134-223/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With regmap_irq it is possible to remove the twl6040-irq.c file and simplify the code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl6040: Correct Ready and Thermal interrupt handlingPeter Ujfalusi2012-11-131-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create new irq handler for thermal events in order to be able to handle the event and clean up the code regarding to interrupt handling: Use proper function names for the irq handlers No need to read the INTD register anymore. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl6040: Restructure power up and down codePeter Ujfalusi2012-11-131-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rearrange the code path for power up and down sequence. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl6040: Remove unused parameter for twl6040_power_up_completion()Peter Ujfalusi2012-11-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | naudint parameter has not been used, remove it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: twl6040: Fix typo for power on failurePeter Ujfalusi2012-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix old copy paste bug: automatic power-down failed -> automatic power-up failed Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Differentiate between u8500 and u9540 TCDM address mappingLee Jones2012-11-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TCDM mappings are quite different from u8500 to u9540. If these aren't correctly specified for a given board, it will fail to boot. Here we add the correct TCDM base for the u9540. Please note that although this patch allows us to boot the u9540, it doesn't provide us with full enablement. For that, another patch-set will follow which completely re-vamps the way the PRCMU is passed TCDM mappings. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: ab8500-core: Use devm_* memory/IRQ and allocation/free routinesLee Jones2012-11-111-38/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is better to use devm_* calls, as they allow for easier and more automatic clean-up. Resources are device allocated, so when a device is freed, so are all associated resources. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Enable the STMPE MFD for Device TreeLee Jones2012-11-111-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the STMPE Multi-Functional Device to be correctly initialised when booting with Device Tree support enabled. Its children are specified by the addition of subordinate devices to the STMPE node in the Device Tree file. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Correct copy and paste mistake in stmpeLee Jones2012-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When specifying IRQ numbers for the stmpe1601, IRQ defines for the stmpe24xx were used instead. Fortunately, the defined numbers are the same, hence why it survived testing. This fix is merely an aesthetic one. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Provide the STMPE driver with its own IRQ domainLee Jones2012-11-111-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The STMPE driver is yet another IRQ controller which requires its own IRQ domain. So, we provide it with one. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Prevent STMPE from abusing mfd_add_devices' irq_base parameterLee Jones2012-11-111-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally IRQ incrementers were provided in some template resource structures for keypad and touchscreen devices. These were passed as IORESOURCE_IRQs to MFD core in the usual way. The true device IRQs were instead added to the irq_base when mfd_add_devices was invoked. This is clearly an abuse of the call, and does not scale when IRQ Domains are brought into play. Before we can provide the STMPE with its own IRQ Domain we must first fix this. This patche keeps most of the driver's structure, keeping the template strategy. However, instead of providing the IRQ as an increment to irq_base, we dynamically populate the IORESOURCE_IRQ with the correct device IRQ. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: ab8500-core: Remove unused ab8500-gpio IRQ rangesLee Jones2012-11-111-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IRQ ranges provided in ab8500-core to be passed on to the ab8500-gpio driver are not only redundant, but they are also causing a warning in the boot log. These IRQ ranges, like any other MFD related IRQ resource are passed though MFD core for automatic conversion to virtual IRQs; however, MFD core does not support IRQ mapping of IRQ ranges. Let's just remove them. Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | mfd: Explicitely include slab.h to rtsxSamuel Ortiz2012-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following build error on some architectures (parisc at least): drivers/mfd/rtsx_pcr.c: In function 'rtsx_pci_init_chip': drivers/mfd/rtsx_pcr.c:985:2: error: implicit declaration of function 'kcalloc' [-Werror=implicit-function-declaration] drivers/mfd/rtsx_pcr.c:985:13: warning: assignment makes pointer from integer without a cast [enabled by default] Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
OpenPOWER on IntegriCloud