summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs4349.c
AgeCommit message (Collapse)AuthorFilesLines
2016-08-08ASoC: codec duplicated callback function goes to component on cs4349Kuninori Morimoto1-7/+8
codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: cs4349: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/codecs/cs4349.c:389:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22ASoC: cs4349: Fix up setting PWR_DWN bitAxel Lin1-1/+1
The PWR_DWN is Bit 7, so current code does not set the PWR_DWN bit. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpioAxel Lin1-8/+4
It's safe to call gpiod_set_value_cansleep() with NULL desc. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20ASoC: cs4349: include gpio/consumer.hakpm@linux-foundation.org1-0/+1
s390 allmodconfig: sound/soc/codecs/cs4349.c: In function 'cs4349_i2c_probe': sound/soc/codecs/cs4349.c:300: error: implicit declaration of function 'devm_gpiod_get_optional' sound/soc/codecs/cs4349.c:301: error: 'GPIOD_OUT_LOW' undeclared (first use in this function) sound/soc/codecs/cs4349.c:301: error: (Each undeclared identifier is reported only once sound/soc/codecs/cs4349.c:301: error: for each function it appears in.) sound/soc/codecs/cs4349.c:306: error: implicit declaration of function 'gpiod_set_value_cansleep' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20ASoC: cs4349: Drop platform data supportAxel Lin1-6/+1
The struct cs4349_platform_data should be defined in a public header in include/sound/ rather than in sound/soc/codecs folder. In additional, the platform data support is not properly handled in this driver so remove it now. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20ASoC: cs4349: Set .writeable_reg for cs4349_regmapAxel Lin1-8/+12
The first valid register index is 1 rather than 0, and the CS4349_CHIPID is readonly. So set .writeable_reg to avoid writing to these registers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20ASoC: cs4349: Fix setting digital interface formatAxel Lin1-6/+5
Mode Control - Register 02h Digital Interface Format (DIF[2:0]) Bits 6-4 DIF2 DIF1 DIF0 Description 0 0 0 Left-Justified, up to 24-bit data 0 0 1 I²S, up to 24-bit data 0 1 0 Right-Justified, 16-bit data 0 1 1 Right-Justified, 24-bit data 1 0 0 TDM slot 0 1 0 1 TDM slot 1 1 1 0 TDM slot 2 1 1 1 TDM slot 3 The DIF_MASK is 0x70, so current code does not correctly set the DIFx setting. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20ASoC: cs4349: Don't use rtd->codecLars-Peter Clausen1-2/+1
rtd->codec does not necessarily point to the CODEC instance for which the callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use dai->codec instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20ASoC: cs4349: Fix suspend/resumeLars-Peter Clausen1-4/+2
dev_get_drvdata() will not return the snd_soc_runtime to which this CODEC is attached, so the current code will result in undefined behavior. To fix this just use regmap_update_bits(cs4349->regmap, ...) directly instead of snd_soc_update_bits(rtd->codec, ...). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-19ASoC: cs4349: Constify cs4349_regmapAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-19ASoC: cs4349: Fix max_register setting for cs4349_regmapAxel Lin1-1/+1
The max_register should be the maximum valid register index rather than number of registers. Also remove unused defines. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16ASoC: cs4349: Add support for Cirrus Logic CS4349Tim Howe1-0/+401
Signed-off-by: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>