aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 13:16:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 13:16:04 -0700
commitc6b38ec06e281af0608f02763ac7484ace267024 (patch)
tree217a1c1c80d5d79ba336b80cc188ba2ab02bbc4d /drivers/mfd
parentMerge tag 'pinctrl-v3.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl (diff)
parentMerge remote-tracking branches 'regmap/topic/cache', 'regmap/topic/irq', 'regmap/topic/lock', 'regmap/topic/mmio', 'regmap/topic/nodev', 'regmap/topic/parse-val' and 'regmap/topic/patch' into regmap-next (diff)
downloadlinux-dev-c6b38ec06e281af0608f02763ac7484ace267024.tar.xz
linux-dev-c6b38ec06e281af0608f02763ac7484ace267024.zip
Merge tag 'regmap-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown: "Quite a busy release for regmap this time around, the standout changes are: - A real implementation of regmap_multi_write() and a bypassed version of it for use by drivers doing patch-like things with more open coding for surrounding startup sequences. - Support fast_io on bulk operations. - Support split device binding and map initialisation for use by devices required in early init (mainly system controllers). - Fixes for some operations on maps with strides set. - Export the value parsing operations to help generic code built on top of the API. - Support for MMIO regmaps with non-32 bit register sizes. plus a few smaller fixes" * tag 'regmap-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (22 commits) regmap: mmio: Add regmap_mmio_regbits_check. regmap: mmio: Add support for 1/2/8 bytes wide register address. regmap: mmio: add regmap_mmio_{regsize, count}_check. regmap: cache: Don't attempt to sync non-writeable registers regmap: cache: Step by stride in default sync regmap: Fix possible sleep-in-atomic in regmap_bulk_write() regmap: Ensure regmap_register_patch() is compatible with fast_io regmap: irq: Set data pointer only on regmap_add_irq_chip success regmap: Implementation for regmap_multi_reg_write regmap: add regmap_parse_val api mfd: arizona: Use new regmap features for manual register patch regmap: Base regmap_register_patch on _regmap_multi_reg_write regmap: Add bypassed version of regmap_multi_reg_write regmap: Mark reg_defaults in regmap_multi_reg_write as const regmap: fix coccinelle warnings regmap: Check stride of register patch as we register it regmap: Clean up _regmap_update_bits() regmap: Separate regmap dev initialization regmap: Check readable regs in _regmap_read regmap: irq: Remove domain on exit ...
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/arizona-core.c4
-rw-r--r--drivers/mfd/wm5102-tables.c21
2 files changed, 4 insertions, 21 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index a45aab9f6bb1..1c3ae57082ed 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -251,8 +251,6 @@ static int arizona_apply_hardware_patch(struct arizona* arizona)
unsigned int fll, sysclk;
int ret, err;
- regcache_cache_bypass(arizona->regmap, true);
-
/* Cache existing FLL and SYSCLK settings */
ret = regmap_read(arizona->regmap, ARIZONA_FLL1_CONTROL_1, &fll);
if (ret != 0) {
@@ -322,8 +320,6 @@ err_fll:
err);
}
- regcache_cache_bypass(arizona->regmap, false);
-
if (ret != 0)
return ret;
else
diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
index 1e9a4b2102f9..bffc584e4a43 100644
--- a/drivers/mfd/wm5102-tables.c
+++ b/drivers/mfd/wm5102-tables.c
@@ -80,8 +80,7 @@ static const struct reg_default wm5102_revb_patch[] = {
int wm5102_patch(struct arizona *arizona)
{
const struct reg_default *wm5102_patch;
- int ret = 0;
- int i, patch_size;
+ int patch_size;
switch (arizona->rev) {
case 0:
@@ -92,21 +91,9 @@ int wm5102_patch(struct arizona *arizona)
patch_size = ARRAY_SIZE(wm5102_revb_patch);
}
- regcache_cache_bypass(arizona->regmap, true);
-
- for (i = 0; i < patch_size; i++) {
- ret = regmap_write(arizona->regmap, wm5102_patch[i].reg,
- wm5102_patch[i].def);
- if (ret != 0) {
- dev_err(arizona->dev, "Failed to write %x = %x: %d\n",
- wm5102_patch[i].reg, wm5102_patch[i].def, ret);
- goto out;
- }
- }
-
-out:
- regcache_cache_bypass(arizona->regmap, false);
- return ret;
+ return regmap_multi_reg_write_bypassed(arizona->regmap,
+ wm5102_patch,
+ patch_size);
}
static const struct regmap_irq wm5102_aod_irqs[ARIZONA_NUM_IRQ] = {