aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-09 14:33:14 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-10 05:03:02 -0400
commit2a51da04fef56ec83f790bf0746e90fe40215a92 (patch)
tree71dfb1638b157b280887289416600c89b931e1de /drivers/mfd
parent78a73e59db21b465fe60e795a0b7eadb0451370b (diff)
mfd: Add support for multiple arizona PDM speaker outputs
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/arizona-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index ffa011f4677..b35680dcd8c 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -462,18 +462,17 @@ int __devinit arizona_dev_init(struct arizona *arizona)
462 ARIZONA_OUT1_MONO, val); 462 ARIZONA_OUT1_MONO, val);
463 } 463 }
464 464
465 BUILD_BUG_ON(ARIZONA_MAX_PDM_SPK > 1);
466 for (i = 0; i < ARIZONA_MAX_PDM_SPK; i++) { 465 for (i = 0; i < ARIZONA_MAX_PDM_SPK; i++) {
467 if (arizona->pdata.spk_mute[i]) 466 if (arizona->pdata.spk_mute[i])
468 regmap_update_bits(arizona->regmap, 467 regmap_update_bits(arizona->regmap,
469 ARIZONA_PDM_SPK1_CTRL_1, 468 ARIZONA_PDM_SPK1_CTRL_1 + (i * 2),
470 ARIZONA_SPK1_MUTE_ENDIAN_MASK | 469 ARIZONA_SPK1_MUTE_ENDIAN_MASK |
471 ARIZONA_SPK1_MUTE_SEQ1_MASK, 470 ARIZONA_SPK1_MUTE_SEQ1_MASK,
472 arizona->pdata.spk_mute[i]); 471 arizona->pdata.spk_mute[i]);
473 472
474 if (arizona->pdata.spk_fmt[i]) 473 if (arizona->pdata.spk_fmt[i])
475 regmap_update_bits(arizona->regmap, 474 regmap_update_bits(arizona->regmap,
476 ARIZONA_PDM_SPK1_CTRL_2, 475 ARIZONA_PDM_SPK1_CTRL_2 + (i * 2),
477 ARIZONA_SPK1_FMT_MASK, 476 ARIZONA_SPK1_FMT_MASK,
478 arizona->pdata.spk_fmt[i]); 477 arizona->pdata.spk_fmt[i]);
479 } 478 }