summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs35l34.c
AgeCommit message (Collapse)Author
2017-09-01Merge remote-tracking branches 'asoc/topic/cs35l33', 'asoc/topic/cs35l34' ↵Mark Brown
and 'asoc/topic/cs42l42' into asoc-next
2017-08-10ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal
Declare snd_soc_codec_driver structures as const as they are only passed as an argument to the function snd_soc_register_codec. This argument is of type const, so declare the structures with this property as const. In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in a copy operation along with getting passed to snd_soc_register_codec. So, it can be made const too. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_soc_codec_driver s@p={...}; @good1@ identifier match.s; position p; @@ snd_soc_register_codec(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_soc_codec_driver s={...}; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17ASoC: cs35l34: Remove unneeded gpiod NULL checkFabio Estevam
The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: cs35l34: Constify hw_constraintsTakashi Iwai
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-06ASoC: cs35l34: Simplify the logic to set CS35L34_MCLK_CTL settingAxel Lin
The logic of "value = ~CS35L34_MCLK_DIV & CS35L34_MCLK_RATE_XXXXXX;" is unnecessary complex. By setting CS35L34_MCLK_DIV | CS35L34_MCLK_RATE_MASK as the mask for regmap_update_bits() call, what the code does is exactly the same as setting value = CS35L34_MCLK_RATE_XXXXXX. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-25ASoC: cs35l34: Remove CS35L34_CHIP_ID from cs35l34_readable_registerAxel Lin
CS35L34_CHIP_ID is not a register address, it's the value read from CS35L34_DEVID_AB/CD/E registers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-21ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver.Paul Handrigan
Initial commit of the Cirrus Logic cs35l34 8V boosted class D amplifier. Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>