summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/mt6359.c
AgeCommit message (Collapse)Author
2021-09-15ASoC: mediatek: mt6359: Fix unexpected error in bind/unbind flowTrevor Wu
mt6359-sound is a MFD driver. Because its regmap is retrieved from its parent, it shouldn't be freed in mt6359-sound driver. snd_soc_component_exit_regmap() will do regmap_exit(), this results in unexpected results if sound card unregister flow is invoked when users try to bind/unbind audio codec. Remove the usage of snd_soc_component_exit_regmap(). Instead, set component->regmap = NULL in the component remove function. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210915034659.25044-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoc: codecs: mt6359: remove useless initializationsPierre-Louis Bossart
cppcheck warning: sound/soc/codecs/mt6359.c:274:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:274:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210426214701.235106-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-18ASoC: mt6359: remove useless assignmentPierre-Louis Bossart
cppcheck warning: sound/soc/codecs/mt6359.c:242:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:260:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:274:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:274:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210312182246.5153-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-02ASoC: mt6359: reduce log verbosity for optional DT propertiesTzung-Bi Shih
DT properties "dmic-mode" and "mic-type-X" are optional. Reduces the log verbosity and changes the message a bit to avoid misleading. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210202033557.1621029-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-20ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18"Jiaxin Yu
Mt6359 platform device is instantiated by mfd_add_devices(). In the case, dev->of_node is NULL so that always fails to get the regulator_dev. Use regualator-name "vaud18" that in dts node instead of "LDO_VAUD19-supply". So that we can get regulator_dev through regulator_lookup_by_name() directly. Fixes: 64a70744b778 ("ASoC: Fix vaud18 power leakage of mt6359") Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1605841573-1442-2-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-11ASoC: Remove mt6359_platform_driver_removeShane.Chien
remove mt6359_platform_driver_remove due to it is useless. Signed-off-by: Shane.Chien <shane.chien@mediatek.com> Link: https://lore.kernel.org/r/1605068096-12587-1-git-send-email-shane.chien@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10ASoC: Fix vaud18 power leakage of mt6359Shane.Chien
vaud18 is power of mt6359 audio path. It should only enable when audio is used, instead of in boot up stage. Once mt6359 audio path is enabled or disabled, vaud18 is controlled by regulator supply widget "LDO_VAUD18". Due to vaud18 is controlled by regulator dapm macro instead of regmap, the macro MT6359_LDO_VAUD18_CON0 and variable avdd_reg is no used and removed from mt6359.h. Signed-off-by: Shane.Chien <shane.chien@mediatek.com> Link: https://lore.kernel.org/r/1604975492-6142-2-git-send-email-shane.chien@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt6359: add the calibration functionsJiaxin Yu
Add the calibraion functions for initializing the codec when registering the machine driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-2-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-08ASoC: mt6359: fix failed to parse DT propertiesTzung-Bi Shih
Mt6359 platform device is instantiated by mfd_add_devices(). In the case, dev->of_node is NULL so that mt6359_parse_dt() always fails to parse the desired DT properties. Gets the DT properties via dev->parent->of_node. Fixes: 8061734ab654 ("ASoC: mediatek: mt6359: add codec driver") Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200908070044.1142644-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-20ASoC: mediatek: mt6359: add codec driverJiaxin Yu
Add the mt6359 codec driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/1597913493-10747-2-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>