aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/arizona-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06mfd: Constify struct mfd_cell where possibleGeert Uytterhoeven1-4/+4
As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting refcounting pointers in original mfd_cell arrays"), the "cell" parameter of mfd_add_devices() is "const" again. Hence make all cell data passed to mfd_add_devices() const where possible. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-11-15Merge tag 'mfd-3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-nextLinus Torvalds1-3/+3
Pull MFD updates from Samuel Ortiz: "For the 3.13 merge window we have a couple of new drivers for the AMS AS3722 PMIC and for STMicroelectronics STw481x PMIC. Although this is a smaller update than usual, we also have: - Device tree support for the max77693 driver - linux/of.h inclusion for all DT compatible MFD drivers, to avoid build breakage in the future - Support for Intel Wildcat Point-LP PCH through the lpc_ich driver - A small arizona update for new wm5110 DSP registers and a few fixes - A small palmas update as well, including an of_device table addition and a few minor fixes - Two small mfd-core changes, one including a memory leak fix for when mfd_add_device() fails - Our usual round of minor cleanups and janitorial fixes" * tag 'mfd-3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (63 commits) Documentation: mfd: Update s2mps11.txt mfd: pm8921: Potential NULL dereference in pm8921_remove() mfd: Fix memory leak in mfd_add_devices() mfd: Stop setting refcounting pointers in original mfd_cell arrays mfd: wm5110: Enable micd clamp functionality mfd: lpc_ich: Add Device IDs for Intel Wildcat Point-LP PCH mfd: max77693: Fix up bug of wrong interrupt number mfd: as3722: Don't export the regmap config mfd: twl6040: Remove obsolete cleanup for i2c clientdata mfd: tps65910: Remove warning during dt node parsing mfd: lpc_sch: Ignore resource conflicts when adding mfd cells mfd: ti_am335x_tscadc: Avoid possible deadlock of reg_lock mfd: syscon: Return -ENOSYS if CONFIG_MFD_SYSCON is not enabled mfd: Add support for ams AS3722 PMIC mfd: max77693: Include linux/of.h header mfd: tc3589x: Detect the precise version mfd: omap-usb: prepare/unprepare clock while enable/disable mfd: max77686: Include linux/of.h header mfd: max8907: Include linux/of.h header mfd: max8997: Include linux/of.h header ...
2013-10-23mfd: arizona: Correct handling of device tree gpio defaultsCharles Keepax1-1/+1
When setting GPIO defaults we are required to make a distinction between writing 0x0000 to the registers and leaving them untouched. When we receive between 0x0000 and 0xFFFF (inclusive) from either Platform Data or Device Tree, we should write the provided configuration to the device. Conversely, when we receive >0xFFFF we should leave the device configuration at its default setting. This patch fixes a bug and ensures that configuration 0x0000 isn't mistakenly written when the intention was to keep the default one. Reported-by: Heather Lomond <heather.lomond@wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-10-23mfd: arizona: Only attempt to parse DT if platform data was not passedLee Jones1-2/+2
If platform data is passed when probing the device then it should take precedence over Device Tree. This patch saves cycles in the pdata case and prevents error messages when DT is not passed. Reported-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-10-23mfd: arizona: Specify supply mappings for Arizona CODECsCharles Keepax1-3/+29
The CODEC power supplies should be looked up on the Arizona device as they will be created here by device tree also update the only user of non-device tree bindings. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14mfd: arizona: Move regulator disable to after marking cache onlyCharles Keepax1-1/+1
If we disable DCVDD before we mark the cache as cache only, we might attempt to write to the chip whilst it is powered down and lose a write. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-18mfd: arizona: Integrate wm8997 into Arizona mfdCharles Keepax1-0/+27
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform. This patch integrates the wm8997 into the Arizona mfd. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-05-21mfd: arizona: Change fast_start pdata name to better reflect functionalityCharles Keepax1-1/+1
The bit in the register enables MICBIAS fast startup when clear not when set. This patch changes the name of this pdata option to soft_start to better match the functionality. We rename rather than invert the handling to keep the same default functionality, which is fast start active. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20mfd: arizona: Support use of external DCVDDMark Brown1-0/+43
When the device is used with an external DCVDD supply instead of the internal LDO1 then an extra step is required when suspending and resuming the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20mfd: Add device tree bindings for Arizona class devicesMark Brown1-0/+69
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-17mfd: arizona: Disable interrupts during suspendMark Brown1-1/+22
We aren't able to handle interrupts after the device has suspended since we need to runtime resume it in order to do so but the controller may not be available any more. Handle this in the same way as we handle a similar issue on resume. Reported-by: Chuansheng Liu <chuansheng.liu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-17mfd: arizona: Add missing cleanup on removeMark Brown1-0/+5
We'd forgotten to disable /RESET or the regulators. Practically speaking this code is unlikely to ever be run. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-17mfd: wm5102: Manually apply register patchCharles Keepax1-0/+12
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>
2013-05-17mfd: arizona: Read the device identification information after bootMark Brown1-31/+49
Future devices may not fully report the device identification information until their boot sequence is complete so defer acting on these until that has finished. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.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: 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 Keepax1-0/+10
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: 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: 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-02-14mfd: arizona: Provide platform data for MICBIAS configurationMark Brown1-0/+23
Allow the MICBIAS voltages and other attributes to be configured by the platform. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-02-14mfd: arizona: Clarify mixer underclocking errorMark Brown1-1/+1
If the mixer is underclocked it will drop a sample so log that error more directly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-02-14mfd: arizona: Disable interrupts during resumeMark Brown1-0/+26
Runtime power management does not function during system suspend but the Arizona devices need to use runtime power management to power up the device in order to handle interrupts. Try to avoid interrupts firing during resume by disabling the primary IRQ before interrupts are reenabled on resume and only reenabling it again during main resume. The goal is to avoid issues in the situation where an interrupt is asserted during resume (eg, due to it being the wake source) and the interrupt handling gets scheduled prior to the device being able to handle runtime PM. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-02-14mfd: arizona: Register MICVDD supply first to ensure no retriesMark Brown1-2/+2
Not strictly required as probe deferral will take care of everything but it makes boot a little smoother. Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-22mfd: arizona: Check errors from regcache_sync()Mark Brown1-1/+6
If the control bus is unrelabile we may hit errors during regcache_sync(), especially given that it tends to be one the most dense bursts of I/O in many systems. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-12-16Merge tag 'mfd-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6Linus Torvalds1-5/+12
Pull MFS update from Samuel Ortiz: "This is the MFD patch set for the 3.8 merge window. We have several new drivers, most of the time coming with their sub devices drivers: - Austria Microsystem's AS3711 - Nano River's viperboard - TI's TPS80031, AM335x TS/ADC, - Realtek's MMC/memstick card reader - Nokia's retu We also got some notable cleanups and improvements: - tps6586x got converted to IRQ domains. - tps65910 and tps65090 moved to the regmap IRQ API. - STMPE is now Device Tree aware. - A general twl6040 and twl-core cleanup, with moves to the regmap I/O and IRQ APIs and a conversion to the recently added PWM framework. - sta2x11 gained regmap support. Then the rest is mostly tiny cleanups and fixes, among which we have Mark's wm5xxx and wm8xxx patchset." Far amount of annoying but largely trivial conflicts. Many due to __devinit/exit removal, others due to one or two of the new drivers also having come in through another tree. * tag 'mfd-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (119 commits) mfd: tps6507x: Convert to devm_kzalloc mfd: stmpe: Update DT support for stmpe driver mfd: wm5102: Add readback of DSP status 3 register mfd: arizona: Log if we fail to create the primary IRQ domain mfd: tps80031: MFD_TPS80031 needs to select REGMAP_IRQ mfd: tps80031: Add terminating entry for tps80031_id_table mfd: sta2x11: Fix potential NULL pointer dereference in __sta2x11_mfd_mask() mfd: wm5102: Add tuning for revision B mfd: arizona: Defer patch initialistation until after first device boot mfd: tps65910: Fix wrong ack_base register mfd: tps65910: Remove unused data mfd: stmpe: Get rid of irq_invert_polarity mfd: ab8500-core: Fix invalid free of devm_ allocated data mfd: wm5102: Mark DSP memory regions as volatile mfd: wm5102: Correct default for LDO1_CONTROL_2 mfd: arizona: Register haptics devices mfd: wm8994: Make current device behaviour the default mfd: tps65090: MFD_TPS65090 needs to select REGMAP_IRQ mfd: Fix stmpe.c build when OF is not enabled mfd: jz4740-adc: Use devm_kzalloc ...
2012-12-13Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/soundLinus Torvalds1-0/+2
Pull sound updates from Takashi Iwai: "This update contains a fairly wide range of changes all over in sound subdirectory, mainly because of UAPI header moves by David and __dev* annotation removals by Bill. Other highlights are: - Introduced the support for wallclock timestamps in ALSA PCM core - Add the poll loop implementation for HD-audio jack detection - Yet more VGA-switcheroo fixes for HD-audio - New VIA HD-audio codec support - More fixes on resource management in USB audio and MIDI drivers - More quirks for USB-audio ASUS Xonar U3, Reloop Play, Focusrite, Roland VG-99, etc - Add support for FastTrack C400 usb-audio - Clean ups in many drivers regarding firmware loading - Add PSC724 Ultiimate Edge support to ice1712 - A few hdspm driver updates - New Stanton SCS.1d/1m FireWire driver - Standardisation of the logging in ASoC codes - DT and dmaengine support for ASoC Atmel - Support for Wolfson ADSP cores - New drivers for Freescale/iVeia P1022 and Maxim MAX98090 - Lots of other ASoC driver fixes and developments" Fix up trivial conflicts. And go out on a limb and assume the dts file 'status' field of one of the conflicting things was supposed to be "disabled", not "disable" like in pretty much all other cases. * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (341 commits) ALSA: hda - Move runtime PM check to runtime_idle callback ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522 ALSA: hda - Avoid doubly suspend after vga switcheroo ALSA: usb-audio: Enable S/PDIF on the ASUS Xonar U3 ALSA: hda - Check validity of CORB/RIRB WP reads ALSA: hda - use usleep_range in link reset and change timeout check ALSA: HDA: VIA: Add support for codec VT1808. ALSA: HDA: VIA Add support for codec VT1705CF. ASoC: codecs: remove __dev* attributes ASoC: utils: remove __dev* attributes ASoC: ux500: remove __dev* attributes ASoC: txx9: remove __dev* attributes ASoC: tegra: remove __dev* attributes ASoC: spear: remove __dev* attributes ASoC: sh: remove __dev* attributes ASoC: s6000: remove __dev* attributes ASoC: OMAP: remove __dev* attributes ASoC: nuc900: remove __dev* attributes ASoC: mxs: remove __dev* attributes ASoC: kirkwood: remove __dev* attributes ...
2012-12-11Merge tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds1-2/+2
Pull driver core updates from Greg Kroah-Hartman: "Here's the large driver core updates for 3.8-rc1. The biggest thing here is the various __dev* marking removals. This is going to be a pain for the merge with different subsystem trees, I know, but all of the patches included here have been ACKed by their various subsystem maintainers, as they wanted them to go through here. If this is too much of a pain, I can pull all of them out of this tree and just send you one with the other fixes/updates and then, after 3.8-rc1 is out, do the rest of the removals to ensure we catch them all, it's up to you. The merges should all be trivial, and Stephen has been doing them all in linux-next for a few weeks now quite easily. Other than the __dev* marking removals, there's nothing major here, some firmware loading updates and other minor things in the driver core. All of these have (much to Stephen's annoyance), been in linux-next for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio update. * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits) modpost.c: Stop checking __dev* section mismatches init.h: Remove __dev* sections from the kernel acpi: remove use of __devinit PCI: Remove __dev* markings PCI: Always build setup-bus when PCI is enabled PCI: Move pci_uevent into pci-driver.c PCI: Remove CONFIG_HOTPLUG ifdefs unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs sh/PCI: Remove CONFIG_HOTPLUG ifdefs powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs mips/PCI: Remove CONFIG_HOTPLUG ifdefs microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs dma: remove use of __devinit dma: remove use of __devexit_p firewire: remove use of __devinitdata firewire: remove use of __devinit leds: remove use of __devexit leds: remove use of __devinit leds: remove use of __devexit_p mmc: remove use of __devexit ...
2012-12-03mfd: arizona: Defer patch initialistation until after first device bootMark Brown1-5/+12
Make sure that we don't race with the initial device boot by only doing the initialisation after we've waited for the boot to complete. The runtime PM code already waits for the boot to complete before it syncs the register patches so in most systems if a race does occur we will power down very soon afterwards and recover anyway. Reported-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>
2012-11-30mfd: arizona: Register haptics devicesMark Brown1-0/+2
Both WM5102 and WM5110 support haptics, register the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-28mfd: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28mfd: remove use of __devinitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28mfd: arizona: Register haptics devicesMark Brown1-0/+2
Both WM5102 and WM5110 support haptics, register the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20mfd: arizona: Sync regcache after resetCharles Keepax1-0/+8
In the absence of a physical reset line the chip is reset by writing the first register, which is done after the register patch has been applied. This patch synchronises the register cache after the reset to preserve any register changes that had been applied. 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>
2012-11-20mfd: arizona: Correctly report when AIF2/AIF1 is underclockedCharles Keepax1-2/+2
In the interrupt handler for an underclocked event, whilst checking for the source of the interrupt, AIF3 was checked twice and AIF1 was not checked. This change correctly checks the AIF1 underclocked bit and reports the correct error messages for all cases. 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>
2012-11-20mfd: arizona: Use correct array for ARRAY_SIZE in mfd_add_devices callCharles Keepax1-1/+1
wm5102_devs array was used for ARRAY_SIZE whilst adding the wm5110 devices. This change corrects this to get the size from the wm5110_devs array. As both arrays are the same size no issues should have been caused by this bug. 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>
2012-09-15mfd: core: Push irqdomain mapping out into devicesMark Brown1-3/+3
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>
2012-07-25mfd: Add debug trace on entering and leaving arizone runtime suspendMark Brown1-0/+4
There doesn't appear to be any useful diagnostic information from the core. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16mfd: Initial support for the WM5110Mark Brown1-0/+24
The WM5110 is a highly-integrated low-power audio system for smartphones, tablets and other portable audio devices. It combines an advanced DSP feature set with a flexible, high-performance audio hub CODEC. The support is based on the Arizona core driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-10mfd: Add support for multiple arizona PDM speaker outputsMark Brown1-3/+2
The registers have stride 2 so we can write the loop properly now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Error out if initial arizona boot failsMark Brown1-1/+5
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Don't free unallocated arizona supplies on errorMark Brown1-1/+1
ARRAY_SIZE() may be larger than the number of supplies actually used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Add missing WM5102 ifdefsMark Brown1-1/+2
References to the WM5102 tables need to be guarded. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Treat arizona register read errors as non-fatal during resumeMark Brown1-1/+1
We're testing for a specific value and while SPI does not detect I/O errors I2C can. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>