summaryrefslogtreecommitdiff
path: root/drivers/mfd/arizona-core.c
AgeCommit message (Collapse)Author
2015-09-04Merge tag 'sound-4.3-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "There are little changes in core part, but lots of development are found in drivers, especially ASoC. The diffstat shows regmap-related changes for a slight API additions / changes, and that's all. Looking at the code size statistics, the most significant addition is for Intel Skylake. (Note that SKL support is still underway, the codec driver is missing.) Also STI controller driver is a major addition as well as a few new codec drivers. In HD-audio side, there are fewer changes than the past. The noticeable change is the support of ELD notification from i915 graphics driver. Thus this pull request carries a few changes in drm/i915. Other than that, USB-audio got a rewrite of runtime PM code. It was initiated by lockdep warning, but resulted in a good cleanup in the end. Below are the highlights: Common: - Factoring out of AC'97 reset code from ASoC into the core helper - A few regmap API extensions (in case it's not pulled yet) ASoC: - New drivers for Cirrus CS4349, GTM601, InvenSense ICS43432, Realtek RT298 and ST STI controllers - Machine drivers for Rockchip systems with MAX98090 and RT5645 and RT5650 - Initial driver support for Intel Skylake devices - Lots of rsnd cleanup and enhancements - A few DAPM fixes and cleanups - A large number of cleanups in various drivers (conversion and standardized to regmap, component) mostly by Lars-Peter and Axel HD-audio: - Extended HD-audio core for Intel Skylake controller support - Quirks for Dell headsets, Alienware 15 - Clean up of pin-based quirk tables for Realtek codecs - ELD notifier implenetation for Intel HDMI/DP USB-audio: - Refactor runtime PM code to make lockdep happier" * tag 'sound-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (411 commits) drm/i915: Add locks around audio component bind/unbind drm/i915: Drop port_mst_index parameter from pin/eld callback ALSA: hda - Fix missing inline for dummy snd_hdac_set_codec_wakeup() ALSA: hda - Wake the codec up on pin/ELD notify events ALSA: hda - allow codecs to access the i915 pin/ELD callback drm/i915: Call audio pin/ELD notify function drm/i915: Add audio pin sense / ELD callback ASoC: zx296702-i2s: Fix resource leak when unload module ASoC: sti_uniperif: Ensure component is unregistered when unload module ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource ASoC: sh: dma-sh7760: Convert to devm_snd_soc_register_platform ASoC: spear_pcm: Use devm_snd_dmaengine_pcm_register to fix resource leak ALSA: fireworks/bebob/dice/oxfw: fix substreams counting at vmalloc failure ASoC: Clean up docbook warnings ASoC: txx9: Convert to devm_snd_soc_register_platform ASoC: pxa: Convert to devm_snd_soc_register_platform ASoC: nuc900: Convert to devm_snd_soc_register_platform ASoC: blackfin: Convert to devm_snd_soc_register_platform ASoC: au1x: Convert to devm_snd_soc_register_platform ASoC: qcom: Constify asoc_qcom_lpass_cpu_dai_ops ...
2015-09-04Merge tag 'mfd-for-linus-4.3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - New Clocksource driver from ST - New MFD/ACPI/DMA drivers for Intel's Sunrisepoint PCH based platforms - Add support for Arizona WM8998 and WM1814 - Add support for Dialog Semi DA9062 and DA9063 - Add support for Kontron COMe-bBL6 and COMe-cBW6 - Add support for X-Powers AXP152 - Add support for Atmel, many - Add support for STMPE, many - Add support for USB in X-Powers AXP22X Core Frameworks: - New Base API to traverse devices and their children in reverse order Bug Fixes: - Fix race between runtime-suspend and IRQs - Obtain platform data form more reliable source Fix-ups: - Constifying things - Variable signage changes - Kconfig depends|selects changes - Make use of BIT() macro - Do not supply .owner attribute in *_driver structures - MAINTAINERS entries - Stop using set_irq_flags() - Start using irq_set_chained_handler_and_data() - Export DT device ID structures" * tag 'mfd-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (69 commits) mfd: jz4740-adc: Init mask cache in generic IRQ chip mfd: cros_ec: spi: Add OF match table mfd: stmpe: Add OF match table mfd: max77686: Split out regulator part from the DT binding mfd: Add DT binding for Maxim MAX77802 IC mfd: max77686: Use a generic name for the PMIC node in the example mfd: max77686: Don't suggest in binding to use a deprecated property mfd: Add MFD_CROS_EC dependencies mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers mfd: axp20x: Add a cell for the usb power_supply part of the axp20x PMICs mfd: axp20x: Add missing registers, and mark more registers volatile mfd: arizona: Fixup some formatting/white space errors mfd: wm8994: Fix NULL pointer exception on missing pdata of: Add vendor prefix for Nuvoton mfd: mt6397: Implement wake handler and suspend/resume to handle wake up event mfd: atmel-hlcdc: Add support for new SoCs mfd: Export OF module alias information in missing drivers mfd: stw481x: Export I2C module alias information mfd: da9062: Support for the DA9063 OnKey in the DA9062 core mfd: max899x: Avoid redundant irq_data lookup ...
2015-08-30Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', ↵Mark Brown
'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
2015-08-12mfd: arizona: Fixup some formatting/white space errorsCharles Keepax
Clear out a few checkpatch warnings and white space errors. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-08-11mfd: arizona: Add support for WM8998 and WM1814Richard Fitzgerald
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-08-11mfd: arizona: Fix race between runtime suspend and IRQsCharles Keepax
The function arizona_irq_thread (the threaded handler for the arizona IRQs) calls pm_runtime_get_sync at the start to ensure that the chip is active as we handle the IRQ. If the chip is part way through a runtime suspend when an IRQ arrives the PM core will wait for the suspend to complete, before resuming. However, since commit 4f0216409f7c ("mfd: arizona: Add better support for system suspend") the runtime suspend function may call disable_irq, if the chip is going to fully power off, which will try to wait for any outstanding IRQs to complete. This results in deadlock as the IRQ thread is waiting for the PM operation to complete and the PM thread is waiting for the IRQ to complete. To avoid this situation we use disable_irq_nosync, which allows the suspending thread to finish the suspend without waiting for the IRQ to complete. This is safe because if an IRQ is being processed it can only be blocked at the pm_runtime_get_sync at the start of the handler otherwise it wouldn't be possible to suspend. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-07-24mfd: arizona: Fix initialisation of the PM runtimeCharles Keepax
The PM runtime core by default assumes a chip is suspended when runtime PM is enabled. Currently the arizona driver enables runtime PM when the chip is fully active and then disables the DCVDD regulator at the end of arizona_dev_init. This however has several problems, firstly the if we reach the end of arizona_dev_init, we did not properly follow all the proceedures for shutting down the chip, and most notably we never marked the chip as cache only so any writes occurring between then and the next PM runtime resume will be lost. Secondly, if we are already resumed when we reach the end of dev_init, then at best we get unbalanced regulator enable/disables at work we lose DCVDD whilst we need it. Additionally, since the commit 4f0216409f7c ("mfd: arizona: Add better support for system suspend"), the PM runtime operations may disable/enable the IRQ, so the IRQs must now be enabled before we call any PM operations. This patch adds a call to pm_runtime_set_active to inform the PM core that the device is starting up active and moves the PM enabling to around the IRQ initialisation to avoid any PM callbacks happening until the IRQs are initialised. Cc: stable@vger.kernel.org # v3.5+ Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-07-24mfd: arizona: Fix race between runtime suspend and IRQsCharles Keepax
The function arizona_irq_thread (the threaded handler for the arizona IRQs) calls pm_runtime_get_sync at the start to ensure that the chip is active as we handle the IRQ. If the chip is part way through a runtime suspend when an IRQ arrives the PM core will wait for the suspend to complete, before resuming. However, since commit 4f0216409f7c ("mfd: arizona: Add better support for system suspend") the runtime suspend function may call disable_irq, if the chip is going to fully power off, which will try to wait for any outstanding IRQs to complete. This results in deadlock as the IRQ thread is waiting for the PM operation to complete and the PM thread is waiting for the IRQ to complete. To avoid this situation we use disable_irq_nosync, which allows the suspending thread to finish the suspend without waiting for the IRQ to complete. This is safe because if an IRQ is being processed it can only be blocked at the pm_runtime_get_sync at the start of the handler otherwise it wouldn't be possible to suspend. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-07-16regmap: Use reg_sequence for multi_reg_write / register_patchNariman Poushin
Separate the functionality using sequences of register writes from the functions that take register defaults. This change renames the arguments in order to support the extension of reg_sequence to take an optional delay to be applied after any given register in a sequence is written. This avoids adding an int to all register defaults, which could substantially increase memory usage for regmaps with large default tables. This also updates all the clients of multi_reg_write/register_patch. Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-22mfd: arizona: Split INx_MODE into two fieldsRichard Fitzgerald
Later arizona silicon has the single/differential selector in a different register, and IN1_MODE only selects between analogue or digital. Prepare for this by splitting the INx_MODE definition into two fields. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: wm5110: Add delay before releasing reset lineCharles Keepax
On the wm5110 it is important the reset line is held for slightly longer to ensure the device starts up well. This patch adds a 5mS delay for this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: arizona: Add better support for system suspendCharles Keepax
Allow the chip to completely power off if we enter runtime suspend and there is no jack detection active. This is helpful for systems where system suspend might remove the supplies to the CODEC, without informing us. Note the powering off is done in runtime suspend rather than system suspend, because we need to hold reset until the first time DCVDD is powered anyway (which would be in runtime resume), and we might as well save the extra power. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: wm5110: Set DCVDD voltage to 1.175V before entering sleep modeCharles Keepax
The low power sleep mode on wm5110 requires that the LDO1 regulator be set to 1.175V prior to entering sleep, then returned to 1.2V after exiting sleep mode. This patch apply these regulator settings. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: wm5110: Add register patch required for low power sleepCharles Keepax
Some register settings must be applied before the first time low power sleep mode is entered on the wm5110 to ensure optimium performance. These settings require SYSCLK to be enabled whilst they are being applied. This patch applies the settings using the recently factored out boot time SYSCLK functionality. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: arizona: Factor out SYSCLK enable from wm5102 hardware patchCharles Keepax
wm5102 applies a custom hardware boot sequence, for this the SYSCLK needs to be enabled. This patch factors out the code that enables SYSCLK for this sequence such that it can be used for other boot time operations that require SYSCLK. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: arizona: Fix formating/style issues in arizona_apply_hardware_patchCharles Keepax
In preparation for some refactoring fixup some minor style, formating and code clarity issues. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: wm5102: Ensure we always boot the device fullyCharles Keepax
The wm5102 uses a custom boot sequence and the standard boot sequence is disabled. However, the standard boot sequence must be run at least once after a cold boot (caused by either a hard reset or removal of AVDD). Unfortunately the register WRITE_SEQUENCER_CTRL_3 is not affected by the hardware reset. This means if the device has been previously booted but the AVDD supply has never been removed, arizona_dev_init will reset the chip but the boot sequence will not run, which can cause numerous problems. The solution is to manually clear this register and then boot the chip again, which is what this patch does. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: arizona: Factor out hard reset into helper functionsCharles Keepax
This patch adds functions for enabling and disabling the physical reset line. This will be helpful in future refactoring. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: arizona: Use devres to manage reset GPIOCharles Keepax
This also handily fixes a leak of the GPIO in arizona_dev_exit. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: arizona: Remove redundant register syncCharles Keepax
This soft reset used to be located after the register patch had been applied, but has since moved to before the patch is applied. At the new location there is no requirement to do a register sync as no register writes will have happened yet. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-03-12mfd: arizona: Add DT binding for the DMIC reference voltagesCharles Keepax
Add a DT binding that lets the DMIC reference voltage source be specified for each input. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-02-26mfd: arizona: Add support for WM8280/WM8281Richard Fitzgerald
This adds support for the Wolfson Microelectronics WM8280 and WM8281 codecs. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> [Lee: Minor fixup to remove potentially uninitialised variable. ] Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-12-05MFD / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/mfd/. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Lee Jones <lee.jones@linaro.org>
2014-09-26mfd: arizona: Correct mask to allow setting micbias external capCharles Keepax
Currently the mask for the external capacitor bit is missing when writing the MICBIAS config meaning it will never be set this patch fixes this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-26Revert "mfd: wm5102: Manually apply register patch"Charles Keepax
This reverts commit d9d03496f6f904a3588bdb8b215853bc4e50132c. It seems this commit was applied twice, once through ASoC and once through MFD: commit 4c9bb8bc352a14c9613c77bc3f1e9038cd086b9b mfd: wm5102: Manually apply register patch commit d9d03496f6f904a3588bdb8b215853bc4e50132c mfd: wm5102: Manually apply register patch This has lead to a small piece of duplicate code. It is harmless hence how it has gone unoticed for so long. This patch reverts one of the two commits removing the unneeded code. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-26mfd: arizona: Add support for INn_Mode register controlInha Song
Some boards need to set the INn_MODE[1:0] register to change the input signal patch. This wlf,inmode property is optional. If present, values must be specified less than or equal to the number of input singals. If values less than the number of input signals, elements that has not been specifed are set to 0 by default. Example: - wlf,inmode = <2 0 2>; /* IN1, IN3 use DMIC */ Signed-off-by: Inha Song <ideal.song@samsung.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-26mfd: wm5102: Mark register write sequencer control 3 readableMark Brown
During init the core checks if the wm5102 has finished starting by reading register 0x19 and looking at the value. This read always fails since this is not a readable register, mark it as being one. While we're at it provide a constant for the register name (as supplied by Charles Keepax). Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-28mfd: arizona: Add missing handling for ISRC3 under/overclockedCharles Keepax
Some parts have a third ISRC, this patch adds handling for the under and overclocked interrupts from this ISRC. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-28mfd: arizona: Map MICVDD from extcon device to the Arizona coreCharles Keepax
The extcon driver should be able to get its regulator against rather than against the main arizona device, we must add a supply mapping allowing the regulator to be located. This patch does so. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-28mfd: arizona: Add MICVDD to mapped regulators for wm8997Charles Keepax
The previous update adding MICVDD to the regulator mappings: mfd: arizona: Add MICVDD to mapped regulators Only added the mapping for wm5102 and wm5110 but wm8997 also has a MICVDD supply that needs to be mapped back to the main Arizona device. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-09mfd: arizona: Rid data size incompatibility warn when building for 64bitLee Jones
Extinguishes: ../drivers/mfd/arizona-core.c: In function ‘arizona_of_get_type’: ../drivers/mfd/arizona-core.c:505:10: warning: cast from pointer to integer of different size Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-09mfd: arizona: Add comment to explain non-devm regulator_getCharles Keepax
To avoid someone attempting to change this regulator_get back into a devm_regulator_get put a comment in explaining that devres can't be used here as the regulator will be destroyed before devres calls regulator_put. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-09mfd: arizona: Use num_core_supplies in arizona_dev_exitCharles Keepax
Currently we call regulator_bulk_disable with ARRAY_SIZE(arizona->core_supplies), however this array may be larger than the number of supplies actually used by the chip we are dealing with. Use the provided num_core_supplies member instead, so that we only disable supplies which actually exist. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-09mfd: arizona: Don't use devres for DCVDDCharles Keepax
Currently the Arizona core uses a devm_regulator_get against its own device node to obtain DCVDD. The Arizona core is an MFD device and DCVDD is usually supplied by a child node (arizona-ldo1) of the core. As devres destruction for the MFD device will run after all its children have been destroyed, the regulator will be destroyed before devres calls regulator_put. This causes a warning from both the destruction of the child node, as the regulator is still open, and from the put of the regulator as the regulator device has already been destroyed. This patch handles the regulator get and put without devres to avoid this issue. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-09mfd: arizona: Disable DCVDD before we destroy the MFDCharles Keepax
As DCVDD is probably supplied by a child of the MFD device move its disable to before we destroy the MFD children as the regulator likely won't exist after that. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-09mfd: arizona: Disable PM runtime at start of driver removalCharles Keepax
We don't want to trigger any PM runtime operations whilst we are tearing down the driver, as things the suspend and resume callbacks rely on might already have been destroyed. So disable PM runtime for the device as the first step arizona_dev_exit. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-06-03mfd: arizona: Add MICVDD to mapped regulatorsCharles Keepax
Currently, MICVDD only binds because it is both the regulator name and the consumer name and we will always match against the regulator name regardless of the consumer device. If the regulator was renamed using the init_data ASoC will no longer be able to locate the supply, as it will be looking on the CODEC device where as the MICVDD consumer is on the Arizona device. Add a mapping as we do for the other regulators. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-04-18regulator: arizona-ldo1: Move setup processing from arizona-coreCharles Keepax
It is more idiomatic to process things relating to the regulator in its driver. This patch moves both processing of device tree relating to the regulator and checking if the regulator is external from arizona-core into the regulator driver. 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>
2014-04-18mfd: arizona: Factor out read of device tree GPIOsCharles Keepax
This patch factors out the reading of GPIOs for the Arizona devices into a helper function. 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>
2014-02-26mfd: arizona: Use new regmap features for manual register patchCharles Keepax
On the wm5102 the register patches are applied manually, rather than by the regmap core. This application is wrapped in calls to regcache_cache_bypass. However, this is dangerous as other threads may be accessing the hardware at the same time as the pm_runtime operations and if they do so during the period whilst cache_bypass is enabled those writes will miss the cache when they shouldn't. Apply the register patch using the new regmap_multi_reg_write_bypassed function to avoid this problem. Also remove the call to regcache_cache_bypass from the hardware patch application as it is unneeded there and creates a similar window for writes to miss the cache. 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>
2014-01-06mfd: Constify struct mfd_cell where possibleGeert Uytterhoeven
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 ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next 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 Keepax
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 Jones
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 Keepax
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 Keepax
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 Keepax
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 Keepax
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 Brown
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 Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>