aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-09 19:33:14 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-10 11:03:02 +0200
commit2a51da04fef56ec83f790bf0746e90fe40215a92 (patch)
tree71dfb1638b157b280887289416600c89b931e1de
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>
-rw-r--r--drivers/mfd/arizona-core.c5
-rw-r--r--include/linux/mfd/arizona/pdata.h2
2 files changed, 3 insertions, 4 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)
ARIZONA_OUT1_MONO, val);
}
- BUILD_BUG_ON(ARIZONA_MAX_PDM_SPK > 1);
for (i = 0; i < ARIZONA_MAX_PDM_SPK; i++) {
if (arizona->pdata.spk_mute[i])
regmap_update_bits(arizona->regmap,
- ARIZONA_PDM_SPK1_CTRL_1,
+ ARIZONA_PDM_SPK1_CTRL_1 + (i * 2),
ARIZONA_SPK1_MUTE_ENDIAN_MASK |
ARIZONA_SPK1_MUTE_SEQ1_MASK,
arizona->pdata.spk_mute[i]);
if (arizona->pdata.spk_fmt[i])
regmap_update_bits(arizona->regmap,
- ARIZONA_PDM_SPK1_CTRL_2,
+ ARIZONA_PDM_SPK1_CTRL_2 + (i * 2),
ARIZONA_SPK1_FMT_MASK,
arizona->pdata.spk_fmt[i]);
}
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
index fa2cb9885d6..68ff91aa388 100644
--- a/include/linux/mfd/arizona/pdata.h
+++ b/include/linux/mfd/arizona/pdata.h
@@ -62,7 +62,7 @@
#define ARIZONA_MAX_OUTPUT 5
-#define ARIZONA_MAX_PDM_SPK 1
+#define ARIZONA_MAX_PDM_SPK 2
struct regulator_init_data;