aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-04-08mfd: da903x: Use devm_*() functionsJingoo Han1-13/+6
Use devm_*() functions to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: ezx-pcap: Use devm_*() functionsJingoo Han1-10/+7
Use devm_*() functions to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: twl6040: Use devm_*() functionsJingoo Han1-20/+11
Use devm_*() functions to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: aat2870: Use use devm_*() functionsJingoo Han1-14/+6
Use devm_*() functions to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: omap-usb-host: Use devm_gpio_request_one()Jingoo Han1-21/+2
Use devm_gpio_request_one() to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: intel_msic: Use devm_gpio_request_one()Jingoo Han1-8/+2
Use devm_gpio_request_one() to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: lm3533: Use devm_gpio_request_one()Jingoo Han1-6/+2
Use devm_gpio_request_one() to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: 88pm860x: Drop devm_kfree of devm_kzalloc'd dataJingoo Han1-9/+3
devm_kfree() allocates memory that is released when a driver detaches. Thus, there is no reason to explicitly call devm_kfree() in probe or remove functions. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: adp5520: Restore mode bits on resumeLars-Peter Clausen1-2/+6
The adp5520 unfortunately also clears the BL_EN bit when the nSTNDBY bit is cleared. So we need to make sure to restore it during resume if it was set before suspend. Cc: stable@vger.kernel.org Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08Merge tag 'ux500-multiplatform-mfd' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericssonSamuel Ortiz2-279/+241
MFD portions of the ux500 multiplatform branch. A second tag for the ARM SoC tree will build upon this one. This mainly removes the header file dependencies from the PRCMU driver in the MFD subsystem, and moves the PM functions to the machine. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversionPali Rohár1-4/+10
Driver twl4030-madc has hardcoded channel types (10 - battery current, 1 - battery temperature) and also conversation data in variable twl4030_divider_ratios. These hardcoded channels are incorrect for Nokia RX-51 board (where is channel 0 - battery temperature). For Nokia RX-51 there is rx51_battery power_supply driver which reporting battery information via twl4030_madc_conversion. But this driver needs raw values (not converted via some hardcoded functions). So this patch adding new parameter "raw" to struct twl4030_madc_request which tell twl4030-madc driver to not convert values, but rather return raw. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Reviewed-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: wm5102: Don't wait for boot when boot sequencer is disabledCharles Keepax1-4/+18
As we are using a custom boot sequence we don't need to wait for the standard boot sequence in device init when the normal write sequence is disabled. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Wait for internal clocks to startup after resetCharles Keepax1-1/+5
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Hold device in reset while ramping suppliesMark Brown1-13/+13
Acquire the /RESET GPIO before we enable regulators and hold the device in reset while the regulators power up in order to improve robustness during the initial power up. Also fix the error path so that the device is left in reset while we're at it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: wm5102: Update defaults to match patchCharles Keepax1-5/+5
Registers which have defaults and are updated by the patch file should have their defaults updated to match the value set by the patch file, otherwise incorrect values will be read from the cache. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: wm5102: Deactivate standard boot sequenceCharles Keepax1-5/+5
This patch deactivates the standard, currently noop, boot sequence because we now have facilities in place for running a custom boot sequence. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Add a hardware patch mechanismCharles Keepax1-0/+109
This patch adds facilities for apply a register patch contained within the chip using the write sequencer. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Factor out register pollingCharles Keepax1-22/+30
Factor out the polling of the interrupt status register whilst we wait for boot done to allow the polling to be reused in other situations. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: wm5102: Manually apply register patchCharles Keepax2-6/+35
Future updates will require us to manually apply the register patch for wm5102. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: wm5102: Only use the lowest three bits of device revisionMark Brown1-0/+1
Only the lowest three bits contain device revision for WM5102, the high bits have been repurposed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Unconditionally enable 32kHz clockMark Brown1-0/+1
If we have a directly provided 32kHz clock unconditionally enable it, substantial chip functionality relies on it so dynamic management is not worthwhile. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Fully support the use of MCLK1 as the 32kHz clock sourceMark Brown1-2/+19
MCLK1 is not in the AoD power domain so if it is used as the 32kHz clock source we need to hold a runtime PM reference to keep the device from going into low power mode. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: wm5102: Update patch for latest evaluationMark Brown1-5/+10
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Support configuring MICBIASes into bypass modeMark Brown1-1/+11
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Try to use interrupt flags from interrupt controllerMark Brown1-2/+25
If no irq_flags are passed in platform data then query the interrupt controller for the trigger type and try to use that. This provides default operation with a wider range of hardware and will be needed for device tree support where the interrupt flags are configured on the interrupt controller. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Allow GPIO to be specified for IRQ lineMark Brown1-13/+53
If a GPIO is specified for the chip IRQ line then request it. This improves support for systems that do not put pins into input mode when used as interrupts. Also use this GPIO when the primary IRQ is in edge triggered mode to detect if we have handled pending interrupts in order to improve robustness. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Basic support for edge triggered IRQsMark Brown1-5/+7
Allow the user to configure edge triggered IRQs, though we do not yet fully handle new interrupts occurring while an interrupt is being handled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Clarify error message for failed primary IRQ requestMark Brown1-1/+1
regmap has a very similar looking error, help identify where the error comes from by changing the error message. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Clean up on failed runtime resumeMark Brown1-4/+7
Make sure that we don't leave the device enabled needlessly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: arizona: Disable all wake sources by defaultMark Brown1-0/+3
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08ARM: ux500: split out prcmu initializationArnd Bergmann1-29/+111
This untangles the final bits of the prcmu code from the platform code: * The IRQ_PRCMU_* definitions move from irqs-db8500.h into prcmu.c because they are only of local significance. * u8500_thsens_device goes into the prcmu, because it uses a PRCMU IRQ that the platform does not see. * IRQ_DB8500_AB8500 and IRQ_PRCMU_BASE go into the platform data because the PRCMU does not see it. Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> [Fixed a oneliner bug] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-08mfd: db8500-prcmu: drop unused includesLinus Walleij1-2/+0
These two <mach/*> includes are no longer used in the PRCMU driver, so drop them. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-08ARM: ux500: move PM-related PRCMU functions to machineLinus Walleij2-136/+0
We are trying to decompose and decentralize the code in the DB8500 PRCMU out into subdrivers. The code moved in this patch concerns a group of functions used for decoupling and recoupling the IRQs from the GIC. During sleep and idle the Ux500 system will transfer all IRQ handling to the PRCMU using these functions. Basically we are left with the two alternatives of code placement as: - arch/arm/mach-ux500/pm.c - this because the code is closely related to the GIC, and takes ownership of some of the registers from the PRCMU related to this PM functionality. - drivers/mfd/db8500-prcmu-pm.c - because the code is affecting stuff in the PRCMU register range. But then this code needs to remap and handle GIC registers. This patch implementation is taking the first approach. Currently the cpuidle driver is the only piece of code using this set of functions, but it will later also be used by the suspend/resume code which is currently under review. The header file is moved to: <linux/platform_data/arm-ux500-pm.h> The function prototypes need to be placed in a globally visible header since the CPUidle code is planned to move out to drivers/cpuidle. Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-08mfd: db8500-prcmu: get base address from resourceLinus Walleij2-124/+131
We cannot use a global variable stored in <mach/hardware.h> to find the base address of the PRCMU. The real resource is already there from the board, so use this to look up the base address instead. Currently the patch is kept minimal so as not to interfere with other work being done on refactoring this driver, but at a later point the defines using (prcmu_base + 0xnnn) need to be replaced by pure offset defined for (0xnnn) and the base inlined with the readl()/writel() and similar codepaths. Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-08mfd: prcmu: pass a base and size with the early initcallLinus Walleij1-1/+12
This patch will make an early remapping of the PRCMU, to be used when setting up the clocks, that will call down into parts of the PRCMU driver before it is probed. Going forward this will be removed like this: - The mailbox subsystem need to be merged. http://marc.info/?l=linux-kernel&m=136314559201983&w=2 - At this point the PRCMU clock code can be moved over to the ux500 clock driver in drivers/clk/ux500/* and maintained there in a decentralized manner. - This early initcall and PRCMU base parameters become part of the ux500_clk_init() call instead. Cc: Suman Anna <s-anna@ti.com> Cc: Loic Pallardy <loic.pallardy@st.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-08mfd: wm8994: Silence bogus warning in wm8994_device_init()Jingoo Han1-1/+1
'patch_regs' cannot be used uninitialized in wm8994_device_init(), because 'patch_regs' was already guarded by 'regmap_patch'. Thus, that's a bogus warning. Without this patch, the build warning happens as below: drivers/mfd/wm8994-core.c: In function 'wm8994_i2c_probe': drivers/mfd/wm8994-core.c:595:7: warning: 'patch_regs' may be used uninitialized in this function [-Wuninitialized] drivers/mfd/wm8994-core.c:408:14: note: 'patch_regs' was declared here Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: max77686: Use NULL instead of 0Sachin Kamat1-1/+1
'data' is a pointer and hence use NULL instead of 0. Silences the following warning: drivers/mfd/max77686.c:49:50: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08mfd: adp5520: Use module_i2c_driver()Sachin Kamat1-11/+1
module_i2c_driver() removes some boilerplate and makes the code simple. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08Merge branch 'for-mfd-and-power' of git://git.linaro.org/people/ljones/linux-3.0-ux500Samuel Ortiz4-394/+2548
Conflicts: drivers/mfd/ab8500-gpadc.c Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05MFD: rtsx_pcr: Fix probe fail pathJiri Slaby1-2/+4
When rtsx_pci_acquire_irq fails in rtsx_pci_probe, we forget to disable an MSI (if we enabled it). This results in this warning on the next attempt to load the module: WARNING: at drivers/pci/msi.c:834 pci_enable_msi_block+0x2a4/0x2b0() Hardware name: HP EliteBook 840 G1 Modules linked in: rtsx_pci(+) ... Pid: 4056, comm: modprobe Tainted: G I 3.8.0-9405-gd895cb1-1-vanilla #1 Call Trace: [<ffffffff81045c6a>] warn_slowpath_common+0x7a/0xc0 [<ffffffff81045cc5>] warn_slowpath_null+0x15/0x20 [<ffffffff81302544>] pci_enable_msi_block+0x2a4/0x2b0 [<ffffffffa05e335a>] rtsx_pci_probe+0x55a/0x720 [rtsx_pci] ... So properly disable MSI in that case. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: abx500: Move the AB8500 Kconfig fragmentLinus Walleij1-7/+7
Move the AB8500 Kconfig fragment below the AB3100 so the menuconfig menu gets hierarchically nested and looks nice. Having the EZX PCAP in the middle disturbs the nice hierarchical layout from kconfig. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: davinci_voicecodec: use module_platform_driver_probe()Jingoo Han1-11/+1
This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: htc-pasic3: use module_platform_driver_probe()Jingoo Han1-12/+1
This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: ab3100-otp: use module_platform_driver_probe()Jingoo Han1-13/+1
This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: stmpe: DT: Add stmpe-i2c dt alias to get id deviceGabriel Fernandez1-1/+4
This patch augments the STMP driver to read the device id from the stmpe-i2c dt alias if present. Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: stmpe: DT: Enable no-irq mode configurationGabriel Fernandez1-0/+3
If there is no interrupt property into stmpe node then activate the no-irq mode by setting the irq value to -1. Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: syscon: Add non-DT supportAlexander Shiyan2-31/+45
This patch allow using syscon driver from the platform data, i.e. possibility using driver on systems without oftree support. For search syscon device from the client drivers, "syscon_regmap_lookup_by_pdevname" function was added. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: syscon: Removed unneeded field "dev" from private driver structureAlexander Shiyan1-4/+1
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: palmas: Change the DT node property names to follow the conventionJ Keerthy1-3/+3
DT node properties should not have "_". Replacing them by "-". Signed-off-by: J Keerthy <j-keerthy@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05mfd: as3711: Add OF supportGuennadi Liakhovetski1-4/+23
Add Flat Device Tree support to the AS3711 MFD driver. This patch just allows to bind the driver to I2C devices, instantiated from the DT. DT support for AS3711 cell drivers will be added in separate drivers. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>