summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs35l34.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: cs35l34: replace codec to componentKuninori Morimoto2018-02-121-64/+63
| | | | | | | | | | | | | | Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs35l34: Improve two size determinations in cs35l34_i2c_probe()Markus Elfring2017-11-271-6/+3
| | | | | | | | | | | Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs35l34: Delete two error messages for a failed memory allocation in ↵Markus Elfring2017-11-271-7/+3
| | | | | | | | | | | cs35l34_i2c_probe() Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/cs35l33', 'asoc/topic/cs35l34' ↵Mark Brown2017-09-011-2/+1
|\ \ | | | | | | | | | and 'asoc/topic/cs42l42' into asoc-next
| | * ASoC: cs35l34: Remove unneeded gpiod NULL checkFabio Estevam2017-07-171-2/+1
| |/ | | | | | | | | | | | | | | 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>
* / ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal2017-08-101-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ASoC: cs35l34: Constify hw_constraintsTakashi Iwai2017-06-131-2/+2
| | | | | | | | | 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>
* ASoC: cs35l34: Simplify the logic to set CS35L34_MCLK_CTL settingAxel Lin2016-12-061-3/+3
| | | | | | | | | | | 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>
* ASoC: cs35l34: Remove CS35L34_CHIP_ID from cs35l34_readable_registerAxel Lin2016-10-251-1/+0
| | | | | | | | 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>
* ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver.Paul Handrigan2016-10-211-0/+1252
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>