diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2017-03-08 17:42:49 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-03-13 17:09:17 +0100 |
commit | 8d45f2d23864ae1582d095c54605540cd3640169 (patch) | |
tree | f9b1a57d779269195aa8f4e27a3b932b103687ea /sound/soc/codecs/cs35l35.c | |
parent | ASoC: cs35l35: Add device tree binding for I2S drive configuration (diff) | |
download | linux-8d45f2d23864ae1582d095c54605540cd3640169.tar.xz linux-8d45f2d23864ae1582d095c54605540cd3640169.zip |
ASoC: cs35l35: Add for configuring drive mode in unused slots
Add support for setting how the I2S pins are driven in unused slots,
currently the chip will just use the default of drive 0, however this
causes issues when multiple devices are attached to the same bus.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs35l35.c')
-rw-r--r-- | sound/soc/codecs/cs35l35.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c index 48b45dc904ea..5a9fe5addb86 100644 --- a/sound/soc/codecs/cs35l35.c +++ b/sound/soc/codecs/cs35l35.c @@ -789,6 +789,11 @@ static int cs35l35_codec_probe(struct snd_soc_codec *codec) CS35L35_SP_DRV_MASK, cs35l35->pdata.sp_drv_str << CS35L35_SP_DRV_SHIFT); + if (cs35l35->pdata.sp_drv_unused) + regmap_update_bits(cs35l35->regmap, CS35L35_SP_FMT_CTL3, + CS35L35_SP_I2S_DRV_MASK, + cs35l35->pdata.sp_drv_unused << + CS35L35_SP_I2S_DRV_SHIFT); if (classh->classh_algo_enable) { if (classh->classh_bst_override) @@ -1169,6 +1174,8 @@ static int cs35l35_handle_of_data(struct i2c_client *i2c_client, if (of_property_read_u32(np, "cirrus,sp-drv-strength", &val32) >= 0) pdata->sp_drv_str = val32; + if (of_property_read_u32(np, "cirrus,sp-drv-unused", &val32) >= 0) + pdata->sp_drv_unused = val32 | CS35L35_VALID_PDATA; pdata->stereo = of_property_read_bool(np, "cirrus,stereo-config"); |