summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/ak5558.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-24ASoC: ak5558: Add regulator supportShengjiu Wang1-0/+30
"AVDD" is for analog power supply, "DVDD" is for digital power supply, they can improve the power management. As the regulator is enabled in pm runtime resume, which is behind the component driver probe, so accessing registers in component driver probe will fail. Fix this issue by enabling regcache_cache_only after pm_runtime_enable. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1598190877-9213-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-06ASoC: ak5558: Remove redundant snd_soc_component_read32 callsAxel Lin1-12/+5
snd_soc_component_update_bits() will only update the mask bits, so remove the redundant snd_soc_component_read32(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-05ASoC: codecs: constify snd_soc_dai_ops structuresJulia Lawall1-1/+1
The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-18ASoC: ak5558: make two structures staticColin Ian King1-2/+2
The structure ak5558_pm and soc_codec_dev_ak5558 are local to the source and do not need to be in global scope, so make them static. Also make soc_codec_dev_ak5558 static. Cleans up sparse warnings: warning: symbol 'ak5558_pm' was not declared. Should it be static? warning: symbol 'soc_codec_dev_ak5558' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-20ASoC: ak5558: Fix style for SPDX identifierDaniel Baluta1-6/+5
Use // for .c and /* for .h files according to: Documentation/process/license-rules.rst file. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-19ASoC: ak5558: replace codec to componentKuninori Morimoto1-34/+33
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>
2018-02-16ASoC: ak5558: Add support for AK5558 ADC driverDaniel Baluta1-0/+417
AK5558 is a 32-bit, 768 kHZ sampling, differential input ADC for digital audio systems. Datasheet is available at: https://www.akm.com/akm/en/file/datasheet/AK5558VN.pdf Initial patch includes support for normal and TDM modes. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Junichi Wakasugi <wakasugi.jb@om.asahi-kasei.co.jp> [initial coding for 3.18 kernel] Signed-off-by: Mihai Serban <mihai.serban@nxp.com> [cleanups and porting to 4.9 kernel] Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> [tdm support] Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> [pm support, cleanups and porting to latest kernel] Signed-off-by: Mark Brown <broonie@kernel.org>